diff --git a/.devcontainer/README.md b/.devcontainer/README.md index cdef18c3..4e03e171 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 7818b9cf..ae42d999 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,17 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: 53338db6c6ec6141b5611b5c49b639ca + docChecksum: 700a6e5f5e058ed6b97df99b39d5e8b4 docVersion: 1.0.0 speakeasyVersion: 1.761.0 generationVersion: 2.879.1 - releaseVersion: 0.11.2 - configChecksum: cb6df38c79eadf6eb9d3ee86f03356f9 + releaseVersion: 0.12.0 + configChecksum: ce2fbc0fd8b350e2f4fda9614965fb5d + repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git + installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: 8139616c-a235-4a61-8d59-af8e498676d5 - pristine_commit_hash: 21d00ec860fd35e2e7499eeedc5a5c82c17b493e - pristine_tree_hash: 7b816c6b21456f9ec642272b908f0c3ce0ff9f5b + generation_id: 630b213a-7201-4145-8573-b4ea0d39536c + pristine_commit_hash: 1fbcedceeecf9149d5af7e441242bba7c22f0c36 + pristine_tree_hash: 83abab1a238fa6a75af1e84bfb596840f17a187b features: typescript: acceptHeaders: 2.81.2 @@ -23,6 +25,7 @@ features: defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.1 + downloadStreams: 0.1.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.1.2 globalSecurity: 2.82.16 @@ -37,6 +40,7 @@ features: nameOverrides: 2.81.4 nullables: 0.1.1 openEnums: 0.1.2 + pagination: 2.83.2 responseFormat: 0.3.0 retries: 2.83.0 sdkHooks: 0.4.0 @@ -47,8 +51,8 @@ features: trackedFiles: .devcontainer/README.md: id: b170c0f184ac - last_write_checksum: sha1:b6564d2a7c8ae764fff6d1b4666dcd787210a000 - pristine_git_object: cdef18c30e383534a868742e1b9148f2670606f9 + last_write_checksum: sha1:bc51dac1444cd4dd396c348666635fdc46715300 + pristine_git_object: 4e03e171a65a95baafa466b640116b305f3c489b .devcontainer/devcontainer.json: id: b34062a34eb1 last_write_checksum: sha1:d0b15193202c961e7d1875864ddb15f9d17c84dd @@ -63,64 +67,105 @@ trackedFiles: pristine_git_object: 113eead5093c17d43a46159132885318f281a68a FUNCTIONS.md: id: 21b9df02aaeb - last_write_checksum: sha1:9da5c4523c38a1e3d66595438bc0dcf71d9473b2 - pristine_git_object: 567e560be67fa8292b39edbf8e456b86de2e53df + last_write_checksum: sha1:8f15259a2339a77113cc94e709c10db8f69785f6 + pristine_git_object: 223ef378152917fc22d1e0ca6f1b3798b7e6dbdf RUNTIMES.md: id: 620c490847b6 last_write_checksum: sha1:e45b854f02c357cbcfdb8c3663000e8339e16505 pristine_git_object: 27731c3b5ace66bedc454ed5acbe15075aacd3dc USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:b5d92c688a56ab1c0b76aa34cbac03ed89f3d801 - pristine_git_object: 69c81d0d165391cb64a26d033c987d065f9f9830 + last_write_checksum: sha1:2ddfc81f77e10ebc53369faa661046a8a8eedb57 + pristine_git_object: 18a134fbafd78cdca7453b1663dcd9c425c98bd9 docs/lib/utils/retryconfig.md: id: 0ce9707cb848 last_write_checksum: sha1:bc4454e196fcd219f5a78da690375a884f5ed07b pristine_git_object: 08f95f4552349360b2c0b01802aa71ec3a55d2c2 docs/models/action.md: id: 3b583d6a609e - last_write_checksum: sha1:25d1128305b92739e2a378bf7fa8ed6bb179cde2 - pristine_git_object: c98359d81435645774b48bef76efd8804558d94b + last_write_checksum: sha1:d724795b0b02ca4ff73bb8ef0aa100fa87084847 + pristine_git_object: 8a50cc565e17e6444348953a52701160c0b47847 + deleted: true + docs/models/actionenum.md: + id: ecc903ca16e6 + last_write_checksum: sha1:c55a004c21f09e273f617228d96fb250c7af4c2d + pristine_git_object: 278ceb589344bb4eab21ce79661879f211ca671c docs/models/actionfindinpage.md: id: 82de07ae8815 - last_write_checksum: sha1:892232466ee3462f6b196c464ed942b03275156b - pristine_git_object: 26959fe558ad2ab64f933d526ff923a4868f4cbf + last_write_checksum: sha1:366d276e651d0461259efdf232cba93d670044ee + pristine_git_object: c25a425147069b9ff6cb19169e58514c4a898002 + deleted: true docs/models/actionopenpage.md: id: 014a2d814419 last_write_checksum: sha1:35237daa203e015624ca63edc538f1bba81b946d pristine_git_object: 5563636092178fc7f98d571c8443fb8d2ae61806 + deleted: true docs/models/actionsearch.md: id: 52ec8c04eadc - last_write_checksum: sha1:8b4f14fd19abb9f25a3f51dbb29bf7712cad9c67 - pristine_git_object: 6f80a5536ddd27c3926ae1f4333d66ae85412bf6 + last_write_checksum: sha1:6762a2c48ca85baaa0cad53a369f8080a6bc266e + pristine_git_object: 47d45c1537ba498fd40f612732d9c82a41e6d737 + deleted: true docs/models/activityitem.md: id: f0c5f0e6c469 - last_write_checksum: sha1:d25ad4a8896acf08a136b24bdeca528217e63366 - pristine_git_object: 761ca947b3ed048a95b168c2167d5806536ef64a + last_write_checksum: sha1:e8ed50436ca62c6f6944d80562ad70e8d7c4e774 + pristine_git_object: 1c67ea44ee4050f26143bd14780acec165cd2be3 + docs/models/activityresponse.md: + id: 5f8df7ea105d + last_write_checksum: sha1:8627ccef6c13e16d91cd49f0d73cacb713f0bf70 + pristine_git_object: 53ef23aa1a315b77e5333bef4dc76cc4f9547599 docs/models/allowedtools.md: id: 3173f34039d5 - last_write_checksum: sha1:88a50744e9312e7b30f29130bcfcfc190ce6fd5f - pristine_git_object: c0a3f36038e2c4859ba998970302c4ccabf9b797 + last_write_checksum: sha1:792afb6d459f4203560666cfd041f593f69d7215 + pristine_git_object: 8d65fa15ecc58ee05d2bee01d0a6abd4ccda0020 + deleted: true + docs/models/allowedtoolsunion.md: + id: 799fcaf5d3ff + last_write_checksum: sha1:3da7bc09fea68a6efb108b613b37035cfe03cda3 + pristine_git_object: 5044879001f545ec94bc2c498273bd24271af33e docs/models/always.md: id: 017ae40db277 last_write_checksum: sha1:ad37e192d0d5375f48064a5ad6a0c3658ff5438e pristine_git_object: e642f971bacfad9e4b23959b7ba033e4508e3318 + deleted: true docs/models/annotationaddedevent.md: id: 1d604076bb55 - last_write_checksum: sha1:39c3b334fdde9ab8ec3fc776da8f23c866cc6c3e - pristine_git_object: 17364f4a9d6bc916c5736493ea05d47bc5e46cfb + last_write_checksum: sha1:787168d345b8bf4cc60ce56e4fbfe9c9985ba2c2 + pristine_git_object: 66b2198b8148f5d1c325d86a0f5f63ac5a3a6ff1 + deleted: true + docs/models/anthropiccachecontroldirective.md: + id: e5e1a8c6dc4f + last_write_checksum: sha1:9920ca14afe0800caa8ac5adae8e84f7dba9eaa7 + pristine_git_object: 6c269175e6c6c1a9dfa0d8d61dbe2258bf44c316 + docs/models/anthropiccachecontroldirectivetype.md: + id: 44e83d1047c1 + last_write_checksum: sha1:4a3a59725d916a09a2c5d70ef9645e73551c088f + pristine_git_object: bd79a337edb7298c9f4946366ab0305c87fdae86 + docs/models/anthropiccachecontrolttl.md: + id: 4d8e9fcb408a + last_write_checksum: sha1:19fc711a4800d37f8232832e79c8fd9fa8e15142 + pristine_git_object: c3c1e402505f9dbec0696e640ebdd1e41c0c6f64 docs/models/applypatchservertool.md: id: 86422c274e49 last_write_checksum: sha1:7b838dc21985c762b5601f73262507ca3a9c527e pristine_git_object: a4450c0df68af7848df2d4f702833f1dbac8d7c2 + deleted: true docs/models/architecture.md: id: b8d52e1654c4 - last_write_checksum: sha1:07517ea9f4d701aa89a5980faf33d5048d43e78a - pristine_git_object: a79153a013b15854d652f570cbc42de986a706b9 + last_write_checksum: sha1:bf7d6d2d0c2f8e8fe3ad79313323206bb989dbed + pristine_git_object: 7b6e489fcc66054a8c1e7f4e8e13f1e11df6841e + docs/models/aspectratio.md: + id: c34f2cec8cd0 + last_write_checksum: sha1:ae572e2d3e8541c1321c88b981634728e91dff4d + pristine_git_object: 9f23b600d2893df590028110d9e3c20fc1681785 + docs/models/autorouterplugin.md: + id: 96e009b23f15 + last_write_checksum: sha1:72e709a5fd2069d97c926dec735eaad895570386 + pristine_git_object: fcc14890a512015d65696dc3b20da856a50bf49d docs/models/background.md: id: 3b0fc0aed098 last_write_checksum: sha1:fc5a93bba90a86a1dfdd0f97f34dda7f224d20b0 pristine_git_object: f41559650a1956ecd24ff4ccf166d94725c64e5c + deleted: true docs/models/badgatewayresponseerrordata.md: id: 15451fc8cf63 last_write_checksum: sha1:7d1bd0317b5d98eaf83c5d46b9feca3f7f0b0d59 @@ -131,116 +176,200 @@ trackedFiles: pristine_git_object: 84693b01441744a1f1ff1f663d03bed57d5d3c49 docs/models/baseinputscontent1.md: id: adf8b9b51588 - last_write_checksum: sha1:c8df081db19424c48c4b876d246d0790b8a62533 - pristine_git_object: 45c4241e012b723950b7367da1efd863f9f6d595 + last_write_checksum: sha1:5100c1b56839370200f1b3d0b15dbb5bc2b2916c + pristine_git_object: 788bfa36cf6a491e351c7f95ac378b7a8b9f8e59 + deleted: true docs/models/baseinputscontent2.md: id: 9ff39b056162 last_write_checksum: sha1:118884d8ba3abb7a260466f46ab151b47befb159 pristine_git_object: 183a144c7eed2650437b7ee390b69509590df6fd + deleted: true docs/models/baseinputscontent3.md: id: 2cd205cd13db last_write_checksum: sha1:1fd988e22799b42129c714f662187644436114b2 pristine_git_object: 41412bd8f5294b6f4b2cdfc2ca0a4b591ee19e2d + deleted: true docs/models/baseinputsfunctioncall.md: id: 7d80cf55ff93 last_write_checksum: sha1:01dc48d31853e62bbf4ac190676b471dacee4b1d pristine_git_object: ed9d1c7e92b76108cf64bb1e3d0c21fb1fbc5ffa + deleted: true docs/models/baseinputsfunctioncalloutput.md: id: f88098b5bc1e last_write_checksum: sha1:9a1945a0b374e2960a8b0317a00bc4526c857a98 pristine_git_object: 83f3e99610046440ba676d30229b13c1328ff4cd + deleted: true + docs/models/baseinputsmessage.md: + id: a26c17ca90ad + last_write_checksum: sha1:5dc8a646caf62c226505860797d150f98bca1b09 + pristine_git_object: 44f3b71e8475a3895b08bd7d8f23a3135bad8434 docs/models/baseinputsmessage1.md: id: 2c0df9eeeace last_write_checksum: sha1:edebb94c9aedbe72b331b91772cdf52bff855d6f pristine_git_object: bdd8886ce5efc24a65f2ccdb00aa103e540bdb7e + deleted: true docs/models/baseinputsmessage2.md: id: 5fd83291861b last_write_checksum: sha1:05065fe045dbb9b277c9a9928b9b1c61a0bd582b pristine_git_object: 89bbeb5c73ab1b122c98a5328d03eb1a4e69f53c + deleted: true docs/models/baseinputsoutput1.md: id: 2462dec70a21 last_write_checksum: sha1:2f266e3a355f9dad300ba06f5c104b09798253b9 pristine_git_object: 895fabf493219f798e343a74d75e2776543bb243 + deleted: true docs/models/baseinputsoutput2.md: id: 57e458ff952a last_write_checksum: sha1:ad050231b7ef220a7e1f3ea9a8fa95519df75407 pristine_git_object: 2fccf811e8b1336e78b4793085df8942c6ffde57 + deleted: true docs/models/baseinputsphasecommentary.md: id: 3f7a31a54a46 last_write_checksum: sha1:d7446198ff18f611f04507532e135afca6784cde pristine_git_object: 0452529a42b66e900042cf8512ce4d3dec30534a + deleted: true docs/models/baseinputsphasefinalanswer.md: id: 13036fbac0df last_write_checksum: sha1:f8afd772534103160ffb77f7c28d5b60b8b53887 pristine_git_object: 90999ad71d3d93222b986ecec3f7f496151fae41 + deleted: true docs/models/baseinputsphaseunion.md: id: e66e71436e2e last_write_checksum: sha1:c8de7d135aede53da22ff4dc0fc96393c1aa9481 pristine_git_object: 55f42bc5f6b7ca6f7b467d4a0d30895e4a564ed3 + deleted: true docs/models/baseinputsroleassistant.md: id: 9a453e6e3fef last_write_checksum: sha1:c7927dfe823136f85afb70780544d06cc7c53942 pristine_git_object: b503a86ec09c06007ad5bc6df66790392197d743 + deleted: true + docs/models/baseinputsroledeveloper.md: + id: 83eb2643d288 + last_write_checksum: sha1:33cb470581abcf0668d92763361a9f7619ed0f47 + pristine_git_object: 545693eddb51403af4935a3726e3b68c56c89b26 docs/models/baseinputsroledeveloper1.md: id: 061f3a9a093f last_write_checksum: sha1:55704aef4c6ea3b02de2489ce2510fbb1bff6ebf pristine_git_object: 1364ec941eaac7b1c3248939f63efe176cbf6817 + deleted: true docs/models/baseinputsroledeveloper2.md: id: 97765303644d last_write_checksum: sha1:5fc3c51b359cac9ef15aa379c9d2a918e73f520c pristine_git_object: f4841e0ed781b47db7d5d97fedf7d75db3644474 + deleted: true + docs/models/baseinputsrolesystem.md: + id: efe2e0892905 + last_write_checksum: sha1:095f930d893b2d00d71591d503ed5ec12c2a682d + pristine_git_object: 9f016caacff9167b9173080f7ca331a90e358ccf docs/models/baseinputsrolesystem1.md: id: 776d0d7e748a last_write_checksum: sha1:069270699b91c9db6d18cd7701bc89b17c8e65b5 pristine_git_object: c1b7c0e617bfe17da5effe342d2de4be0d0049dd + deleted: true docs/models/baseinputsrolesystem2.md: id: a204cc35e292 last_write_checksum: sha1:8a660c86a8f459fd498dc45e4ceb71aa90b10976 pristine_git_object: 2ad2cab47e341c42e81499435f667b0a57ad7c40 + deleted: true + docs/models/baseinputsroleunion.md: + id: b69e4bb1d653 + last_write_checksum: sha1:81e0a7af94e67c2516f5d744e3c27ff37eaaa500 + pristine_git_object: 7cde7ec544019ea27a2705125fa527130973c6de docs/models/baseinputsroleunion1.md: id: 17522e5cd202 last_write_checksum: sha1:113962c2b3ae83a2c848063279172b1309453618 pristine_git_object: a7510dec0afc5529239f61ab2900df5b05328dec + deleted: true docs/models/baseinputsroleunion2.md: id: 0ce835fd7632 last_write_checksum: sha1:01870c191c36a9201fa633de39981e350b9d571b pristine_git_object: 89e28aff9e62dbf2b1e8e9ed06492415b40d91ef + deleted: true + docs/models/baseinputsroleuser.md: + id: c1f79580d33b + last_write_checksum: sha1:bc3a7930f828a0e9c9ab4f912778f2141fb107b5 + pristine_git_object: e3b2fcd6d3b83a88d08277d00cf3774e36672541 docs/models/baseinputsroleuser1.md: id: e6aee8cd67da last_write_checksum: sha1:d325d03d3779c606d224f6b836775952b5753123 pristine_git_object: ec0725bd76364ed5359b642aaf265dab1851266a + deleted: true docs/models/baseinputsroleuser2.md: id: 3d2ec25386df last_write_checksum: sha1:4e8d2988c9d651842a5a706477e4b80ac9c797b0 pristine_git_object: a96b9cc3dc64f050839916c06e617d787a303d15 + deleted: true + docs/models/baseinputstype.md: + id: 1916cc95348c + last_write_checksum: sha1:4fa09d3e3ad0ef017d2c63ec838ed7e87a718f5b + pristine_git_object: 65db0044d84508dae08dcef32f1615580e0e9e13 docs/models/baseinputstypefunctioncall.md: id: a2a86c705c44 last_write_checksum: sha1:36b47478e34cbca8173258fac7e84b38f51ff610 pristine_git_object: 42d85d0e01df34a14f5b50672e25e3082358845c + deleted: true docs/models/baseinputstypefunctioncalloutput.md: id: 3dcae4b37ef1 last_write_checksum: sha1:fa33559e9808060e451becbadc4a0f8b21406688 pristine_git_object: 0bb8fd06f73b5d1bea42ea7a256205aa84907ae7 + deleted: true docs/models/baseinputstypemessage1.md: id: 46f5e4b087f2 last_write_checksum: sha1:db7e17852d5c5469e0f9fe497a765650437c84e1 pristine_git_object: 09b3b474baf80176a336286dee6f40c54f6337d1 + deleted: true docs/models/baseinputstypemessage2.md: id: 0feff33d0040 last_write_checksum: sha1:4198b5597b447a676915aa9f7bb9ebb72245b938 pristine_git_object: d88208d2a75c2a8f4e7e5cb1ab0746f69eccf2d4 + deleted: true docs/models/baseinputsunion.md: id: acf51dd81540 - last_write_checksum: sha1:66f7da1f7fd6bca289746e92f08ff9b36c743271 - pristine_git_object: 4a58d9699b6609ed7296eb2c55423b73113cca56 + last_write_checksum: sha1:f44ff0c56acfc76d9c91154ec4c8a752e1ea4506 + pristine_git_object: b2c4cc8d276704635f2366ddff9ced99c6535a13 + deleted: true docs/models/baseinputsunion1.md: id: e083f1968ab3 - last_write_checksum: sha1:b9f08e0bc92198afed2c616397ea55166f447ab2 - pristine_git_object: 7648510ce73a0a4ccbbefb4f1edace69f015aa95 + last_write_checksum: sha1:d0f31a4afa9c58022a2e67c33f62e2d44cbdeb2c + pristine_git_object: 9dd4fa4c86a5db414018109dd270c05e3d2e533e + deleted: true docs/models/basereasoningconfig.md: id: 8308c44bb9c7 - last_write_checksum: sha1:fee455a7127694d6c198e4d470de659821b95f0b - pristine_git_object: 43c62a4eae3a194be213bd211b6bde6444193adc + last_write_checksum: sha1:a504443b302942f12579204e417e34ac95c413be + pristine_git_object: 4c96db94d9a095d9876a798e0f5a7dd539a9ced1 + deleted: true + docs/models/bulkassignkeysrequest.md: + id: 9cfb139549ed + last_write_checksum: sha1:8cf072c06dddf618729602465d28edb50f2adcc3 + pristine_git_object: f01f5fd0f6342b9ec9be7a26ebcb0eea2ae89c2d + docs/models/bulkassignkeysresponse.md: + id: f752ed631f39 + last_write_checksum: sha1:e87d6cb3cbfd2b4c7d316f11aed1ac695e5b08a5 + pristine_git_object: d61d4a1341f827f30d676490bc6729d78109453e + docs/models/bulkassignmembersrequest.md: + id: fb6fb3edd8f7 + last_write_checksum: sha1:44e40e4f80757491a7f3fa01b2f6e26635313893 + pristine_git_object: 9f798a29aff2c47b7f91c486b7b7ce1d842aa849 + docs/models/bulkassignmembersresponse.md: + id: eb9e5a0a2312 + last_write_checksum: sha1:66c0c86313e06b49941d8a5d0104637255b4e877 + pristine_git_object: 0a717fd0a9809127b9ea6e4fc2d648398cf3195b + docs/models/bulkunassignkeysrequest.md: + id: 711f5746cb02 + last_write_checksum: sha1:bca27344491ac4c5b1561f1a5b65f173015458bb + pristine_git_object: 216e599bd1b340ce77acd32c9cff8a2822015b75 + docs/models/bulkunassignkeysresponse.md: + id: 7ba9802caa8c + last_write_checksum: sha1:fe9561cbcc609c235f2b485cb83e19b0f14edb13 + pristine_git_object: 3bf8fc1c4ae35f7aa937cac31ebe702f14becd33 + docs/models/bulkunassignmembersrequest.md: + id: 2690f9ece950 + last_write_checksum: sha1:4e3a7ddc522fd6ba131329f605d41d4d2a6b2dc6 + pristine_git_object: 4f354ccbc14d96baa89ebdf49cefac3e15270a00 + docs/models/bulkunassignmembersresponse.md: + id: b08ccd3296bc + last_write_checksum: sha1:99f665fd768fd8862faa6cc708c317d2a7dd58e1 + pristine_git_object: 4e2e59f2e8fcc85c7bd610dd8f2d12aff6d4a518 docs/models/by.md: id: 197cbd9579c6 last_write_checksum: sha1:70cc2bb47d31c43c21d8da48a6cdbd24b2e2d107 @@ -249,550 +378,705 @@ trackedFiles: id: 400a7240e8c2 last_write_checksum: sha1:0813cddf0350d7885b906084988a79ace1ddea15 pristine_git_object: 380b74905beb105c6f4d6b58e60434a7a3135de6 - docs/models/chainid.md: - id: 9136f718f4f8 - last_write_checksum: sha1:5b28e1cc07ba022cb361fd06b77b25a2bdbee2b5 - pristine_git_object: f6f7a85f2de9a0bb24a92fef19b6c12e24551fff + deleted: true docs/models/chatassistantimages.md: id: c09d51959fbd last_write_checksum: sha1:ea0718a3034d9112be91f6829a0a94d531935b7a pristine_git_object: c3ac27e40389442014d362039da44b70ad19fee3 + deleted: true docs/models/chatassistantimagesimageurl.md: id: ddc051390239 last_write_checksum: sha1:d2707a6d525b605326b0016b899ccea992173b08 pristine_git_object: 325a8ef210e4ab01df026ae7c7b369a546ca57a5 + deleted: true docs/models/chatassistantmessage.md: id: 7183e8263eac - last_write_checksum: sha1:051ecc668f4260c1bc74d51469d871aa7197a77c - pristine_git_object: 335a58099a70cd8ada77262787ea4f87cc2c00e8 + last_write_checksum: sha1:784c1633de975091779bce1124b0f656a5621d08 + pristine_git_object: c93b157ab4436fc08a2cc4553a8a50c1d3d78fca + deleted: true docs/models/chatassistantmessagecontent.md: id: eb7111ca0687 - last_write_checksum: sha1:7f1f50336f994a77bf727e8d0b742730143c1265 - pristine_git_object: 646e268d2b91aafd84657201e6e4ed7c81c5d24f + last_write_checksum: sha1:3ce2a95277a877e8a1660a75a339223702c12d61 + pristine_git_object: 54efbdd6e1115a86a94e84a2701cf5661b87d210 + deleted: true docs/models/chatassistantmessagerole.md: id: 80d5950ad5fc last_write_checksum: sha1:28504531c242064359d094f7b93db8d07be6b46c pristine_git_object: a7916af1c109317cc4b9ad75e8039d4f0d229b37 + deleted: true docs/models/chataudiooutput.md: id: 9ebc5b960a48 - last_write_checksum: sha1:023918d05970ece32a4ce2b4e99672870516f3f7 - pristine_git_object: 25b0cd6e1530a4e2ac0d0c19212811ed83fb2b31 + last_write_checksum: sha1:696eda815c82fb8d19d8879e04363d481371e4c0 + pristine_git_object: e11117f247ec7a46e467d7a1f0a375783b6308af + deleted: true docs/models/chatchoice.md: id: 1c73299cb3ce - last_write_checksum: sha1:a01bdfd8ea4e1eb6cf3e0889e84ae042264a129c - pristine_git_object: b35269e0b70976d2b2219a6c92668f36b361eed9 + last_write_checksum: sha1:61302d7520bc356b5e9c17168dfa6922464c84ec + pristine_git_object: 0c1b8eb2e4a8372bb306cc0748d90501bd114117 + deleted: true docs/models/chatcontentaudio.md: id: ae93c434ad94 - last_write_checksum: sha1:75bf945a4cb2f09102e17033114578b743ce4c7a - pristine_git_object: 03ecf628a801e9b8740449a0a26aca4feec67ec3 + last_write_checksum: sha1:577b8170ba2ce6a00cce1534a015103388615e10 + pristine_git_object: 261e5a6a1ca6184833f1ea2d6e5e5e265f884a0c + deleted: true docs/models/chatcontentaudioinputaudio.md: id: a0994738bcdc last_write_checksum: sha1:c3703257f9b71191b94db56edb619e1568e86dbb pristine_git_object: 863921c43c27c80d8b3202922d36597f57de4454 + deleted: true docs/models/chatcontentaudiotype.md: id: 81c54a2ab2bb last_write_checksum: sha1:ae81710cf6ac42800bcd2b6f63aa54cc78a8bf01 pristine_git_object: 7cd7f21bfa44fc8121bb7bba5a558c4942bbda94 + deleted: true docs/models/chatcontentcachecontrol.md: id: be65fe916de3 - last_write_checksum: sha1:3e304760ddf2bd7a71ebcdf3203e917d4913fffe - pristine_git_object: 590ba7a5d2dfbf01a6e49b60de302a0bf66ce203 + last_write_checksum: sha1:eee91e623dd134d2228cc467e29398f6e06fed45 + pristine_git_object: 5b1b16651408ad607df299679a9d6281619af2b4 + deleted: true docs/models/chatcontentcachecontrolttl.md: id: 6690e8c159f4 last_write_checksum: sha1:cb75aa0d1ddc3b7fc37aa095d14ae8dab59087a3 pristine_git_object: 027ffaf2f4013baa7230313aab6585b740377756 + deleted: true docs/models/chatcontentcachecontroltype.md: id: aad5ec29e485 last_write_checksum: sha1:dd906fe90c66b306db25c4c959fa2ae271e44c44 pristine_git_object: 19bab6f36dfc9fee17e36aefac071a9481354a99 + deleted: true docs/models/chatcontentfile.md: id: ed3ac87a8e07 - last_write_checksum: sha1:b90298def4e209b5788fef3b1608feaf4f6f57c2 - pristine_git_object: 95f7300d9d83f4c1e7eb74bca64e5527d87f6d1c + last_write_checksum: sha1:d284c9bc3635b87f40b2ad613d623aac4eeeaaf1 + pristine_git_object: 1694a0dbbac92495dfa66dcef4b80421b7b2aeff + deleted: true docs/models/chatcontentfiletype.md: id: 4f9b3da2d6dc last_write_checksum: sha1:0a90e0081e912976a4daaa05a972fbcf1b3eb6bb pristine_git_object: 21976312659b8e35f6627b3dce26706f9e8ea687 + deleted: true docs/models/chatcontentimage.md: id: d9ee3295b615 - last_write_checksum: sha1:a222870fe804ccfc526fc1ea1d7c9e457f65ac9a - pristine_git_object: ac2723dfb38d8215f5bd3ff119241cd4fbe61411 + last_write_checksum: sha1:9648eba135f28a1f487b715a9ca402a26cb9cb56 + pristine_git_object: e47547456458bee815b9ab4373cf58597287619d + deleted: true docs/models/chatcontentimagedetail.md: id: e50ca4f20119 last_write_checksum: sha1:259941e6d6483ddca55edbe64ba580c4c5886ce8 pristine_git_object: a4a06559458beb10ead773fd5bdc549e97394356 + deleted: true docs/models/chatcontentimageimageurl.md: id: 5f969d5c40da - last_write_checksum: sha1:bf9fc53d7559ebb0312492de15128eb8e4ae65cd - pristine_git_object: 31bddc4f046db9f0ba1d28ded4f42e95b4f18d36 + last_write_checksum: sha1:f6d02ef756ca0225af0413a2af26e22e800eb486 + pristine_git_object: f064d06114e5e13a5add5561ee2d1eb7126dcb9a + deleted: true docs/models/chatcontentimagetype.md: id: 15e33559be57 last_write_checksum: sha1:f36bcd88dce5eb3c120a6ad3984860dd0d82b6e7 pristine_git_object: 2aee274ed6c4284bd18754101be643dbe3a13c30 + deleted: true docs/models/chatcontentitems.md: id: 2b67ca68344d - last_write_checksum: sha1:03de9e90ff328760caa80323411ec10910d8f0d1 - pristine_git_object: c490129bf088b2af43ae20de0ac07a85255aa85a + last_write_checksum: sha1:95cd35952264f258c7a5a723ea972719b4bb4f99 + pristine_git_object: 4db05626557b66c1d986d0e05426215d2fd684a3 + deleted: true docs/models/chatcontentitems1.md: id: ba0f7e56f5f3 last_write_checksum: sha1:e5e715d3018ffbabfb2674c7b98ef2337bf25e0b pristine_git_object: 4242e4e8e3b4ff56d349094a15912adc6323bb00 + deleted: true docs/models/chatcontenttext.md: id: 9ed3205c3b80 - last_write_checksum: sha1:5b82d87c54a0d7a4728b2e0cbf0561df3dc7b198 - pristine_git_object: 12ffddaeeeaacc33ef67548a33afb1c89ae2a442 + last_write_checksum: sha1:5c4dde75a4f1c89c84d709a54cbc81c35ee8e9ec + pristine_git_object: 9bb4ffd126df992f4f8f2216b3e631566e3e47c9 + deleted: true docs/models/chatcontenttexttype.md: id: 095f8e745e98 last_write_checksum: sha1:715267a812a8cde5b539b2469f2574a99822c6a6 pristine_git_object: fae9b886eb2931b469573e8c6261a7aaad7e0218 + deleted: true docs/models/chatcontentvideo.md: id: 28d1a1d78635 - last_write_checksum: sha1:2356750d5f22c399c403d6d4c540d28b80454210 - pristine_git_object: 5d982ef863ed8fe39945920275d66958e6a9b453 + last_write_checksum: sha1:0e272b80aabaa6192a8778bc674e3a24d66cb10a + pristine_git_object: 6c6fd5186a1e20a8ebf36487a8488ed5e3cb961d + deleted: true docs/models/chatcontentvideoinput.md: id: 186581db4164 - last_write_checksum: sha1:666145cd94a694faac718c3041fb5337519b1062 - pristine_git_object: a3acb71dae11977ce37f74c9b2eafc36b3c30825 + last_write_checksum: sha1:8c236fac0a92901a1c9a854711cec9a18d7f5da6 + pristine_git_object: 84423add9ff34de11da9812fff4fc0aa525cd239 + deleted: true docs/models/chatdebugoptions.md: id: a0327010956b last_write_checksum: sha1:863d3ac167a222b9aa7069e1700281b848a4d963 pristine_git_object: 59801095d923f244af573ff754f86e26319c3437 + deleted: true docs/models/chatdevelopermessage.md: id: c932a8fd1936 - last_write_checksum: sha1:5648cdce69537f0c7c3d4a36f12fb9b205fb485c - pristine_git_object: 2ab4ca0812abed0d2d3f19cd878c46bc6ecbba2a + last_write_checksum: sha1:4efd04854940e4685450c93b57d68794715056ea + pristine_git_object: c9ad23f61ae3300bb458da5490d928a7d72184d9 + deleted: true docs/models/chatdevelopermessagecontent.md: id: 886fdfa37017 - last_write_checksum: sha1:7188c0476d3dc26385dc2b1b26596d5106495893 - pristine_git_object: dad5c8fdd2551ca1104b06a77941c1e47f3cf77a + last_write_checksum: sha1:b44c6f7c55f315d909feb4a59d6e8326b707dcb2 + pristine_git_object: bf1193cfab1b1e2ce6ac06532ea9dec7245969a6 + deleted: true docs/models/chatfinishreasonenum.md: id: e1505acc0b8e last_write_checksum: sha1:ec0b406a290f6e5b6341b9b2355cefbab082c47a pristine_git_object: 66c27d7bdeefe5707d2fdcf0d2e031ee53993701 + deleted: true docs/models/chatformatgrammarconfig.md: id: 05f3819520c8 - last_write_checksum: sha1:758cd159dc61bc50244ed3eca6bc84cf46242fdc - pristine_git_object: a48b196e820ff1846f5c71b058fb275f5536d665 + last_write_checksum: sha1:75d9565e745882776e3f49aa6e890c8c93575c09 + pristine_git_object: c95afd69227e4ac7a31b3eaef7cbbb57056fd621 + deleted: true docs/models/chatformatjsonschemaconfig.md: id: b430f4bde7e0 - last_write_checksum: sha1:8de6148d93837bc8071570fc23ab378f5bdf54dd - pristine_git_object: 3c80fda2421183c5a78290b9133d368f4c6b74f1 + last_write_checksum: sha1:f7cc5c8e173047addf9389e4ed4fe51e983b46e4 + pristine_git_object: 37d8afdfa6b4a86d31a1c84f9c8989b977d8e1b1 + deleted: true docs/models/chatformatpythonconfig.md: id: 8650a845db95 last_write_checksum: sha1:1492819ee4917d08b502eec4922152288695ef07 pristine_git_object: 16dfb4b45661db38931ecdd0a45e7dec63e39d08 + deleted: true docs/models/chatformattextconfig.md: id: b36b2330c004 last_write_checksum: sha1:85ae62612268c4d4ac044465c94bb7bbd059bdee pristine_git_object: af9f0dc19b88fb85368f6c38a8cd887322bc7975 + deleted: true docs/models/chatfunctiontool.md: id: 5464656ccd20 - last_write_checksum: sha1:3826f62857b0966da674b711c0ebd01d29715cdc - pristine_git_object: e231f8368c6e4dd903a207ccaeb35cdbc89f0897 + last_write_checksum: sha1:f4ba9133089d782ce49bd2b70979d9121e7b2477 + pristine_git_object: 1ab302a1d98e366a849bd001aa44cf509a7eda78 + deleted: true docs/models/chatfunctiontoolfunction.md: id: 65b6def5d64c - last_write_checksum: sha1:15d0d2f33c7a52525ff64e1b7dcc90d38021c33c - pristine_git_object: 74ca5e2eb6e081d389062dfc077a2be383fe1339 + last_write_checksum: sha1:81df3aaa4027a07024ea00917b0efd6e03bfe23a + pristine_git_object: 1a619912404f5cc850679963e8807383fce93b0c + deleted: true docs/models/chatfunctiontoolfunctionfunction.md: id: c0d3d98968a9 - last_write_checksum: sha1:df3e1a9d2bafb997b2001a51d4ba7c3b0f83b414 - pristine_git_object: 0cb1726ca28b726ba7c19e3bb4a47fcedd496fcc + last_write_checksum: sha1:a83809d574adb95279e52958c542268a7932a69a + pristine_git_object: bfa137cc7a3abd403ccd1dd59b45b48e3286a9dc + deleted: true docs/models/chatfunctiontooltype.md: id: 7d1119d74cc4 last_write_checksum: sha1:3fda360ff77a99387a952dcfafb60d81f5318014 pristine_git_object: 1af1a528adacba7c893919c36d2e06f1384151f7 + deleted: true docs/models/chatjsonschemaconfig.md: id: 0ea6191483fc - last_write_checksum: sha1:6d457961a804322e0c9903489d1ecf6777834432 - pristine_git_object: 2f35fa9fc8b4449637808c46e9c923484cf5ee0f + last_write_checksum: sha1:a6170a86c181ac5b1870413bffb753c51a8c0c44 + pristine_git_object: d36654c6ee5fd9c0bd829f4aba777ff850b74f41 + deleted: true docs/models/chatmessages.md: id: 0b63fc7a8496 - last_write_checksum: sha1:16ba640e623d100adee367849d331fb4a93b2ac9 - pristine_git_object: bbfa6c22c107c26e1112e2eade0fbd9033ecbfeb + last_write_checksum: sha1:3ae37e4b478ab960e59bf09512dd292281737faf + pristine_git_object: b7a197409c54ba818dab86b572d9c1a932be4192 + deleted: true docs/models/chatnamedtoolchoice.md: id: 1446f8843887 - last_write_checksum: sha1:9be889f81bfbda6757dbea14556e7f11d167e159 - pristine_git_object: 1a7d55e173e1732bf36deb5130cc36ef49c1c0f8 + last_write_checksum: sha1:e6156e0158c88ebe6ca040c5fc21ca57d44ed24d + pristine_git_object: 6eaddd083af130dfcd786174e673d59f4f9dccd3 + deleted: true docs/models/chatnamedtoolchoicefunction.md: id: 0d61c766452f last_write_checksum: sha1:29134972707c7e1e83dd849b3f091ea0fad02d63 pristine_git_object: dcf2cf07f94a646a8124e8245a93fa625e1960a3 + deleted: true docs/models/chatnamedtoolchoicetype.md: id: 13cc495d127d last_write_checksum: sha1:1aa3d3d9e33edfdb03c16f9e0773e5abdbe61faa pristine_git_object: 46592cc4253197ef322348d18ee60a71c4870f2b + deleted: true docs/models/chatreasoningsummaryverbosityenum.md: id: f0d43bc42290 last_write_checksum: sha1:c9df2f340543cf63f1a5acdfe5fae334a7da5872 pristine_git_object: 20004462abfbb675672cf1623cc8200ddf0d63c1 + deleted: true docs/models/chatrequest.md: id: 81b65d713472 - last_write_checksum: sha1:ff348288c9ff2ac81960478a86a080e5c68e2f7d - pristine_git_object: 4fe1dcabaa91cfde194b4c2e075b737b157f7b57 + last_write_checksum: sha1:02ebaf8b63cc4ddc0715359bbe66aeb75196b26a + pristine_git_object: 8e38f2c560df2e4d815965a3d14e9eb413eb8d25 + deleted: true docs/models/chatrequestby.md: id: e3079b5d3b81 last_write_checksum: sha1:06b68e6b0bbc0d1355e5bc694d4ba44971ffc2e6 pristine_git_object: 0508858f9d0e439bf0a8ce5b401f1d8073d21356 + deleted: true docs/models/chatrequestignore.md: id: 9ae3d177eb67 last_write_checksum: sha1:dfb5bbff0c7a13bf62ecf6e3b92a4b8fccad8f0e pristine_git_object: d9e1fe36d37b6092daaa6f0e482948b9890654c9 + deleted: true docs/models/chatrequestimageconfig.md: id: 1724ea5e877a last_write_checksum: sha1:8371beeebe0320b369350350794158e1ea9ba607 pristine_git_object: f058a865d5918509c7830fa0fb1e5235d64f7f70 + deleted: true docs/models/chatrequestmaxprice.md: id: 53d179a2432b last_write_checksum: sha1:a2592b46684043aeb9e9369c4fe6e8de5406ae3b pristine_git_object: c435174d33b515427d389382d80b0bc818dd306b + deleted: true docs/models/chatrequestonly.md: id: 865fbcb293b4 last_write_checksum: sha1:759fac6a44a648b24a6c043917cd1edb701609dc pristine_git_object: 2c2cd0314e70638bf656aa5bef9b9b19697a04d0 + deleted: true docs/models/chatrequestorder.md: id: 52ea27914020 last_write_checksum: sha1:af7ce303caaf47278e8b374313229f5c275e575c pristine_git_object: 4d1b10bd5857a9379a8f579ebac403d46ce78029 + deleted: true docs/models/chatrequestpartition.md: id: f0d191b24288 last_write_checksum: sha1:6611d1d76f3531fa7208995d053c68e709bb1b6f pristine_git_object: 756a464e033605e18e5e798840a333aee5d80b82 + deleted: true + docs/models/chatrequestplugin.md: + id: 8e2669d582eb + last_write_checksum: sha1:5b0515a38da9821f787a6c2f198108c5d819879f + pristine_git_object: ea106c54d9058e0cb16ef1855ec5358675d144df docs/models/chatrequestpluginautorouter.md: id: 94290e027dbd last_write_checksum: sha1:3bd4d3cfefd24cf54aaa424510528e3c8b78664a pristine_git_object: 49b5aa3ba110b4aed1bcefd137bcd895597a4ca9 + deleted: true docs/models/chatrequestplugincontextcompression.md: id: 91a552b03f59 last_write_checksum: sha1:ecb075bf0fc0047d52af45b09e6d92c13a967aca pristine_git_object: 350a7cb718f4066b20914f68190c98c2920b2dda + deleted: true docs/models/chatrequestpluginfileparser.md: id: 953b2e8c1437 last_write_checksum: sha1:d6f1aabd47ad2f9bf884f8fec9c781035ead4c3f pristine_git_object: c5c2a0a949fc56487c7b587a5937fdd9277b1dca + deleted: true docs/models/chatrequestpluginmoderation.md: id: 4339849c9fd9 last_write_checksum: sha1:0d8e5f8267c19dedf2ba8a6705f250c72efa138b pristine_git_object: e225d69a18ffc6eb38ce8e05ee21ab42ad6d7c35 + deleted: true docs/models/chatrequestpluginresponsehealing.md: id: 2e45b2f5e51b last_write_checksum: sha1:e4e4be9623581505b6370516144d1b7e35541a8c pristine_git_object: 16886012d8c8f4defbd821e8072fa58e5a154c7b + deleted: true docs/models/chatrequestpluginunion.md: id: 06d1acde1a65 last_write_checksum: sha1:9203b6cdd5295fdf61abb89978ef51e2da62f979 pristine_git_object: 9c3281e2b39dfbcf16d1a6ea832f9b0d1f0433cb + deleted: true docs/models/chatrequestpluginweb.md: id: 9d7d7dd1cd67 last_write_checksum: sha1:eff0ac0f7a9c7aaccedc376083b048b4575657d4 pristine_git_object: b363b2adafc195c3ed60edee4fb7ad32bd7df27a + deleted: true docs/models/chatrequestprovider.md: id: 479c0daf3877 last_write_checksum: sha1:a65004d9ea5c6ffffa3124dc01774d915db00427 pristine_git_object: 1ae38005a253972592dc7c38f59569404c9e542d + deleted: true docs/models/chatrequestprovidersort.md: id: 9fe5934f0085 last_write_checksum: sha1:6e1b74aecb5be2e36d852404e1318fbd19f626b1 pristine_git_object: 4ea598346f9901ca0df733190ef38902dd436580 + deleted: true docs/models/chatrequestprovidersortconfig.md: id: 76ea601ce379 last_write_checksum: sha1:bf2f9c648ac4a6640ff9fd2423f819be7f226180 pristine_git_object: bca3f75b29b6728d805d4eb61bdd6045309b1c15 + deleted: true docs/models/chatrequestprovidersortconfigenum.md: id: e3260ad01472 last_write_checksum: sha1:448c2c5000e58a8705ba896adf0fa2ffc4d41a3a pristine_git_object: bb564f28a59b015e48d0f964f89b0b42e0c21007 + deleted: true docs/models/chatrequestprovidersortconfigunion.md: id: 7066e7001fbe last_write_checksum: sha1:f8eb881360919180ae2cb72c65aa348f5769a39c pristine_git_object: 157da7ddabe431c28aea5cc02764c5c24bc69e40 + deleted: true docs/models/chatrequestservicetier.md: id: 34b32ac1991b last_write_checksum: sha1:8e3a3d84e3163d84c9f2144362ab2469d68e016b pristine_git_object: 252c877081ff18a9f698bcd3c6be1acce8cba842 + deleted: true docs/models/chatrequestsortenum.md: id: 58a6a84f6912 last_write_checksum: sha1:b325b2c63ce97912e193283e08d83879b863038e pristine_git_object: 560eb308077fc21127bbd9356c2b07c1cb45ccee + deleted: true docs/models/chatrequestsortunion.md: id: 5846b744cca7 last_write_checksum: sha1:c076cf7d99f90cf6cd3d6dc10ff750d323bde777 pristine_git_object: d02fc997527895a67fd69deb187d6361122522e1 + deleted: true docs/models/chatrequesttrace.md: id: 623ac3d619ca last_write_checksum: sha1:4e02d5da4da198822abfa57d613a9ce813692eb8 pristine_git_object: 3be103f90a8ba605f03c7fefaa27282fe87bff3f + deleted: true docs/models/chatrequestttl.md: id: a2b1044184b8 last_write_checksum: sha1:c1ccc8e0ce7b1bd1d2b1f757eff820224e31064d pristine_git_object: dcc289ac71be56c1853b021f92a3f34f8c55d1af + deleted: true docs/models/chatrequesttype.md: id: e0523668907a last_write_checksum: sha1:5a8a8779f016473b6530ca28eb3cd9bc63a11ada pristine_git_object: 88845ea2d3c89602d808b722e7976fc34cfa8b89 + deleted: true docs/models/chatresult.md: id: 0d44370308d5 - last_write_checksum: sha1:a1a19bf4f19b8ca8d059388d754465369eae0642 - pristine_git_object: e4e33068f16d679d41fa2cd9fcaac961ab430d64 + last_write_checksum: sha1:1f5f340fcbdac4f7db33ed7310fed7fef2e96983 + pristine_git_object: a30294b372818f171285690e20fc74a26bf45160 + deleted: true docs/models/chatresultobject.md: id: e6a0284d117e last_write_checksum: sha1:b0e4eac18af6dcd0907c869b1d323e6eed87bf85 pristine_git_object: 380700030ded86637b308c8674491a5a8ab5fac1 + deleted: true docs/models/chatstreamchoice.md: id: ea07d9ed7159 - last_write_checksum: sha1:b3cc95a1863f023d5cdc70bf60a2db43a450eb83 - pristine_git_object: 0b69af76856bbf743c9ef749745ef6b77926e46e + last_write_checksum: sha1:f71b64f0213a7459d09f4d46053da9cf18c3621e + pristine_git_object: 0bec63a62eb190152b9630a424fc8fee27f2dd37 + deleted: true docs/models/chatstreamchunk.md: id: 0c99681ac5b3 - last_write_checksum: sha1:a4dd7140bc8d43eed9cb70594d920dbd3ae6c315 - pristine_git_object: e90533fb39c5c3b66803163d74140621cfd8cc6b + last_write_checksum: sha1:d45684e30dba6b159d7f888ef20bbe9bdf628520 + pristine_git_object: 0e9563bbb84bce0e31a11c673bec64e27f7e30a8 + deleted: true docs/models/chatstreamchunkobject.md: id: 94fdf18ada09 last_write_checksum: sha1:9076f861f8b32c866f02d483dd785c6f50c0d89e pristine_git_object: 7adfce1f27907b9a32a0ddbed694023bf2fcf54f + deleted: true docs/models/chatstreamdelta.md: id: 3eee7af9ae58 - last_write_checksum: sha1:0d55db1d159a0b5221ddf7de91292e5696f88a18 - pristine_git_object: 44b57bd231bdc836ac0aa6b58d86d9850b5833e9 + last_write_checksum: sha1:d7b6fe2f2b3252a19fa6abd992c4a6e819fa2154 + pristine_git_object: 69e298dd4116bc87e7fb13fae9bb5f7597294434 + deleted: true docs/models/chatstreamdeltarole.md: id: 791ab625450c last_write_checksum: sha1:9515ffdb2008f9df5b8af70c18598303e9adf251 pristine_git_object: 9641d0fbcd2b881c743fcd004c02b0077abb670c + deleted: true docs/models/chatstreamoptions.md: id: e423b323384a last_write_checksum: sha1:1da22c11da9de199208268493327242c36963aca pristine_git_object: 0c3c5436e35955fc7e2d946c2a4b409a894c2063 docs/models/chatstreamtoolcall.md: id: 0b675f6e8a8a - last_write_checksum: sha1:ea67ff1d1345be1739935726ec22270d78efc46a - pristine_git_object: d15dbff0a8b2fe820339a9123a8dfc233466f340 + last_write_checksum: sha1:1a721926e2bbf7ad1f709f258cfd65fb38e2c6ba + pristine_git_object: 216dd0e4a1948b710ff7a38e23313b404e326818 + deleted: true docs/models/chatstreamtoolcallfunction.md: id: 696bc1f14e51 - last_write_checksum: sha1:638874a82f8c12a4362f6ec5763323b000f0000a - pristine_git_object: 8752c2e3a63c2b65c1682c4a41b92b86d430ae57 + last_write_checksum: sha1:9815db94fed29f7601480510b9a9cfa6d46c3f11 + pristine_git_object: 39bf00660fe605ce53df08f97edd0d5f3eb958cb + deleted: true docs/models/chatstreamtoolcalltype.md: id: 26674216a0e9 last_write_checksum: sha1:011dbca33330354552271733797e5215ab52ba00 pristine_git_object: ea49d8f1132d419e8039daa2cf5c7832bbd63b5e + deleted: true docs/models/chatsystemmessage.md: id: 4c6b3c04e847 - last_write_checksum: sha1:2a171e116212e7a16eaba6cc0d98ebf4ad609408 - pristine_git_object: 5f05e81307a759aa8e9c749b419112e0739cdaa5 + last_write_checksum: sha1:7f4cc1279e6b84fa688bbb8d45d1dfd977600d37 + pristine_git_object: 84b1aeac0e33a41cb86c890416a4de4a2d3c708f + deleted: true docs/models/chatsystemmessagecontent.md: id: 6fc49770aec5 - last_write_checksum: sha1:daeb610d91f536dd36517384bac62b69b66453e2 - pristine_git_object: 0dc3fbc3f5ca79ec961991c15abda671b1013c21 + last_write_checksum: sha1:cfb5c588125e8ef603be816f3cb36b4b31704a41 + pristine_git_object: 2026a01bc5b8ae0b21ee521925d4b38b542fd2e0 + deleted: true docs/models/chattokenlogprob.md: id: cefb095379bd - last_write_checksum: sha1:44e7d67c14ba24025ac50a9cf9485737d88f6858 - pristine_git_object: 32368af3b21dccaecdf24f754fa1b6db997bab90 + last_write_checksum: sha1:e315e3d1ac9325d5eb9c6769d5eedeab3d0b8152 + pristine_git_object: 4922f2d47747e0da24eb48931fe2afc5378426bc + deleted: true docs/models/chattokenlogprobs.md: id: 72114cb6e453 - last_write_checksum: sha1:e238193c6178e5694f7e5cfe78324d2f8105ce56 - pristine_git_object: 3143a8161e0ea1f58974fa8230bd4372ad28469b + last_write_checksum: sha1:04d54d5c383b80927bdb2760576fd2acd9293690 + pristine_git_object: c64b8de1fe728f7d2418a14516849cbac2448d62 + deleted: true docs/models/chattokenlogprobtoplogprob.md: id: 02c2b452e880 - last_write_checksum: sha1:67d83c3a570e15b95f033e41fa0b30557f0c69e0 - pristine_git_object: d17cd5c1d133150c3a439ece79866386dae2e814 + last_write_checksum: sha1:6b97149284b8f7ddc502190fc8499b9cf254fa56 + pristine_git_object: feac50535a9c48aa460ce7336d2a1263b130482e + deleted: true docs/models/chattoolcall.md: id: e32eac40cc31 - last_write_checksum: sha1:df5b80e901d8c8b2a18c47d46e27040ae8f0aa9e - pristine_git_object: 1bdc3e3b0b02e4ec4d72a0147a0575c8404eec6b + last_write_checksum: sha1:ab19c146276bec100d1dde325e765bb3a77d1307 + pristine_git_object: 90e61f5155d1ecfe3a846231277099e530653c0f + deleted: true docs/models/chattoolcallfunction.md: id: 8917b0540676 - last_write_checksum: sha1:3c01cd8908c5ddc043ce9148b349f586fe3b316b - pristine_git_object: 28aa71ed64d926b04600a16df8fe94c09f289d0b + last_write_checksum: sha1:d1465af71d22615e1514cfdaa79630dbe32e6f05 + pristine_git_object: 90f798896e5cdfd11c64daf61aac582a793636fc + deleted: true docs/models/chattoolcalltype.md: id: 294d996bab23 last_write_checksum: sha1:7dba37da262b9b02373aa516a80067b94e797f3d pristine_git_object: 27b0113ffec2dd1d2ad31897472b94fb0fc5e642 + deleted: true docs/models/chattoolchoice.md: id: 8b2f3043003a - last_write_checksum: sha1:7a6f05a631b4f87d13ec2b02068c624145dac81a - pristine_git_object: f4315565fb0f47c20b535a7dcfa37235a43c495c + last_write_checksum: sha1:9195c18656fcca8159779469567ce9a508198f54 + pristine_git_object: 1aacd005bc9f6bd705c06d5607d21df5f28826e0 + deleted: true docs/models/chattoolchoiceauto.md: id: f1fc408306da last_write_checksum: sha1:4cead464f661fc3e6d6b01956f94aeac9bfcee8d pristine_git_object: df02d79282fb524cab03c8507971f321345a4dea + deleted: true docs/models/chattoolchoicenone.md: id: 734b70a1f742 last_write_checksum: sha1:cc09d803dead72fd32c07eab6038b0fe45cff5c7 pristine_git_object: 22d883e8607afe37868cb5a7fba4fa79c5bf5449 + deleted: true docs/models/chattoolchoicerequired.md: id: c71a1ec74f05 last_write_checksum: sha1:431b4caa3809caec115560df6993cb9974863dfe pristine_git_object: 49fd949218788e46a395ecac694e937acc1384d8 + deleted: true docs/models/chattoolmessage.md: id: 234d0b37f2b9 - last_write_checksum: sha1:741d26a5d4f4a53f32f7410db436d2830eb0f11e - pristine_git_object: 67df69947c80fc007ad33817041c05c2b85a8bc3 + last_write_checksum: sha1:55bb690cc172b4477b1b9ffe9d0edee3096967e0 + pristine_git_object: f68a2fa968844743833a067937a15801fc94a182 + deleted: true docs/models/chattoolmessagecontent.md: id: 2cad1522fde3 - last_write_checksum: sha1:c517ec743ebc3676eed013685126dd012cebbf33 - pristine_git_object: 006aac00aa366c86dd0fa8bc6a2a332389fde568 + last_write_checksum: sha1:b18ae1370fc6eff94dd71a8e24ef59449641a824 + pristine_git_object: 3ce6c0f1749fb2ac71e8121da07cb3f6bbcff7a6 + deleted: true docs/models/chatusage.md: id: 53822f0d32d9 - last_write_checksum: sha1:222162e93bbd3ab59d74227190b24b88ee82d111 - pristine_git_object: 4f3511fc1133eaf052056ec26bb887062eccb919 + last_write_checksum: sha1:dc9b0d26fb61b33628afa78da455ea4796474d97 + pristine_git_object: 2350aa9c55a3d4bed23b2a2110e98a12b65152b6 + deleted: true docs/models/chatusermessage.md: id: 721bf2927c29 - last_write_checksum: sha1:9c36d178dc5b19ed4a76243df43873de2059e6fc - pristine_git_object: a07a85d64f2d6e7e54809017775d86c3e78c7abe + last_write_checksum: sha1:4c6a97db46545a8ea12a3e5ef6f1bab2e634f8f6 + pristine_git_object: 940d798853245ea884e8990cd80bf009226c6007 + deleted: true docs/models/chatusermessagecontent.md: id: 3aecb0a1e44a - last_write_checksum: sha1:13ae2deb13119c9e7f65dafe2b02de7dc8011c5a - pristine_git_object: 923bee6d8c621967a019f62e56a640ae3873b91d + last_write_checksum: sha1:d3f8e077fb3d830e20cff8e4282197cd911826d1 + pristine_git_object: 9b9840147481afde342facd1ed79ff6c12b58265 + deleted: true docs/models/chatwebsearchservertool.md: id: 1ecbc02eded3 last_write_checksum: sha1:4ada6d5cd701199dcdd59302f93a19f3bd22798b pristine_git_object: 7c8bf44fe30a15730fd540ec42ba82d1cf6daa08 + deleted: true docs/models/chatwebsearchservertoolengine.md: id: 8cd22400ceb7 last_write_checksum: sha1:947e85137072b09ec80899355e12055f28dde1c8 pristine_git_object: 4855f8669cc0a420e529512a3a2c8f7312deab05 + deleted: true docs/models/chatwebsearchservertoolparameters.md: id: 4319c6a15142 last_write_checksum: sha1:3207e151168d1083661f26f353b9084e4abe5711 pristine_git_object: 6d3c1298e835b64dc5d384fdfbfd3a3e4345c3a9 + deleted: true docs/models/chatwebsearchservertoolparameterstype.md: id: b4986acc3235 last_write_checksum: sha1:126eb05fbcfaaa245019c863bb739015d1cd4b4b pristine_git_object: 36651f16fe9d746cc84cc5a4f68c92fabbb8d952 + deleted: true docs/models/chatwebsearchservertoolsearchcontextsize.md: id: 9a60544cf8db last_write_checksum: sha1:68f2e51047b35ddc8840f4c5a5136b7b09219623 pristine_git_object: 1ab32519d791b08ad1b7f152a7e33565e3f73627 + deleted: true docs/models/chatwebsearchservertooltypeopenrouterwebsearch.md: id: 809efe4da4c4 last_write_checksum: sha1:6a508fefeb44630f3bdac46e790e73dfe6b08002 pristine_git_object: b5396324f900515438241f43fcf000315cc8491f + deleted: true docs/models/chatwebsearchservertooluserlocation.md: id: 41056ef55d58 last_write_checksum: sha1:9abacd5b5f679db1c9117464ab09b7efe382793a pristine_git_object: bc65dc138bfabe90b9826d9618fcb374dd8d9339 + deleted: true docs/models/chatwebsearchshorthand.md: id: 815abb59b6ce - last_write_checksum: sha1:54b37c93fa4ff684f6a6a846a17e08adf601dfae - pristine_git_object: ad91fc71cc5c408b26fbe5122ed2537c7d0f9f6e + last_write_checksum: sha1:3f90181dfa1f97d6dadb9e26b2ae852919a23e00 + pristine_git_object: fb59ca82d229214843526f0b7459cc09fdc0b9bb + deleted: true docs/models/chatwebsearchshorthandengine.md: id: edf937b2a374 last_write_checksum: sha1:be9504c7959612c954d2600c6d1c59749827fc50 pristine_git_object: 28238a1670883564773a70127d1472015d09239d + deleted: true docs/models/chatwebsearchshorthandparameters.md: id: d8ab8b162b15 last_write_checksum: sha1:0c3a55223f42c909b9921437225b4bf993334976 pristine_git_object: d787b50ba707fd55b77ffa2fc8476f2db5187e10 + deleted: true docs/models/chatwebsearchshorthandparametersengine.md: id: 27b4ec2061e8 last_write_checksum: sha1:ccae95b0bb58668df10747efbeda27c091126d11 pristine_git_object: f4a8063211bef8a15f81c6c34d1eaf112898f341 + deleted: true docs/models/chatwebsearchshorthandparameterssearchcontextsize.md: id: 8758ed6143d4 last_write_checksum: sha1:3e07f7d769edba2fb0c49864d7ff57809c6f2e73 pristine_git_object: 38443010137a1ecdef17e99db8094b7875755bb9 + deleted: true docs/models/chatwebsearchshorthandparameterstype.md: id: 109fc1976183 last_write_checksum: sha1:44c2226b467ca348f4d769860dce6b59fc16fbde pristine_git_object: 6b73907b86b2b1b5126baca8642565cf79629bba + deleted: true docs/models/chatwebsearchshorthandparametersuserlocation.md: id: 4034b7949da7 last_write_checksum: sha1:e4bd481107efa8c6915f8b80d9f8c7f6078cfc4b pristine_git_object: dcec81aa7bef90f695dd4ec7c6f5e25eebad8cb9 + deleted: true docs/models/chatwebsearchshorthandsearchcontextsize.md: id: 6ad05d7b2150 last_write_checksum: sha1:821f635e077dda1d3b6f7c910c375657869e0215 pristine_git_object: 318b696263de1fc37a4a98bb856a388f5bb5c30e + deleted: true docs/models/chatwebsearchshorthandtype.md: id: 8db7de3008a9 last_write_checksum: sha1:038536cece2a66c98049db0374f7747c04501091 pristine_git_object: 18a054813aee65d6fe58199dd77b449bb315adf2 + deleted: true docs/models/chatwebsearchshorthandtypeapproximate.md: id: 518865dfed9b last_write_checksum: sha1:eda820c51b8f69ade84da2a9db695c4029a97a4f pristine_git_object: b3dc0b2110fa400218a195ef0f9b8ba2c68c84eb + deleted: true docs/models/chatwebsearchshorthanduserlocation.md: id: bea417a2ef83 last_write_checksum: sha1:160613d65968661a04d20916988df40e35144428 pristine_git_object: d1dc8b72233e239f357f994d0ca8040303b12ea0 + deleted: true docs/models/code.md: id: 2fcb3964c9c0 last_write_checksum: sha1:defee39ca71dbbe5599d5adb2509e1c8409a1e42 pristine_git_object: a133bb0c0ab264699b8d6ec253b563f7d73f04cc docs/models/codeinterpreterservertool.md: id: 64974f69acae - last_write_checksum: sha1:0990223b1e466ec66584e824d2326dc004ce5d18 - pristine_git_object: 90cda251066ec50e3043e81aaa92085f674d7324 + last_write_checksum: sha1:ab9c2f3751f72316b289618e88936d821d906cd3 + pristine_git_object: 17d80930c10e0d9a8cfe17bb10cc0161eae37b57 + deleted: true docs/models/codexlocalshelltool.md: id: dcdc7cfa229d last_write_checksum: sha1:c895e410c480eeed2da3394cac530cdf916b1ca7 pristine_git_object: 2192e21a2ef0483dec2d609204d4f236bd71e783 + deleted: true + docs/models/command.md: + id: aec40f6b6410 + last_write_checksum: sha1:d0150362d5acc3269d8d6cf7bd591177847cc6d8 + pristine_git_object: 766e9e123b3a45e5900aa5097fe826bac06b2856 docs/models/completiontokensdetails.md: id: 72beafa9a4c8 - last_write_checksum: sha1:ab7fd2fb62512d53b92921c238fa94460eb4934d - pristine_git_object: f5a794e0d74f3ac046e339d3f12ac56e364b8c20 + last_write_checksum: sha1:a4eb0ae32c4961e8cf07420b368b6e6889f6e9c6 + pristine_git_object: 2ec86eb2e3bf4dd37eb8975d2bb0c027faa3fff2 docs/models/compoundfilter.md: id: 627199c420ed - last_write_checksum: sha1:962b93f3a49a97912b063011837bf311ecddad23 - pristine_git_object: 34117bb825a00cd2a7a02a6fca13b27fae01def9 + last_write_checksum: sha1:2eab34c93416b913024d5c62d09fd639b826e68b + pristine_git_object: db879e5eed9951b5da9f8e26ffe79ad87a9b95db + deleted: true docs/models/compoundfiltertype.md: id: ef2e7d157a4c last_write_checksum: sha1:ab5bd855c1b4e116d8e20973e3e524a4f27f810e pristine_git_object: 2ff85ecf2693d96f336b3dc7bbeaef36e3083327 + deleted: true docs/models/computeruseservertool.md: id: 9ff23e71ba17 - last_write_checksum: sha1:a6642af7731409de3834f1b6aacdb2926e13df0f - pristine_git_object: 58dfa9f4a4257e44c0eedb79bf035cc495dcc0fc + last_write_checksum: sha1:4f64a0e98ddd9b5db2c39d69447e3e94c21f3798 + pristine_git_object: 8808fc3f7843e6d81e4a8df71e45af88a587f945 + deleted: true docs/models/conflictresponseerrordata.md: id: c41b32b38525 last_write_checksum: sha1:b6b9961b8d49b1e3271953aca606ed3f5e35dc80 pristine_git_object: 1a8c387fbe2a0ab6ae27abf5d8e667f131cebb26 + deleted: true docs/models/connectorid.md: id: 29d30b8a8e3f last_write_checksum: sha1:b5fd5485920e74585dc741dc64016a2123cac50b pristine_git_object: f52952ac5914a33fe4b55f08c399c6edc36965f0 + deleted: true docs/models/container.md: id: d907521490d4 last_write_checksum: sha1:ffcdaf92e947f03903955242ecfcad4dc20c323a pristine_git_object: 399dbfe1e9e176f8450afa69922ad0628709d655 + deleted: true docs/models/containerauto.md: id: 9e3854e3f695 - last_write_checksum: sha1:f91f7657994119efacb99d6ce95c84c95e5c8cc5 - pristine_git_object: c3849da3cc46269fc62bb33bb22d42ea312c5670 + last_write_checksum: sha1:f45669b0ea39af28d644150f8a7c91595b76c817 + pristine_git_object: 390c28aabadac5f8f5f77aa16344ec4dd134e2eb + deleted: true docs/models/containertype.md: id: e49331791929 last_write_checksum: sha1:20ad66281225915ab779d00d5566addce4dd498e pristine_git_object: 4b56db201b3ae06afe6bd3659ca0969f4dee8074 + deleted: true docs/models/contentpartaddedevent.md: id: 9b321cdad488 - last_write_checksum: sha1:0bf7dfab9a90d2f08df699e8237e3096d399a37c - pristine_git_object: c96ca639a818f376f8e4627d9b60af35b47186f5 + last_write_checksum: sha1:b02768fc94a9754644fc2d84d5b6630af1214516 + pristine_git_object: 274b7635125cd2e20bb3da12926a7907c8e90ce4 + deleted: true docs/models/contentpartaddedeventpart.md: id: 80acab269c1e - last_write_checksum: sha1:11cf3e4c3d11cd0393c85f6e8002187cfa264a1a - pristine_git_object: 56f31c7a5a965b5d36a178693ceda33864d7a672 + last_write_checksum: sha1:6482f0da0817edd39ae0d39e7bd56811032feb54 + pristine_git_object: a4d12f287d71b9dccf97a3c1b5c9dfbbf6c8cbac + deleted: true docs/models/contentpartdoneevent.md: id: 8f6585c42867 - last_write_checksum: sha1:0914a694b29d6e101f762d605282bc013fbbb442 - pristine_git_object: 9f68262195e1d5910bf19d0e033fe940e950cd5c + last_write_checksum: sha1:d9f8907e4b202b0e2306e74bb14647cb1ffa799a + pristine_git_object: e99d259f5ce5870b1601c00a4ced3738332f784d + deleted: true docs/models/contentpartdoneeventpart.md: id: 5705cf728d04 - last_write_checksum: sha1:95c2600e7be7dc5a6a9767a7dca0b95ca2a76c0d - pristine_git_object: 4042f2b213707c36bcdb465aed09de72e6d631e4 + last_write_checksum: sha1:a1bb78a11ae7f9f289e71beb2d272a8fd852288b + pristine_git_object: 8e4921e26c8a26048df72ef9beabe017fcba006f + deleted: true + docs/models/contentpartimage.md: + id: 70a0d0187fcf + last_write_checksum: sha1:fb2934ed38c3f9d43fa21fab491231b718f38c19 + pristine_git_object: 9ce1c7b7477c8b2eebc6afc89c2c4eead58b9557 + docs/models/contentpartimageimageurl.md: + id: 8a2545659913 + last_write_checksum: sha1:ff84e72349b3e989c949527cb40e87bbc248f49b + pristine_git_object: edb6761e1d77b4295a86a09f3cb061f012816899 + docs/models/contentpartimagetype.md: + id: b4407557a380 + last_write_checksum: sha1:0961e1e1843544903ad3bc4a199ce9b0bf475732 + pristine_git_object: cbff09457e71e742b5365b2392b75aafe546d26e docs/models/contextcompressionengine.md: id: c70d46632a91 last_write_checksum: sha1:0b4ceaf9569f9af29844ed5a324f886daf7bb70d pristine_git_object: 52167978e886bfda0a13c99624e3d828806b0d35 + deleted: true + docs/models/contextcompressionplugin.md: + id: 3382df201c10 + last_write_checksum: sha1:9f9bfbbb448422a1285febd5bd2e002b4dac01e0 + pristine_git_object: c134703f5c60b5107ba58e851e70a278d033820c docs/models/costdetails.md: id: 35e3d2efb6b1 last_write_checksum: sha1:8e70b5ef0b5ff86b63dd487ea4cbabe9e4488c71 pristine_git_object: de05fadab79ab6725ad396c4d279c1159d06e146 - docs/models/createchargerequest.md: - id: 31dc6bdffc5e - last_write_checksum: sha1:3a19c2cc0781ae2b694a7fb2adf84f88011c4ad6 - pristine_git_object: 096fdbbc5d7d27e79223f32847a83553b83fb75b + docs/models/createguardrailrequest.md: + id: 414fbd831d11 + last_write_checksum: sha1:782d9376146589630037b7fa4c795ea234b150fb + pristine_git_object: 747c87da61aee68a339f761a895a08c5834023b4 + docs/models/createguardrailresponse.md: + id: 1479b9a825eb + last_write_checksum: sha1:4e471581e2d456d8af8d998c590e88923362b897 + pristine_git_object: fbdc996fe3aa67c60ed9d9c35538ccf59ca1cced docs/models/customtool.md: id: f64ed08d154e - last_write_checksum: sha1:186c21f4e45c51db4ea92eee5c065b1ab9b6fc20 - pristine_git_object: 6e5adee8918f3d73aab9d290809493f6c21f6bf8 + last_write_checksum: sha1:c104cbb8ef454a854cbaa7c9c226e474f9db72c1 + pristine_git_object: 70ec847cf0b0ae6e9a189f533f57d443e44eed48 + deleted: true docs/models/data.md: id: 9a31987caf78 last_write_checksum: sha1:4fa53da7aeae62c5764776d770c6673e4d9536d1 @@ -803,76 +1087,101 @@ trackedFiles: pristine_git_object: 7f48f957385c3217c1826ae501ea8ef10f0092bb docs/models/datetimeservertool.md: id: b02ea2e59c87 - last_write_checksum: sha1:a10955c041a29aa49c4a69e4c9e5965d51cebfca - pristine_git_object: afd798ed7a555ae889f0942b46978db2deb5aef6 + last_write_checksum: sha1:bfad59260102a65c226e7e81c38bcc5e8c9e224d + pristine_git_object: 50fa45b890bf1f2ab7e542ae13b7d0975bf72076 + deleted: true + docs/models/datetimeservertoolconfig.md: + id: 82baa64990c3 + last_write_checksum: sha1:07541862268ee5e28cb2b2591edbb2e01056f7c8 + pristine_git_object: efabd30a05743b4c356b33d94e194f4e951052e6 docs/models/datetimeservertoolparameters.md: id: d6eec048a057 last_write_checksum: sha1:82ffcf0abd98727c87bdfad71460c1c77cc0cd2f pristine_git_object: 885b1342f492a4ee0c3d2a7160d168af3465f3d6 + deleted: true docs/models/datetimeservertooltype.md: id: 4d7dc7ea5c5d last_write_checksum: sha1:908ab0823a1c81787514ba73887b0378af00dc4f pristine_git_object: b24b71a719e9df16551212634b2de564cbbed6f6 + deleted: true docs/models/defaultparameters.md: id: 91207995478e - last_write_checksum: sha1:8aead0a16b750025f3e18b89d01ae1e4656272f1 - pristine_git_object: 2f1254ed0b2b36b3bec078d9e424f15ebfe3997c + last_write_checksum: sha1:87e375bdebf31d05199b15468a852b798d22a324 + pristine_git_object: 145314b4934466b55115043d9740cb7463a9da59 + docs/models/deleteguardrailresponse.md: + id: 05f4687c17a8 + last_write_checksum: sha1:95402c85e77872b9ed21065327e36e15099cb9c5 + pristine_git_object: fa9dd3ab29160d841c0dc6ea0b1d8a34767e3503 docs/models/easyinputmessage.md: id: 7c507bc95e89 - last_write_checksum: sha1:c9c591c21de52e2e43aa52212af84f5388993031 - pristine_git_object: 4cbf62ffa0b9224842ff5f39ab1a631bd33dc6ae + last_write_checksum: sha1:185990dbdfc02f48f4cf08b5ea5e6bef6754497a + pristine_git_object: d39a2b26544a5cae4550f44777617b3d2a62d164 + deleted: true docs/models/easyinputmessagecontentinputimage.md: id: 0d738cf1e85b - last_write_checksum: sha1:be12a1899586ca057a7a6bef17a4ca3a1881effb - pristine_git_object: 9902780935292ef2d7fec6b8f3e496ef8e5a769c + last_write_checksum: sha1:1326b0b42962b8880716d3afe857bbf23972e3b0 + pristine_git_object: 4f30b35acee087d2148be7ebcd68b8169f771941 + deleted: true docs/models/easyinputmessagecontentunion1.md: id: 20255ece2c78 - last_write_checksum: sha1:5bdb3f58649a0bb29a7b06badd60462ed9caffc4 - pristine_git_object: 1c4756ff342aa64a33551fdf6f79bf8932acfe54 + last_write_checksum: sha1:36fc3dc8d71978344a81e900d5afc5ee6cca82ac + pristine_git_object: 59a731650034c9511c5daad3fef67de805fba79f + deleted: true docs/models/easyinputmessagecontentunion2.md: id: 3abe383b2198 last_write_checksum: sha1:672dc3c9b53178fb11bc6702770eb2b021af3e6a pristine_git_object: a31e9d22e1f63175da0de9eeb7031e895110f8c0 + deleted: true docs/models/easyinputmessagedetail.md: id: 9b8dc53191eb last_write_checksum: sha1:e58782ec5c86b3586ea9fde6cea240b57fdba9e3 pristine_git_object: b6b46b2aa29141d021cc522eb2f812905bc8e529 + deleted: true docs/models/easyinputmessagephasecommentary.md: id: 1ffb2feb570e last_write_checksum: sha1:0fa70a063b10fe6cfdefb95f0a1c822a2ccdb073 pristine_git_object: ab6335c33256d7c62a8bf7fb3eed08a292aaf251 + deleted: true docs/models/easyinputmessagephasefinalanswer.md: id: d050d4c9d2f6 last_write_checksum: sha1:96bf4b7cc88d38034800f4932a8a691ebee00311 pristine_git_object: 5a7b407bb0f921ecd88c03275238233705d67f36 + deleted: true docs/models/easyinputmessagephaseunion.md: id: 659d62dcbe9d last_write_checksum: sha1:ff2986626b0e82bb5f269d06e1f06a7abe37143e pristine_git_object: 0f638be8ed6f848b53091da64b4c0fd506f54594 + deleted: true docs/models/easyinputmessageroleassistant.md: id: 95060a902d90 last_write_checksum: sha1:787d7c8f5a994382942c576aaf995f11326108d1 pristine_git_object: d6064bcf8b6285214d0d0a9109e0e5ae2ca71e47 + deleted: true docs/models/easyinputmessageroledeveloper.md: id: 3789686f2889 last_write_checksum: sha1:b26346f45a49f327af4b8b306861d2a7b31c9196 pristine_git_object: 6708ac48b90ecf93bed879b225aff6508378388c + deleted: true docs/models/easyinputmessagerolesystem.md: id: 0a1d624cc48f last_write_checksum: sha1:fb9821ae99ce825c94746969afbd07c0a4f70f1d pristine_git_object: 72f827be946bec241dedeeed7d13021a1a33386a + deleted: true docs/models/easyinputmessageroleunion.md: id: 54abd941e262 last_write_checksum: sha1:e015742fe13825d41567c1ee92a83f74aa362de9 pristine_git_object: b65b99f28a97f8a5826d2da97055b02f18b7422b + deleted: true docs/models/easyinputmessageroleuser.md: id: 15b0981412aa last_write_checksum: sha1:8f61edde1a9e5edb1bc2605583d9cefbe4bb910b pristine_git_object: 1e43f53024237d1c8ce2ee712dd94f4253721d3c + deleted: true docs/models/easyinputmessagetypemessage.md: id: dc1d1c3c6876 last_write_checksum: sha1:cb4d8a20e7b0e833e9cdc91872aeed40dbba7f7b pristine_git_object: 054cbc2bf2d8edd48ba69b83a0e75e36cc03a75b + deleted: true docs/models/edgenetworktimeoutresponseerrordata.md: id: fe26057fc099 last_write_checksum: sha1:f7704a9bacd44a03bccc6e2da0d9e3882cf5da16 @@ -889,10 +1198,12 @@ trackedFiles: id: 6a34665c56a8 last_write_checksum: sha1:9569ddda4b469fa5d583f568d541a53880e94c4c pristine_git_object: 87f1a23d2cfd5e5fca130f2cd642ef684510172c + deleted: true docs/models/errorevent.md: id: f53be1a711b8 - last_write_checksum: sha1:2bd68a7464df5e77647e502488b33edb2f5b5085 - pristine_git_object: b8dbf8b639466726970cc43e2272b616939a4214 + last_write_checksum: sha1:157945b17fbdadd60d477d87e6d9936dd3ab78e1 + pristine_git_object: 285de8302732493b2831018740280de6679f1218 + deleted: true docs/models/errors/badgatewayresponseerror.md: id: 0abbce1892eb last_write_checksum: sha1:eee3402a9874f0715c05cc9d7e05fb12f3abe21b @@ -905,6 +1216,7 @@ trackedFiles: id: dfa7a1e4c341 last_write_checksum: sha1:685c60ee01bb3fbfd69aa101decbcdf9166472e6 pristine_git_object: 0ab1f6283950af9e7d9243d1ffcb22a759a90954 + deleted: true docs/models/errors/edgenetworktimeoutresponseerror.md: id: c59578401a13 last_write_checksum: sha1:b3e22fe213270e8001d99fa00f55f42f61fedea4 @@ -955,124 +1267,198 @@ trackedFiles: pristine_git_object: 605d25deff53f7a3e3291a7f8973b8bae4ddf4ef docs/models/errort.md: id: 30c48d365f28 - last_write_checksum: sha1:bafe558ae11fb613584cd4ea64f473127fac5dbe - pristine_git_object: 60ef38cc99e56bc0c64ef5d48b45852af98f6328 + last_write_checksum: sha1:43faeda6da7277bedad89cdae55430764abaa890 + pristine_git_object: 45064a571bf14941b94132b0630c0abdd297afe9 docs/models/filecitation.md: id: 8bdcd41d649f - last_write_checksum: sha1:26035a10a5ac9195ad1ad36980c6c2f0e9187976 - pristine_git_object: adfa205a63e7874c6201e591662537d9c92ec2dd + last_write_checksum: sha1:7d07a0a455861c4f184ba6709766be81126c3ed3 + pristine_git_object: a2768b94d70809956bd7a66a81f74894c72f0bbe + docs/models/fileparserplugin.md: + id: 07f43b4c1eb5 + last_write_checksum: sha1:5cd9d277c2fb7ea7976e8e549932747d1df5fd2f + pristine_git_object: ab0e6ec1ff1a5e4dbb930c5da8357ecd04acc787 docs/models/filepath.md: id: 631b7692556d - last_write_checksum: sha1:86e5dd38e3b26b0238814697cb6ce5086f5963cc - pristine_git_object: 1401b28fe26e4bfce1b2e72765d431185f919ae8 + last_write_checksum: sha1:d1ea03ae58a0059828aac3a758f10ee3c11d42d7 + pristine_git_object: 000b91cf091b75b2c1975eb5aec482f5247bcfb0 docs/models/filesearchservertool.md: id: ac4394b96aa7 - last_write_checksum: sha1:5f78908848c8d0e9f0068f0260eb141d63faeccc - pristine_git_object: 9b797993894cfcb1a43dbc039c5747611dae6d75 + last_write_checksum: sha1:3fbe7b7e8ed47562157a75e29c88ddfc2233714d + pristine_git_object: 9174f8a354f0f2d6b6edfc999ba6a6e9f6b265cc + deleted: true docs/models/filesearchservertoolfilters.md: id: c489b49b04fe last_write_checksum: sha1:cbe7f1bfeb69779e39fdc36a8bb5842083e5b871 pristine_git_object: c4a49976571cf24e5a86f59ad3bb775ce12a915b + deleted: true docs/models/filet.md: id: a3e5d1b56bb6 last_write_checksum: sha1:a24284687f9cb271852b26a4e2b9e4be3cd0c597 pristine_git_object: 5a179500118afed0663a9d98323d84fbf1c15052 + deleted: true docs/models/filters.md: id: 1370bfdd2199 - last_write_checksum: sha1:ade7a511f4eb63b44fa6e2ba77f7b66c6faa7fea - pristine_git_object: 609fe81492b07e8a1c3240662ba903356aab70d2 + last_write_checksum: sha1:525f80977743e949bf0668a619e4865921e863a9 + pristine_git_object: b75a8fd694cd63818e4f11b52fed73952505e0be + deleted: true docs/models/filterstype.md: id: db98c2c52aa6 last_write_checksum: sha1:8aa9b0f0d688da52422aa779fb109da9e8e753c0 pristine_git_object: f64f2f839dafe818dda0a17f8e60833a3e34e083 + deleted: true + docs/models/filtersunion.md: + id: 1b1f385574b6 + last_write_checksum: sha1:2b1d541df7e049731907be74ce84857ed1368f93 + pristine_git_object: 9b0bbd903f570ba074b28378f23b11e503b60c3d docs/models/forbiddenresponseerrordata.md: id: dcfaa46a8072 last_write_checksum: sha1:cbc76d78110922926f151f33e467c2b9821fb505 pristine_git_object: 35682871fd89355f201cd3a4fee14d6e86c39405 docs/models/format.md: id: b5610092256d - last_write_checksum: sha1:5283b707d7844d8c8c9acbe3c1867f16b873a556 - pristine_git_object: 9eb17e0b444ea849e508a97faecc627b2f97ea94 + last_write_checksum: sha1:bcf2b1ef1aa839a00483bc68d9513ea8b9f68096 + pristine_git_object: 975e6163f103ab118b3fc00642717315e1e18532 + deleted: true + docs/models/formatenum.md: + id: 4d443dc702e0 + last_write_checksum: sha1:7a8d68b70b9d7c300bd14cf2801b03392af57f09 + pristine_git_object: 25dbcf70cdc2f8dd25eee7c98cbb3c6aff520624 docs/models/formatgrammar.md: id: dbda5ad4fee4 - last_write_checksum: sha1:daac2d887a5d63050e180b847137cd453f284604 - pristine_git_object: ee56de30d84e97a6d6d719e35380551cebd12d68 + last_write_checksum: sha1:5ebfc958ce5d4f3812a1cadcc5addb51087990fe + pristine_git_object: bd409f186a032a69d10bb7f2a7d47f195b3bfb0b + deleted: true docs/models/formatjsonobjectconfig.md: id: f07eab6a171b last_write_checksum: sha1:af9c8a8558b04b322ce8c4dfed464361b7db43ba pristine_git_object: 8adb6b83cfae3a90a57286cfee0300e4ab0b59df + deleted: true docs/models/formatjsonschemaconfig.md: id: 7e71d363d9e1 - last_write_checksum: sha1:c60a42d958fc21212c61b154bc9438b4d83b3f42 - pristine_git_object: 635936e3e3eeb202785205be37c52046539d6375 + last_write_checksum: sha1:1a7da795f03af099d194e92b443160d21fa3ccf0 + pristine_git_object: 152b8eb9cdecf571c4f6713e2d0cd92d14ede5fb + deleted: true docs/models/formats.md: id: 3577b171a72c - last_write_checksum: sha1:1133c7d3f831688cc27c2a87c621a09df28ab4e3 - pristine_git_object: f3c6940d504f34463bac38dc425c9b149effca6f + last_write_checksum: sha1:5c8e27751ed9c582eaa827dcdc99edfcc9726350 + pristine_git_object: c51b0b67f2082edf29caa5b7f395b45b6a1d6088 + deleted: true docs/models/formattext.md: id: 0ae418225de8 last_write_checksum: sha1:02ca8658ec162050be0f26775259d35559f5852a pristine_git_object: 416429d8d86b2c3c628142eabb813bd82c7331ad + deleted: true docs/models/formattextconfig.md: id: 612ba03fc6c7 last_write_checksum: sha1:614dbef7cabf93f5968d378085aaf89eada9580d pristine_git_object: b80b193e233f424ca80da8601f1a22d367f3eb47 + deleted: true + docs/models/frameimage.md: + id: 11967bf2160a + last_write_checksum: sha1:0ddb837222a919fb496c4357d99d87d559535a62 + pristine_git_object: 2a8c5ace672011f5c52013fa887dca7a0ce09cd2 + docs/models/frameimageimageurl.md: + id: c0573081b944 + last_write_checksum: sha1:e591090c22f0ad3b9f8ed601cb3f8fc738e23e79 + pristine_git_object: 4343bbd9739c841a89e6f304f851e8b31a8ad86f + docs/models/frameimagetype.md: + id: e218dcbb5c44 + last_write_checksum: sha1:33ba5eefb0cf02244c4c91ba0ea436d668efa33c + pristine_git_object: adccd779a70860889fccd75fdd8e84e90802d9ff + docs/models/frametype.md: + id: d17c1f0808ba + last_write_checksum: sha1:f46a7f31fa5652d54c1f8fc93db8d6fd8152b71e + pristine_git_object: 797815038787145e7fc41058e44bf5671df887dd docs/models/functioncallargsdeltaevent.md: id: abcf083f706b - last_write_checksum: sha1:1fecdc5756675930b16bd9dae8686badaf561bbd - pristine_git_object: 9c62b97fc66e63c0d53b1fd25e212771c23d5856 + last_write_checksum: sha1:20ae217a26f1ec698fa694ef2037ac12e763dac8 + pristine_git_object: e04242492e93fbd09c7f749b1a2b12d47deda413 + deleted: true docs/models/functioncallargsdoneevent.md: id: e821af2efced - last_write_checksum: sha1:b21a9875405b133ae9d0645c7a41501bc7f5011d - pristine_git_object: a1091dc72c89489e18236fcd7bca6cae0deeadb8 + last_write_checksum: sha1:1ebaa276097123893f770f55e0197594a9b91cc5 + pristine_git_object: caeb286d675f01c2d161d79c8131563cbb760726 + deleted: true docs/models/functioncallitem.md: id: 0d56c7f07d36 - last_write_checksum: sha1:2c7a8d89d86e7cc71077823c03ac7c8a7e02b88e - pristine_git_object: f4064b5e9d7bba669595fdcccba4a358942861e2 + last_write_checksum: sha1:bab118fc631cd93bff5b987aa22f52e9b742cf64 + pristine_git_object: 4ac86ae4eeaa63d108b8e54647e06670703585a3 + deleted: true docs/models/functioncallitemtype.md: id: 0cb9d007e8bc last_write_checksum: sha1:ea8b0b0528817a13c8d2d682b5804127a5ad9a88 pristine_git_object: ad56ccbcfd0e328c983602b7107c1734c2a83000 + deleted: true docs/models/functioncalloutputitem.md: id: 517286c0629c - last_write_checksum: sha1:ef7d5efc41d61404a6646206db69940bebac920c - pristine_git_object: d127cb967e450f0ac71e74be60f92f5cfbadd36c + last_write_checksum: sha1:babc6ae6e33132d9135f0716c751e0ff62f0c0c3 + pristine_git_object: 0bc43972f69b4981d5e889550eaf2df00e3941df + deleted: true docs/models/functioncalloutputitemdetail.md: id: da2267e98b10 last_write_checksum: sha1:f4132ca1591c03675621863dcc26f822ea8c8f02 pristine_git_object: 24581d880fdadcb46110448403a50124fe430fd5 + deleted: true docs/models/functioncalloutputitemoutputunion1.md: id: 975065c6b1b3 - last_write_checksum: sha1:204f7c568f1e9d252d9b93ffb00b509dd0eff1fb - pristine_git_object: 02410bb06501ccd5aad93fbda4c6e58bf1b4b1b3 + last_write_checksum: sha1:d7ce0087504bbe3e9e3248b71a9facfcfe7d7dd5 + pristine_git_object: f7a15901c626c62f019344b04a35ef6f392bc761 + deleted: true docs/models/functioncalloutputitemoutputunion2.md: id: d64888f1f012 last_write_checksum: sha1:02069d4b7ece68b6bf5ee1da1fd0e149e8df85ea pristine_git_object: 255bb9650ae1192c54eb3be151037c2cd6bbce58 + deleted: true + docs/models/functioncalloutputitemstatus.md: + id: 3890e23d3275 + last_write_checksum: sha1:3fd7f861c200c32c99ea72fbc5e6dffb2bd817f7 + pristine_git_object: 2baa9f1f3a96b8a64a06b3eaa46758a3836233bd docs/models/functioncalloutputitemtypefunctioncalloutput.md: id: 8557f647116a last_write_checksum: sha1:542cd34a5b9cafb0ac5dca2e01861b4b6f4c098e pristine_git_object: 8f53de6914880a8a034a0b60aff8b120d034eefc + deleted: true + docs/models/getguardrailresponse.md: + id: 3590ce9e2938 + last_write_checksum: sha1:ceed41f54033fec5eb58132db3a89698bf160e0c + pristine_git_object: 85cd68bec88818f6e79b5c1f72412c269f7aa69b + docs/models/guardrail.md: + id: 34d09568ab25 + last_write_checksum: sha1:a9bad4a91f19dc1e46a968e7e8976930137fbe6e + pristine_git_object: d6d4fe871a04b0b56730ca2bdc47b195634757cd + docs/models/guardrailinterval.md: + id: 8efefeea83d1 + last_write_checksum: sha1:6e8b5b17fa686c0d1108867095a9a7f8bb072802 + pristine_git_object: 824021efc78f489b0c8c34604b38df51ab2f90d6 + docs/models/ignore.md: + id: d1a0635b9cf0 + last_write_checksum: sha1:7a8cc427b44e4a856a9bbcc9792c143602b7d975 + pristine_git_object: de9c31d0011f3289444fcedac3c33a113d512cf9 docs/models/imagegencallcompletedevent.md: id: c31cf621765c - last_write_checksum: sha1:e61cd6e589010239001bf691c021bb31c6e8ff57 - pristine_git_object: 4b5e80a8b59c4b3779b1183ee586f5e0edc21546 + last_write_checksum: sha1:720adab39fc55b26bed45ac804ba6da6aad9f259 + pristine_git_object: 362e8df9dc24aa253c8bc6655dab575cbba1f08f + deleted: true docs/models/imagegencallgeneratingevent.md: id: 5b1e4a3a9e25 - last_write_checksum: sha1:09571b7c98b7f1fd370a69d59dce0e6ffa26ee3d - pristine_git_object: 77fce2055e074a55992e5cf3666d8dad9a79b680 + last_write_checksum: sha1:ea2c95d9fecd11fba2cb7d0df7feb0ae24399631 + pristine_git_object: daa1b64426105edb52a0bd523dcaf33e60fc8af8 + deleted: true docs/models/imagegencallinprogressevent.md: id: 51e4b2ba497a - last_write_checksum: sha1:cc753123f1444500a3ea66f88036b144864d26ff - pristine_git_object: fd93f24e6cfd7108edee4034af86ea942781af92 + last_write_checksum: sha1:cb5350d0ead66d650f4d812375d4ba78154eaa94 + pristine_git_object: b6c85678a23404a2cb1b90ae34bf8fc97983a1f0 + deleted: true docs/models/imagegencallpartialimageevent.md: id: 675108c6b0ba - last_write_checksum: sha1:b8ddfd212d9cc8314576254a7f0d980b55cbb001 - pristine_git_object: 794bf4b4c9594580c3ca5fa5b23212fc2f13b4f0 + last_write_checksum: sha1:4f1c4066647893173de03aef97f482007b990b24 + pristine_git_object: 0f3846648a49940fb530efb247b64f322d76a59f + deleted: true docs/models/imagegenerationservertool.md: id: 025e7df31fc2 - last_write_checksum: sha1:5d1921eb4f56ca78a7461e71a1b9d2ab24461271 - pristine_git_object: 2dd6e14c239597165a8566455a46c5d330786313 + last_write_checksum: sha1:68863dcb06bff9792b69aa9428ddc4d27c5f29d1 + pristine_git_object: dbbbc9fc749b99862473e31ee8ec5a8930d54cbb + deleted: true docs/models/imagegenerationstatus.md: id: 3d5a75816868 last_write_checksum: sha1:106443e9fd0a4d5c4a557697ae7bc40dfd8c8702 @@ -1081,226 +1467,310 @@ trackedFiles: id: 70e90cfe66f5 last_write_checksum: sha1:041a856de2ef1adaaea37f5c9593b60ccde12f31 pristine_git_object: ee8d2ad746d116b7ad7b553dbd946cafdd9f2630 + deleted: true docs/models/inputaudio.md: id: cf8d2935b1e7 - last_write_checksum: sha1:77587b1bd6f9655a05f70ff96f9fc701709c4347 - pristine_git_object: 8ce4b838b334d0e57e0f1dcc5ef6cf71bb9efb64 + last_write_checksum: sha1:67705e55f656fc0d94a4ab3dd64dc7b18224bded + pristine_git_object: 73f131161d9fdf778538f3007dfe09183067f2b7 + deleted: true docs/models/inputaudioformat.md: id: dbd07924c0ae last_write_checksum: sha1:9794664a5ec3c5e2b730900b5f781c3c32ab89e1 pristine_git_object: 2963708be20103059fac937356b03d4161969217 + deleted: true docs/models/inputaudioinputaudio.md: id: f0d13f50558d - last_write_checksum: sha1:8e5fd44fc3e6d8d42de1502419284819b312ce8d - pristine_git_object: b7d9813877158eb7cff4565e6523ffb770c1dba3 + last_write_checksum: sha1:ada9800494d5bbdba3d8c1d27f93733a8b07fd71 + pristine_git_object: 0916b09094805d820c61036127f43af50fbbd403 + deleted: true docs/models/inputfidelity.md: id: f19e94e3f06b last_write_checksum: sha1:0c773bdb0e02c5a69c18773b159b396e434af484 pristine_git_object: 5d438b4f51887e66be8944f718c79cf18e6fbd73 + deleted: true docs/models/inputfile.md: id: db8f99e35e60 - last_write_checksum: sha1:8c65cad403c666f4beb8d28077a9f30e70729cee - pristine_git_object: b4912a2e5ff7164d430e083132b93452475942ed + last_write_checksum: sha1:f8c56d5e61362ab1442b4e5ded67ac69da1478c2 + pristine_git_object: f60fb74b150b28047fd09f14cf6ac2d9a74bc855 + deleted: true docs/models/inputimage.md: id: c9300a1e6b52 - last_write_checksum: sha1:c8578346ac976b262177884349f90172966ff2b9 - pristine_git_object: e13ec85e6fb0b06e5e2c2c8266e6ae665183d8e5 + last_write_checksum: sha1:6e1ef099e4b31e42e3db9428a15607bb0444bb04 + pristine_git_object: a83ff64184896e803d086240fbb2aa793ed54ccc + deleted: true docs/models/inputimagedetail.md: id: 7555b2528217 last_write_checksum: sha1:5982dd8535bd5476822e71f4703fa40db35ed25d pristine_git_object: 852f51a8e00d54e993048aaf6784211920c3690b + deleted: true docs/models/inputimagemask.md: id: da2fa5a8c52d - last_write_checksum: sha1:5bf96254cf2126f784c49c63a4007943a2085fcd - pristine_git_object: 37eb5a598b6a3d767520af4585880aa62cf7ef4b + last_write_checksum: sha1:273d3b94da878618d3ae0de01d840d47799f13e1 + pristine_git_object: afb0fb9ae581584939c862ea59590391363becf4 + deleted: true docs/models/inputimagetypeenum.md: id: 0cca56846e94 last_write_checksum: sha1:1a7f77ccee3d3c7962de40074df4a2bfc35cdf2e pristine_git_object: c41966304ae65cfb472674905eaf287316690944 + deleted: true docs/models/inputmessageitem.md: id: 0976fdff24e2 - last_write_checksum: sha1:97ad17285a600edd8cc03435ba69d0bc8af41481 - pristine_git_object: f57130f7d490ba7e7a9209596d4545b2138e1997 + last_write_checksum: sha1:fe9324e3fcde5a0b804061279e78589ccbaf2503 + pristine_git_object: 9880f2e1d473a0ed842b0ab64531753aacf0b8a8 + deleted: true docs/models/inputmessageitemcontentinputimage.md: id: 3b3861b949f0 - last_write_checksum: sha1:b52848d4cd21809c279e3c3d405b94cbc015805c - pristine_git_object: 6dea2147cf501b04f785b05e2e0d3ce2bbe7c7e5 + last_write_checksum: sha1:bdae2afaaa3df722e82fad698ee61d0006b988e2 + pristine_git_object: a9af25d822eed8245d6a0047df0142289f1a27fb + deleted: true docs/models/inputmessageitemcontentunion.md: id: 4d54d2e34259 - last_write_checksum: sha1:a35b18c55c38acb627ba00c1df5d3418bcf6f3f7 - pristine_git_object: d4120ba433064e8dc3a32438b3eab727baf0a199 + last_write_checksum: sha1:96dfc8da4cc91a47ebc141ab327422a2d56c2e90 + pristine_git_object: 5cba94019870af3a9abb3ca3d89d9ef689c934a7 + deleted: true docs/models/inputmessageitemdetail.md: id: 23c96154652f last_write_checksum: sha1:6336ad8fae5361bfc235d16f25179524824ec8c4 pristine_git_object: cf1d7eaf0ce989222e6a6972f9e5b05e6667e2af + deleted: true docs/models/inputmessageitemroledeveloper.md: id: b2cd0f387e9f last_write_checksum: sha1:91c2f06554399c9868492c2fdbc5fa227218a2d6 pristine_git_object: 079e9463ab5812b5a1320797d774bc27d9cbe79f + deleted: true docs/models/inputmessageitemrolesystem.md: id: bc54bc2dbcb4 last_write_checksum: sha1:07b73b2d54cd94fa41a59e9134f61465de78bf6d pristine_git_object: 46a39f3abab91d38bd14b9c1557839f153eb424f + deleted: true docs/models/inputmessageitemroleunion.md: id: 9b80b0fe4145 last_write_checksum: sha1:367ee535d83a047a9df74163b278c28ef58d9ab0 pristine_git_object: 24c0883a36dd482119d0dc4ff6d17f1a7c049786 + deleted: true docs/models/inputmessageitemroleuser.md: id: 7a3e8708095d last_write_checksum: sha1:5f528fc49f4432c54c487ef7e240d2d819bb789b pristine_git_object: 5d0343758eca8da3150521b70f490ba019565843 + deleted: true docs/models/inputmessageitemtypemessage.md: id: 2f4caff20dd5 last_write_checksum: sha1:4e1ac95b132b4438155230308ac59f201c3b852c pristine_git_object: fc0b1f76775f38f3b45cfbb5705c17f7c4777e64 + deleted: true docs/models/inputmodality.md: id: 4f5310c12bd7 last_write_checksum: sha1:b941e5fb0c5d144b0f7c3fcd46fe52cd1c3772dc pristine_git_object: 3557001f2dfd21ae4069d857fa7871b3e7c55541 docs/models/inputscontent1.md: id: 470acf42a211 - last_write_checksum: sha1:c6b9852ca3443c430ab5c648dcfaba527615f7b0 - pristine_git_object: 7957b1ade095f635e2408156aaee1f9335716a75 + last_write_checksum: sha1:d909c8eb38337fdc1d5d391ed9d50e07a567ab08 + pristine_git_object: d62988a5079d44f1f5a28a3e6d2e23f545f46860 + deleted: true docs/models/inputscontent2.md: id: 8af933e3ed7e last_write_checksum: sha1:4b999aa042a2baf9291a4dd675e41fe3bb9b49ab pristine_git_object: c9ac45798157a2bc26089240e303068292f83b87 + deleted: true docs/models/inputsformat.md: id: 45553776d069 last_write_checksum: sha1:43f4427e2be1b9390f987c9c15b9efbd781043df pristine_git_object: 326cf82fd1d40842f2e529e75b5376f8945c35e0 + deleted: true docs/models/inputsmessage.md: id: 174dcada287d - last_write_checksum: sha1:13ca1e7630feea326540d83e4089043b6b2dadd6 - pristine_git_object: c4e44d92982dbf003c7be94a5603b4a51a2cbacc + last_write_checksum: sha1:829b9d29756dc2e3902c6aa750c79f12d6993e3d + pristine_git_object: ac04d7a717c7a6f2958b297a287ecb0bd1eaee1f + deleted: true docs/models/inputsphasecommentary.md: id: ed7c63e1a8c2 last_write_checksum: sha1:4f37be741582ea2a4a1a1d7628b78fcee0833142 pristine_git_object: 8e1be7c64cbd23fce77959f9d3aa7fccf9454eea + deleted: true docs/models/inputsphasefinalanswer.md: id: cf6c15ea1c93 last_write_checksum: sha1:e848af881ab0a159b3eab8a0afb1bf0acf84e860 pristine_git_object: 8866b952c5fffcd3fd39460d05a95eaa17ebc6e4 + deleted: true docs/models/inputsphaseunion.md: id: f20a6a9667bc last_write_checksum: sha1:a8e4edcef731ac607a552b7c2b4b3e8e95f58059 pristine_git_object: 5e3d463d4b7f502e5ab46c656c83dd67602e1c7f + deleted: true docs/models/inputsreasoning.md: id: 4d6ef00413d2 - last_write_checksum: sha1:71b2abdef56b30bdc26393ff9d3911a44f6fcc81 - pristine_git_object: 25ae462cbf86137ff8cff34c1fb7bca63e3dd126 + last_write_checksum: sha1:03f22fda74fb5b13fb17854429021f7ded6a347d + pristine_git_object: f2a45852c9b590922a8d26d782e64ced2900dad4 + deleted: true docs/models/inputsrole.md: id: 207902dd0555 last_write_checksum: sha1:e2d2e6caf4284014770d4fc11398c3a7e813e6b9 pristine_git_object: 4bcef2ca3e89ef708dcff025927b7e4cdc0c9d95 + deleted: true docs/models/inputsstatuscompleted1.md: id: b2d119fbb483 last_write_checksum: sha1:4a51b4ed7363799e6b05626feffe95b7f54f5b12 pristine_git_object: ab3e34038f193c47045134e34433ace5a3328941 + deleted: true docs/models/inputsstatuscompleted2.md: id: 015b6cd25829 last_write_checksum: sha1:e5e4c6c23189a6719dc726a58d7523add19604c4 pristine_git_object: 0fdf5d1d4622f4b3a25dfe5b28d3b8c2c8fc0b5e + deleted: true docs/models/inputsstatusincomplete1.md: id: 00270c98f595 last_write_checksum: sha1:0185666b4848fd50eaac5116d4768ce828a9f48d pristine_git_object: f5dc69b86673dede5e1e15b3cc40cd0b7ab8633a + deleted: true docs/models/inputsstatusincomplete2.md: id: 60e88fdab426 last_write_checksum: sha1:edc1499e9f465ad79b84f3d8dca5c2026adddea8 pristine_git_object: 78c8a93a0bd9a9ead093515d406ff4f71741d971 + deleted: true docs/models/inputsstatusinprogress1.md: id: "599788084910" last_write_checksum: sha1:28a24387f2f78961ff0c773740a93f5c10329787 pristine_git_object: b806175786e67ac8cda792801ce632f112079d5d + deleted: true docs/models/inputsstatusinprogress2.md: id: 23a49ae636e0 last_write_checksum: sha1:bcd06e32be54c5064a6e1a283d9badcbd93dbb7c pristine_git_object: 6c480d787883a3f79a85ca6d10a1a8511c07ae20 + deleted: true docs/models/inputsstatusunion1.md: id: 11fd63ab5194 last_write_checksum: sha1:1958609ef5dcfd47f4b8dee4ae725c68324ca73d pristine_git_object: 028ddc2a32163162e7879c315d2815b78a05eb4b + deleted: true docs/models/inputsstatusunion2.md: id: efe9d5065c2c last_write_checksum: sha1:6ea2f10ae1124d0dd109dce810a70229a2c1c898 pristine_git_object: adebd93b4bba58387d254b0b51bf01832c2d3d2c + deleted: true docs/models/inputstypemessage.md: id: a393265a6dfa last_write_checksum: sha1:4066fbcdee6743e58ffea2cc8f9e55c7f99b26dd pristine_git_object: 13d7ade6722e8e67ce3f55e1b9af04c112896e21 + deleted: true docs/models/inputstypereasoning.md: id: 14919bdbefc3 last_write_checksum: sha1:e4ac9202ed2be8d7c8d59c9fd4e29b465a4d58a4 pristine_git_object: 1ce1841aee4a40bbfface41b1d1c1ad23abdf1a4 + deleted: true docs/models/inputsunion.md: id: 3572c7c873f1 last_write_checksum: sha1:d4f44f4105828ca1d00722740db2ba82e53a6807 pristine_git_object: e3c6069d5df56ad5f14e6084dbdf926fb1dc5004 + deleted: true docs/models/inputsunion1.md: id: 1109bc1aa0ce - last_write_checksum: sha1:a874cc7b61b7551d42f9b4f9111b81f372a09bfc - pristine_git_object: b1cbe25582ee96f7ddf8e472a7b13fd9af6f787a + last_write_checksum: sha1:8729fe91ca60e4293c80bb7c09709299f223228e + pristine_git_object: a3599362492ac49e774f43ebeffebfee98f68fb0 + deleted: true docs/models/inputtext.md: id: bc941fd800e1 - last_write_checksum: sha1:e2e1aaa2bd28e42bbaed83435bafb2d7ddff00df - pristine_git_object: 13c746b3ba5f6f9b7db1f33fc49f8d8fb424547c + last_write_checksum: sha1:3b6f4c9eb68c3769cc71805d63a2997c54551130 + pristine_git_object: f2b34d3a06ba8eef553a74647a37516404a25c68 + deleted: true docs/models/inputtokensdetails.md: id: aeba2f6d934a - last_write_checksum: sha1:8f4755ef4194ece4c90a579096f438cf60aba09f - pristine_git_object: 613d3c8c9f8f51d002ac072ddb6528ce7aa43ca3 + last_write_checksum: sha1:81cabb0d43c5c8f3136a629ee6eab1eefe30e350 + pristine_git_object: 5887fac29e66e54eecb904a403da4da78b9d5e2d docs/models/inputvideo.md: id: e77bc875f265 last_write_checksum: sha1:d1f710b7075f9dc4b763dda8f9ffe2454ea28228 pristine_git_object: a4ba35835e8373625039f8a665119b632c17e644 + deleted: true docs/models/instructtype.md: id: 0c91ef9ec655 - last_write_checksum: sha1:097484db35061eb9c2fa3524dd8928f78ec767b0 - pristine_git_object: 4a40bcdf172966e4229e7953af35c5f4dda02b1c + last_write_checksum: sha1:a75a31551a3d9665720ff87c7138c979aff5ce3e + pristine_git_object: d11ac515c58b4131244321a773914949fbcf46f6 docs/models/internalserverresponseerrordata.md: id: 8111b3241977 last_write_checksum: sha1:e51036fa1ff86fc102ea8a785702641184b92725 pristine_git_object: 241d4b4d64511a03e3c4020ee846404471276f5a + docs/models/keyassignment.md: + id: eae3b7f94631 + last_write_checksum: sha1:0a13620352e1b359afb68f090da186796b845af8 + pristine_git_object: 506536bcd4bf0feda9e1486869a120b48f64ad73 docs/models/legacychatcontentvideo.md: id: 4148479c1517 - last_write_checksum: sha1:febe219177feb25b845a7c16ea24c29c33e175c5 - pristine_git_object: 7dd690503141b315f0c4bc7bd973a5c146df9ffa + last_write_checksum: sha1:1c920c2925e80431c2821aaabed619c0b819c778 + pristine_git_object: b7dca8d8e6d80942c24a2cd86f38ce74d23484ce + deleted: true docs/models/legacywebsearchservertool.md: id: 445abacb3b60 - last_write_checksum: sha1:6fa520e0afe16a6abc0ac3bbeb5fe5c13b94e06b - pristine_git_object: d2ca04cfd1051917f77647e46662a380e2960c54 + last_write_checksum: sha1:9d3c108dcad8e3d3d2063193bfde8a8b3b760996 + pristine_git_object: 6b21e99f3f55030e591ea53283e7bd8873237ec1 + deleted: true docs/models/legacywebsearchservertoolengine.md: id: 975467dac273 last_write_checksum: sha1:0498027543cfa04d590fc3cee97e0eb43bd0efd1 pristine_git_object: c1afe4a10b11b78a0f2d3cfe03f53d1e673f6c84 + deleted: true docs/models/legacywebsearchservertoolfilters.md: id: a6479ee9e854 last_write_checksum: sha1:60965606ff0714ef7e2897e997ed2445cf7c7efe pristine_git_object: 0189ccdba959ad5aab959a27dee4355cc945ff7d + deleted: true docs/models/listendpointsresponse.md: id: 538591337ba9 - last_write_checksum: sha1:9a4e2b9a93404b04e1e0561301420b173597e514 - pristine_git_object: 1dad57e0665ff22e5b9c5fe223e11626eb69d8d3 + last_write_checksum: sha1:3fd3b7c3ebb95c9e2dbf0d0f7dd106bf59732a8e + pristine_git_object: c4154d69daf2af63ce7fa104cdf26beaae4492a3 + docs/models/listguardrailsresponse.md: + id: 0696b16e9857 + last_write_checksum: sha1:6fb89bcf7cecddae9ef069a3ead0c7d617d55e41 + pristine_git_object: fff2730798c977b47e38c0d403d0c62fa8809d1f + docs/models/listkeyassignmentsresponse.md: + id: 792b40d31626 + last_write_checksum: sha1:8d7f810a932d0e05049927c2b5ed85f4d72b84d9 + pristine_git_object: 9d7f4bc72e7d959b44851f78dbb4a10dbc4af620 + docs/models/listmemberassignmentsresponse.md: + id: 0c693860c64d + last_write_checksum: sha1:b736b06c241bcde9b51b027f8da9131924475fb9 + pristine_git_object: 89ec8286bc07fb746411a051558a925ce4ffc91a + docs/models/logprob.md: + id: 5a2841eb9a83 + last_write_checksum: sha1:e168873eedea5b8b34a4a3dcc57d3886e4e0b2cc + pristine_git_object: 39c6eed21c84376cc9964a771f65ab7ae08f305f + docs/models/maxprice.md: + id: 7c7c9e7845a0 + last_write_checksum: sha1:7a31b171912ad5c6c9445a83888487d78b9e112a + pristine_git_object: bd5d6b190ac29e04ee89ac3871b951768ae90af1 docs/models/mcpservertool.md: id: 4c735771a7c0 - last_write_checksum: sha1:439392ee5fbe4bb701cbff45ce9c407449bd67ba - pristine_git_object: 6ceb5639e614bf6c46803da2fc25d176e4f3cbcf + last_write_checksum: sha1:b7e2fd360421f405bdf6fbbb7b56910631715e52 + pristine_git_object: ba08ff840b960317125ce8dfca4fb0a5a0ccbb35 + deleted: true + docs/models/memberassignment.md: + id: 0f0ea1ec8d2d + last_write_checksum: sha1:a198c01f019b363e0168f0e6f1cbbd0cce1fc772 + pristine_git_object: 0a8e1d17a2372dace95b516033b437fdeb75d653 docs/models/memorylimit.md: id: 811cdcd7930f last_write_checksum: sha1:ec0cc0aa0c86e1697f81b75849e4792b3d627a41 pristine_git_object: 22151bbc6c8251649ffe06f3c376f27af289ec24 + deleted: true docs/models/modality.md: id: bf9d60290081 last_write_checksum: sha1:8c6813e57875127c5fa7d7fcf5b86936eb9b6895 pristine_git_object: 1e2c07095ece0a141bec26a98bc8c9fd551b4c51 + docs/models/mode.md: + id: 568581cb28bc + last_write_checksum: sha1:9993aa8d6bb2ffa08c792a132e5533c6f55e16e4 + pristine_git_object: d270cf6efcd865ad6e3be70448541a3f7f8eba33 + docs/models/modeauto.md: + id: 903a198fe9c1 + last_write_checksum: sha1:251a936757329b5cc687ab6bf0fa18f8d7069893 + pristine_git_object: 57cc76f774a90c068b57c93918357394fcc2e20f docs/models/model.md: id: 66e0236ac289 - last_write_checksum: sha1:813a4bec928cd3caa3029e29e92108abf34bd936 - pristine_git_object: e493176e5fe7424d4a926d63b71cbc45dcf9a386 + last_write_checksum: sha1:f89d5859e05f2e048722fc6a4095ead771a7ce40 + pristine_git_object: 4d2da1d1813d0588fb89d1a26ed45cd33e99dd68 docs/models/modelarchitecture.md: id: 7eab960e8441 - last_write_checksum: sha1:b0fc4a5562c42268752c5da883ccba22e8294b93 - pristine_git_object: d30a0bb374a6710fa876841bcbc5e8aca93bef6a + last_write_checksum: sha1:722c920e474bc5ce757280c8a80406dfd484eee1 + pristine_git_object: 9b310ad2860278b54718895208faa55c94961b9f docs/models/modelarchitectureinstructtype.md: id: 9015c2ad9d20 last_write_checksum: sha1:4a8f3e2afa200c9993885e34aaf6abf87f7fbd1c @@ -1309,42 +1779,117 @@ trackedFiles: id: 2d6430130374 last_write_checksum: sha1:87a6e43b54a694be02e78ca441ffc973da49364f pristine_git_object: ad7c671e5264ab34b0657bc2f55daa25f5873d3d + deleted: true docs/models/modelgroup.md: id: f8bdc830b8ff - last_write_checksum: sha1:e90ab3a289eb0015948fd808e776c518304807c4 - pristine_git_object: a2c121bb2349d3c077c44ba55b31a039ac817754 + last_write_checksum: sha1:e33e398671117f5f53d2c7ce5f776435f11a0c1c + pristine_git_object: 008f07052aa9314adec00885fe5f17536195b85d + docs/models/modellinks.md: + id: c1a81919d772 + last_write_checksum: sha1:8e3c5086cc05069ab69d345756c9252083d8df94 + pristine_git_object: 32656664b666779e69bda03853e9c0b75271db6e docs/models/modelscountresponse.md: id: 1b997e3738fa last_write_checksum: sha1:77332e0a1d5fc3dcaa2ce64133e0bc97bfd62a10 pristine_git_object: caf9b9a3836f505f002c7dd3779708165a5c2d7d docs/models/modelslistresponse.md: id: 62180dd98256 - last_write_checksum: sha1:b647f2ce2c4b1f38914220821183e83e61df2a2d - pristine_git_object: 30173e6226f406ac4599db10fb486904167e3805 + last_write_checksum: sha1:1c5260cdb49dad8f9c35bbbc67fe99477b865021 + pristine_git_object: 940006ffd986795c86d2d19100e943446b32e88a docs/models/moderation.md: id: ace7cb4ee27c last_write_checksum: sha1:bcd2fab3a1355e3cb37ce2963f22e061c6b012b4 pristine_git_object: e2105ba17ae82ebd6b3ee33e6513bc1d436d4792 + deleted: true + docs/models/moderationplugin.md: + id: d765c5137f42 + last_write_checksum: sha1:f206a8b53e63df5453dff2d33a3ce1f6828f6ebe + pristine_git_object: 29700d0ad8f07ee323ab5af925c805de0a838bb7 + docs/models/moderequired.md: + id: dce983759d07 + last_write_checksum: sha1:740e5b5298a8dbe4cb033eb43d0d093daaeb2d7d + pristine_git_object: 0b0aaefd76b7cb6debb4d80b613441d536c734cd docs/models/never.md: id: cb9bec97a0d2 last_write_checksum: sha1:8aa370da73c412b9a13cc0d437eae126c0e5a977 pristine_git_object: fda3bdf69a1b5a69d7f0dcedb82f725fd35f11b6 + deleted: true docs/models/notfoundresponseerrordata.md: id: 757633dd768c last_write_checksum: sha1:c11ecb97bcefe57923f48599d0eeaa6ed34d750a pristine_git_object: 4221a4ffa9583b10c4acd0c2f67d1d8372ba1f95 + docs/models/only.md: + id: 04e4b0af8d68 + last_write_checksum: sha1:3a5193a104e908925e90c4806cdcd1035a61dc9d + pristine_git_object: c42022058a2175b13a734014ad50802729508874 + docs/models/openairesponsefunctiontoolcall.md: + id: 4ccd469fbc78 + last_write_checksum: sha1:71cad41f48660cc4ff562af8ffeb612cf31438a9 + pristine_git_object: 73c8832beb74444fc56fc4225103a40b59de5abe + docs/models/openairesponsefunctiontoolcalloutput.md: + id: 7188829dbce3 + last_write_checksum: sha1:49c73c0d70c8db811db18bba781cbce086f965e0 + pristine_git_object: 662b10927983a5ad6a4007715b353db62f6bfb0a + docs/models/openairesponsefunctiontoolcalloutputoutput1.md: + id: b783e1016b39 + last_write_checksum: sha1:8c30587122572f54dff10718621b22e7ec3cb443 + pristine_git_object: 331d49461e527cc0b933c44ae9258acbc56e0b3f + docs/models/openairesponsefunctiontoolcalloutputoutput2.md: + id: 6d373d444469 + last_write_checksum: sha1:f4f2b9b9cf8072ede4e81bca3ba2bb44307a4669 + pristine_git_object: ed4cf552b831fd311024033b71a855c923aaf089 + docs/models/openairesponsefunctiontoolcalloutputstatus.md: + id: 3690edf1fb62 + last_write_checksum: sha1:04470cdfa092e54ba11b5a3bb046263a44807acc + pristine_git_object: cb051ca7c1de64caae38f83f152150f6694f15b8 + docs/models/openairesponsefunctiontoolcalloutputtype.md: + id: fa0b2d5865c7 + last_write_checksum: sha1:260b499cf80307d50eab0d481bbd86c0955ee066 + pristine_git_object: 44ce677e42a849b66e74e7cd5d181fab41cd8661 + docs/models/openairesponsefunctiontoolcalltype.md: + id: 4088326575c5 + last_write_checksum: sha1:85815ac9b7b22d0d65320b3f7fad814d6eb260a6 + pristine_git_object: fe032d4cfc19cc6e2f45e11fc5976604369673a7 + docs/models/openairesponseinputmessageitem.md: + id: ab4a280bae16 + last_write_checksum: sha1:837b01c8a1f4eee9167a21fa04e53b02cc152d3f + pristine_git_object: 5780ad439d14d3eeb63b78eb6678c3206bf931b2 + docs/models/openairesponseinputmessageitemcontent.md: + id: 462f52653086 + last_write_checksum: sha1:de89d23f529817fe251c17abadfc9ecca7d35c8e + pristine_git_object: 72b5bbb7704bfc9207bab804845a59a7a3d529c0 + docs/models/openairesponseinputmessageitemroledeveloper.md: + id: 43dafe2e13a4 + last_write_checksum: sha1:e709397ec02ef98e40fed187ed2d70d1e29571ac + pristine_git_object: f82376ef144e62ea3e947aff51064267c853ad23 + docs/models/openairesponseinputmessageitemrolesystem.md: + id: 056eeb53c257 + last_write_checksum: sha1:403099c4cd9bfe9e7197607035db3a7298d007c6 + pristine_git_object: 72416cc23f3d86214bac3d03c1fac7995ac4e562 + docs/models/openairesponseinputmessageitemroleunion.md: + id: 9e5f9c451bd4 + last_write_checksum: sha1:eaadc1387e020b347e8d057aba612052dc046210 + pristine_git_object: 94689be8fc98db4207f2c17070660d4150748c65 + docs/models/openairesponseinputmessageitemroleuser.md: + id: 9f97df966db5 + last_write_checksum: sha1:ffce9d0cbdec1202afc4e11b3b65e99edce2c10d + pristine_git_object: 571eb42c40dd9bdf4baee27226163543d191ce99 + docs/models/openairesponseinputmessageitemtype.md: + id: 643ff7c7769c + last_write_checksum: sha1:2341e49ad6e75b16e73cc74c563439a456b6d053 + pristine_git_object: b87b08a0ef660289e80854b404a3a78467ed36c9 docs/models/openairesponsesannotation.md: id: e0fb0de332e3 - last_write_checksum: sha1:b655ca2bfbf1d8444405715767a97dac35d44bcf - pristine_git_object: f4b8b9641c7b041953dd8a7ab52197c3efc28c30 + last_write_checksum: sha1:ac2e5fbd0e4fa04b57517cbd2da6d200ff1e6966 + pristine_git_object: dc986fb3d58cad0f3e4705630e0eb8233a09b0f0 docs/models/openairesponsesrefusalcontent.md: id: d469dc69b5d6 - last_write_checksum: sha1:48c37ce5d410ee6ac92cd4a2bdcfc67f7e9bf4ab - pristine_git_object: 6e2def30843e78e82851210f85e7f3df6f42c846 + last_write_checksum: sha1:46a2c769523670f215fd687a0c258d255a825f8f + pristine_git_object: 0a736ef87df8dd300d1e7471f5746d61fccd4b16 docs/models/openairesponsesresponsestatus.md: id: 91afa92c1af2 - last_write_checksum: sha1:52c7e8a7e988b645d84d4449878138d8bb50195e - pristine_git_object: f0b38faf9419c9e99659baf6d2cd4438b9e32ef5 + last_write_checksum: sha1:93978dcb81abec474011be3a8937ae2e1805cbe3 + pristine_git_object: 44ff0f745bf070c5319f95c3aadcc81c7e04ae10 docs/models/openairesponsestoolchoice.md: id: afa4fae61da6 last_write_checksum: sha1:12cde87794b6582d7af35fb23707880a0f9a7fe9 @@ -1355,8 +1900,8 @@ trackedFiles: pristine_git_object: 5172a3642e8c04c371a43524038faf58b463f4b8 docs/models/openairesponsestoolchoicefunction.md: id: 61bbab53eebf - last_write_checksum: sha1:fed18b0712e6872a707a3329ba22138d3841da0e - pristine_git_object: ee61971476375435c3abcf2aea7665388d7f79c1 + last_write_checksum: sha1:ea88b496aee14ae5cc0a1ad6645cee5fe620366f + pristine_git_object: 9329c5fef18ab0e82e05cc8d6b533ef0e4b8d4d0 docs/models/openairesponsestoolchoicenone.md: id: 0a1b7d54b146 last_write_checksum: sha1:5dcd89b0f431985741e319b5797068fd48743dd6 @@ -1379,124 +1924,108 @@ trackedFiles: pristine_git_object: 5e0d997fedd76a7d9935bc8eb7bc1a9361b0bdaa docs/models/openairesponsestoolchoiceunion.md: id: 5b05c7b33b05 - last_write_checksum: sha1:bb1050ac66d00f9140e1d230d3b5e19b30fc4cd0 - pristine_git_object: f394b5268b193d88f5d118f6304943535bc2dae4 + last_write_checksum: sha1:10547c284c29024280e143d60c02ddce292dfc55 + pristine_git_object: 7fcf96e9a8e73d602eab34d8ff37758e5c53c9a3 docs/models/openairesponsestruncation.md: id: 8b8c4dd661e0 last_write_checksum: sha1:41e3d6a6e1d6aff37b45b70a218a9ae5e954125b pristine_git_object: 4f256109f7a48fb9535f6d3b95ee54150fd79607 + docs/models/openresponsescreatedevent.md: + id: 926c3abdd31e + last_write_checksum: sha1:623b7ed041805d83d36deac5502beac2a319f1e4 + pristine_git_object: cb576432261a53b4220b2f01441aeaf27df0d630 + docs/models/openresponsesinprogressevent.md: + id: 1c39a6ebd0ad + last_write_checksum: sha1:4c55a7d3a66b6d23fba37c7827a211a58db2c74e + pristine_git_object: 6c72d367ef1b25b1818c0e7a4d6195efbcc8ccb7 docs/models/openresponsesresult.md: id: 84990af4bfa0 - last_write_checksum: sha1:a811db5d6489ca84b4353fc6be10012c53143dfa - pristine_git_object: f61adf52906702d6ed232aebafa1d60e1eb05355 + last_write_checksum: sha1:e29b5354ec102211613d07e5f12967cd745a2760 + pristine_git_object: 20a1e8c39265e17d26e77df6c6d5db0ced960897 + deleted: true docs/models/openresponsesresultobject.md: id: a67bbc1f8fe1 last_write_checksum: sha1:7f55da79b4452480a8775b48cb4b6111d1d23216 pristine_git_object: d035104b0d234faaafbd019537bfc4e2b59abdad + deleted: true docs/models/openresponsesresulttoolfunction.md: id: 3e4490030851 - last_write_checksum: sha1:2a6e060123b788a6440882d9ddf1a0c4a3ebd20b - pristine_git_object: 2cb8f844b64aa1e8e33e3e75aecd49515b4ec9dc + last_write_checksum: sha1:0832605d427ad79b2ab69a079a45222220796b17 + pristine_git_object: b9af9d3fae2d13ed708654f9337be7ecf5cc7566 + deleted: true docs/models/openresponsesresulttoolunion.md: id: d416c6c1ff45 - last_write_checksum: sha1:357c2164df74c85850f7b9cfdc75d34eeef0f5a5 - pristine_git_object: 371c2c3437d78a84a0b2b7626c8ba048192217f2 + last_write_checksum: sha1:0444bf00ab67e56eafc690a4db7df089ac29defc + pristine_git_object: 06e5116d1cd841cd824007cae24be6a7f8271009 + deleted: true + docs/models/openrouterwebsearchservertool.md: + id: cc043aaf682e + last_write_checksum: sha1:762e712514f77ae9576f8d6dbd67be88f80d2be5 + pristine_git_object: 2fd8803e03a56cfcfcf760159850152eae91f022 + docs/models/openrouterwebsearchservertooltype.md: + id: 84dd6552b097 + last_write_checksum: sha1:2a46b6fe3deb5e213a2144f4bb598f688140e4b1 + pristine_git_object: dddad5ea3a289121e4b5f96e4329bb75c6b27ac4 docs/models/operations/apitype.md: id: e006095ee88d - last_write_checksum: sha1:daa33073e9510c9ab34cddb791f6f9fccb1849e3 - pristine_git_object: d01ad30e7821f257bb3a8462a36c5421ae45922d + last_write_checksum: sha1:b640aa5076b8aa61cfca271054625c1b63003918 + pristine_git_object: 4758d05b5cee0a562fd7929d22a16333e6de0dcc docs/models/operations/bulkassignkeystoguardrailglobals.md: id: 61e2eefa173b last_write_checksum: sha1:0897cbc7bfb2fdf62072e1be1a99b3edeb0ca9f3 pristine_git_object: ed0220ebcc4d2aa0848264c910fed701ea427780 docs/models/operations/bulkassignkeystoguardrailrequest.md: id: eec92c190ec4 - last_write_checksum: sha1:307cbc36f810bf29f92ca89be7be0f6240fb780f - pristine_git_object: bc5eaf7105e3f9bf52217c998f882e93624d3f29 - docs/models/operations/bulkassignkeystoguardrailrequestbody.md: - id: 5f4b03d3ad7d - last_write_checksum: sha1:7f7649e3c8a7de3494a0ed89bb2f246688b679d8 - pristine_git_object: a7ed0dcf35cd39db9f4bc40240659ef2856c9f3d - docs/models/operations/bulkassignkeystoguardrailresponse.md: - id: 6a2fd0d5d182 - last_write_checksum: sha1:e516aea1274973906af4353c2b75016471736c88 - pristine_git_object: a9b6b30ca59a9cc937a2c3cf3015d0deb8fbbaab + last_write_checksum: sha1:32ec424033d73bed1d81cee545c1102b52f59932 + pristine_git_object: fa34230d6283674b791e9d09033997bd313734f5 docs/models/operations/bulkassignmemberstoguardrailglobals.md: id: d9a733e7541f last_write_checksum: sha1:20dd75b0d6449cd26c74310a1c09e6fbf0671101 pristine_git_object: 67b29b9d5a1cc8969caa984a245a15bb2667a296 docs/models/operations/bulkassignmemberstoguardrailrequest.md: id: 6d07250d41fb - last_write_checksum: sha1:978c9b35d01257153cb6676d9bf583f1c82ea463 - pristine_git_object: fa8bb4cadf7a026fb2beb0cf5c13f792b8afb26c - docs/models/operations/bulkassignmemberstoguardrailrequestbody.md: - id: 901e5406cc36 - last_write_checksum: sha1:694c378c7fb368a63b8797edbbc31161db92c192 - pristine_git_object: a1b888275fcba9a94c92224ce068bb40cb278bd3 - docs/models/operations/bulkassignmemberstoguardrailresponse.md: - id: d981e5ad2eb4 - last_write_checksum: sha1:5d033baf3b7956b6a774462336204fa1e120a397 - pristine_git_object: 6f83d903b69b867518e6867abebf8fe19a0bdbc8 + last_write_checksum: sha1:8eda392c4418302dab3cb684938d28e515dcc7ce + pristine_git_object: c36a00c00b685d78b71e81ba87131c73c0d1ae02 docs/models/operations/bulkunassignkeysfromguardrailglobals.md: id: 7f8519de7a1a last_write_checksum: sha1:ddc9545ee81fc2e8797e3bd984866c223943b6f2 pristine_git_object: d962c6e5f9ebb848ba0f8b9946068763a4b84cb6 docs/models/operations/bulkunassignkeysfromguardrailrequest.md: id: 11b8284d978b - last_write_checksum: sha1:ca01a8b44f28b5093eb77848fccfe77ed55aac07 - pristine_git_object: a57fdea559554754eda842843a4f379a0a3266c8 - docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md: - id: 70c081957fd7 - last_write_checksum: sha1:0ef603ea9b21005fba34c0a16a217cecca35660a - pristine_git_object: 5a1b1ad37d6a0d34603e6e693b1b67ec3854142c - docs/models/operations/bulkunassignkeysfromguardrailresponse.md: - id: 04155d81cc22 - last_write_checksum: sha1:b5085fb21424a2d9c1bc2062e32641dd13378e3c - pristine_git_object: c77c8c7788c83b34e67b96fa4e4ee80b5863f83e + last_write_checksum: sha1:d6fc192711573998a07e33aab1dacafa597a1a91 + pristine_git_object: 44f7f4a41b6de14a2b992d489c54437a0f7b70a4 docs/models/operations/bulkunassignmembersfromguardrailglobals.md: id: ead5b950893f last_write_checksum: sha1:a5880201b08a5af7954db2b93f2a1dea0fcda3b7 pristine_git_object: 16ee3a942feb9536c0ea9e3dc4022862f737d2f8 docs/models/operations/bulkunassignmembersfromguardrailrequest.md: id: 18d0efe64297 - last_write_checksum: sha1:57a3df4ae89081559262ce3a0d0480156ec1821c - pristine_git_object: 668117d9a57991d16d33f9b31f8809b5697e820f - docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md: - id: 88aa17ef2fc4 - last_write_checksum: sha1:b38c129d01e1da2f5949e0ff0acf1a8e3519a3f0 - pristine_git_object: 82ae5400dd7451710f20dffc0fef90081babb53a - docs/models/operations/bulkunassignmembersfromguardrailresponse.md: - id: cd55826aaa0b - last_write_checksum: sha1:0a20ebfffcac64297a3e144220fd7a6c8fda7155 - pristine_git_object: a35686705068da84815519a0012adcf6f6363359 - docs/models/operations/calldata.md: - id: 61fd699260b7 - last_write_checksum: sha1:59c23ee14134f0af662207b7dfd26978cd9a3675 - pristine_git_object: d630cf8a4fb642abcbafa927ff8f4af3218c9f3d + last_write_checksum: sha1:ac628f6002483c3aa22c300021e5240d6e1629aa + pristine_git_object: 0d825994d4e24739660de23e9d5fb0cd8be18d3c docs/models/operations/category.md: id: 38b5d89ba971 last_write_checksum: sha1:d9d9d5337224da46c18f1f77020b0df0c2106845 pristine_git_object: 0f0deb83cbacb17378d27128c7036479c767421f docs/models/operations/content.md: id: d236fe045b84 - last_write_checksum: sha1:fbb1907acac878031d5a41b7fbe49a9d5ef8d0e2 - pristine_git_object: cc911d275acd4876f4ba4bc491dc7f1b10b18efa + last_write_checksum: sha1:55b38e0ee9872819dadc56bce33c599782adde88 + pristine_git_object: d66bbbe98ce9744acfbd00302552377f6223b948 docs/models/operations/contentimageurl.md: id: 50586e6fa167 - last_write_checksum: sha1:f7a24a5cb3da9e72f07015c504612b5f865f01ee - pristine_git_object: 07dae3efbde58c79687cbfbe09e25f2dc58cd0b2 + last_write_checksum: sha1:dd92e98c92aa73733566d59e9c296df9ee6378f6 + pristine_git_object: fc535f10cbcf5ca57e5188454f30a0bcfc7b6f96 docs/models/operations/contenttext.md: id: 71344e17daa8 - last_write_checksum: sha1:276c03d2cdb83e5012d284f8039db4fb2e697eb9 - pristine_git_object: 85b3a967a2ae3e324dcbd6d474cd7c510b730b15 + last_write_checksum: sha1:33ee6fdb1c6d1a8e3bcf19eecbae0672f2556592 + pristine_git_object: 9870a64da3fa193379f66f548a219eedb0e30eda docs/models/operations/createauthkeyscodecodechallengemethod.md: id: a68761cecd89 last_write_checksum: sha1:c477b072c24e5f52ed2d5e5912c0c3a3483a1ac5 pristine_git_object: 59a3fd27a678de36f88ceef2798634c3a9a74ac2 docs/models/operations/createauthkeyscodedata.md: id: a5cf47410406 - last_write_checksum: sha1:00b5ed31e22c40f0f79b464f232a6f46f42baa26 - pristine_git_object: 500d330e5fdc3cd245ebf2d001fcb0cefe5c12c7 + last_write_checksum: sha1:c402c56817eb09d948be77bed5cb2e91a2c1e7e6 + pristine_git_object: 281ac74078b695308e2f7a0594028bc8720f6dd4 docs/models/operations/createauthkeyscodeglobals.md: id: b5c73490ff9a last_write_checksum: sha1:d519193439ef78ac973322c0312272f298cd1dd6 @@ -1507,88 +2036,52 @@ trackedFiles: pristine_git_object: 2068be70948914ac3c26a9bc0469cbe2a3e7e34e docs/models/operations/createauthkeyscoderequestbody.md: id: 41569d05ee8b - last_write_checksum: sha1:5d7996ddad24270c2c0e8f11498068d07be6f397 - pristine_git_object: 9e51f134d7964144989224d9ce193840877be666 + last_write_checksum: sha1:95c3dabb32864a42e9ab677c821c7d8a90e465ab + pristine_git_object: 473d7a156245e1ffd2386167a760ae9aafcecc0f docs/models/operations/createauthkeyscoderesponse.md: id: 94a1e2c0f03a - last_write_checksum: sha1:8f4eaa9a5649fce1940c6d145138916b9076d5e3 - pristine_git_object: e610aec99da2631ca021f7da7b7fff51cc2a8ed6 - docs/models/operations/createcoinbasechargedata.md: - id: 490bfd48525a - last_write_checksum: sha1:3e1fa70b7006fc4e8ea3b58c96901ec4c1f2b09b - pristine_git_object: 9acb63a0586c85be3d04febab19bd40d70b8dc09 - docs/models/operations/createcoinbasechargeglobals.md: - id: bed4fb2653df - last_write_checksum: sha1:a441886a90c0ba1a2193b64391eb7b67683fc611 - pristine_git_object: 8a57aaa679bbee961ea6221ab812acaa7beb6473 - docs/models/operations/createcoinbasechargerequest.md: - id: 1ad6100da109 - last_write_checksum: sha1:5085c5708cdb0a650bd7120678fb19ba4a6404d2 - pristine_git_object: 7427ed1d4fea842c56462ad06e14b768eac94ee1 - docs/models/operations/createcoinbasechargeresponse.md: - id: e65fad3f99f9 - last_write_checksum: sha1:6659e8d6ccd26453231b2687c880e21c7ec918f6 - pristine_git_object: 48df4424dbc61c0816c9817714997fd2ce5b59cf - docs/models/operations/createcoinbasechargesecurity.md: - id: 737be14f7fb6 - last_write_checksum: sha1:19c9dd5cdbc0b6edf2ddd2032285174e77a94830 - pristine_git_object: 9de595c8d2af49d56f8fc7c27a0dc38f40a2a92a + last_write_checksum: sha1:a0cdf648d753eb498e5881e30c848cfac0d7199e + pristine_git_object: 359a09f9bcf863f0278360b133fce4dad6744377 docs/models/operations/createembeddingsdata.md: id: d578a89d3da9 - last_write_checksum: sha1:dd3434d9a34e2f2fef6321ee451c4b2035ff83a4 - pristine_git_object: b6acb2269230b6e88e6d2e8fe87c529343704b0f + last_write_checksum: sha1:2e4781331c1925733e611dfbb5ab858884524604 + pristine_git_object: 5e845b545afc6f0576d6c9e1b7b507e216467ef7 docs/models/operations/createembeddingsglobals.md: id: 35582313a14e last_write_checksum: sha1:a302b579acd0a1ab7767c3f5655366d6f13e1826 pristine_git_object: fb4f79f436ec911f7b6cf4bf3dea644f1d88659a docs/models/operations/createembeddingsrequest.md: id: 69cf4f5d82bd - last_write_checksum: sha1:78c2602b817b404958fe44499cc2a0cda6babeb4 - pristine_git_object: 2768e50f2cd1d11ef54222de64f66a63e9715215 + last_write_checksum: sha1:fd123cd7e86d9e60321c821a5e0783f7ac0974dc + pristine_git_object: f35f3026f604d57a0065232372741b881fbc4164 docs/models/operations/createembeddingsrequestbody.md: id: 295a16bb71ad - last_write_checksum: sha1:218360560487950435b551327c098d4af9cd10cb - pristine_git_object: 37b54605b995290afd8372cbfcf8c89821369f81 + last_write_checksum: sha1:f9370f4ec553f0f12ec29759bd5896529a9bc033 + pristine_git_object: 986464ca8bd52b596689706f61922a4cb0372eb2 docs/models/operations/createembeddingsresponse.md: id: 3db56e9f80db - last_write_checksum: sha1:ad8b1994a2642406158c20fcc49c7c7ffe297373 - pristine_git_object: cfc7f402ab937558070c93bc75f277278b2fe5ca + last_write_checksum: sha1:599646e4dd0552490be7c53d2c5a6bee334eb96e + pristine_git_object: 2888a926934139bb734aafe4d134ce62018db865 docs/models/operations/createembeddingsresponsebody.md: id: 2b379b986bdb - last_write_checksum: sha1:45d20471e0cef861e7707c4fd727764ba64bcf55 - pristine_git_object: 18423c1dfd4f45eae5667c74b1b1be2bfd76af72 - docs/models/operations/createguardraildata.md: - id: d3bba8a28f74 - last_write_checksum: sha1:6982a26c23405a04e48693e0b19b29d3e82119db - pristine_git_object: e914c2f7ab2c53c9bf146a772d71f227dafe7d49 + last_write_checksum: sha1:e45671d619f3db111c041395c1873d2a4f79c60d + pristine_git_object: 9e4289201dc3a780a84bce809956165c859d68f0 + docs/models/operations/createembeddingsusage.md: + id: 55932019377c + last_write_checksum: sha1:d0fc150cf4a59371ffe6b6ee66aa0f59d8d96330 + pristine_git_object: f063db9cd4539b4073edea4f42a6b6d78784d3b4 docs/models/operations/createguardrailglobals.md: id: e77858413127 last_write_checksum: sha1:7ef455ffd6047be34e904af50a099ce6814fad12 pristine_git_object: 636614f8d6b57715713908ce9142d5f3996bb78d docs/models/operations/createguardrailrequest.md: id: ff2eac26fe01 - last_write_checksum: sha1:14431447721281325f6e83766c9f5596289ef266 - pristine_git_object: 2d9de582fe0fa7671b1553effbb80b5192a85330 - docs/models/operations/createguardrailrequestbody.md: - id: 40f2921a92bb - last_write_checksum: sha1:56bde52eb7eb2a32c9f6f933ede5c8caa42351e4 - pristine_git_object: c55fc131f7ed9cae5bf455ef0ce8298d62eb7b7b - docs/models/operations/createguardrailresetintervalrequest.md: - id: 939a4d83737f - last_write_checksum: sha1:138fa9a5650073a60f5f62333f6362dd8ac8c515 - pristine_git_object: f13dca3481fc60a35c7c6878e62797e92f833489 - docs/models/operations/createguardrailresetintervalresponse.md: - id: 20f91ff333af - last_write_checksum: sha1:3c4f53e715b447158d1b84ed91d1732d63751fc7 - pristine_git_object: 81c6a47cda6f4e072bae43664e3884596a6c209d - docs/models/operations/createguardrailresponse.md: - id: 357ae04b4e21 - last_write_checksum: sha1:dae57092abd450097d90d42e923e4dbe70853f2c - pristine_git_object: 82ab5e0cf72896cd3133decc512f5c07823b0039 + last_write_checksum: sha1:010b157e4d34e5190a44bb768579e57567ef9160 + pristine_git_object: 241784b27bce564ec0abf2874bac7f918b1cd9e8 docs/models/operations/createkeysdata.md: id: 9cbfcb7edadb - last_write_checksum: sha1:788a18f60ca2bc5695169be63efa93c397c47204 - pristine_git_object: 77c3c7bf775e0e7d8200c39cb7e2df3861ee78bf + last_write_checksum: sha1:1f93a749e3200112e49ef375b810b60124a2e3a1 + pristine_git_object: 814af9668ff97cf0b64b5e0fbc7ba7b5cc6facba docs/models/operations/createkeysglobals.md: id: 8b78d8139066 last_write_checksum: sha1:ffc12fe8639f1ddcc609f944381a2585f223b124 @@ -1599,36 +2092,69 @@ trackedFiles: pristine_git_object: a85787dd61d752aba2f3f78e2710745a5f01dd9c docs/models/operations/createkeysrequest.md: id: d726547b3345 - last_write_checksum: sha1:85a76e7c9871776d19852edc31dab6733538b1e7 - pristine_git_object: f5db40c72626ccecba274d177ab758088042e56c + last_write_checksum: sha1:dc0c0f90a598f1658f5bc2816555cebe7ab0186b + pristine_git_object: 9f2c61c375200b044527f2ee9d2ff719fea60ff9 docs/models/operations/createkeysrequestbody.md: id: 7fe4c5641385 - last_write_checksum: sha1:3f1c48490829d0de735fe05d562b774cda30aa6f - pristine_git_object: dbf3e43faa345fd56030e40702012dac06e81ee8 + last_write_checksum: sha1:d53006e2880938ae59ecdd24b7df1ae68892a76a + pristine_git_object: a5340c35aa8c8bfe71a0533165b194cecdfb0d24 docs/models/operations/createkeysresponse.md: id: dacec48ccb70 - last_write_checksum: sha1:06eb9a53da091aa5155c0b3358b5bc2b719d6e69 - pristine_git_object: e09f4cc33d2827d971f5d10dce93a7474aba86c7 + last_write_checksum: sha1:6926620d92bab3a9c2a8662905ad4f0f4f4f1d2e + pristine_git_object: 8cff40ca16d53573094c26858cce3776f9331b19 + docs/models/operations/creatererankglobals.md: + id: a69e0c2ebb3a + last_write_checksum: sha1:81de6495768fe15d967381108daa6e453e868ea8 + pristine_git_object: 62601cdabdfdb550688f56e297b0192263e7ba93 + docs/models/operations/creatererankrequest.md: + id: 9aacc054ae93 + last_write_checksum: sha1:b8153a07df4133759d5074b8a4fac3f9bc488a71 + pristine_git_object: 56cbe003d63eac81816f02a3d48d32e26a95bb73 + docs/models/operations/creatererankrequestbody.md: + id: 0765b36caa92 + last_write_checksum: sha1:ba98cefbc357cb5a251a62ec79ba1ba4e6d66ef7 + pristine_git_object: cff028c26fc55bf2d7d5bf04b3faff1415145ba1 + docs/models/operations/creatererankresponse.md: + id: 4ef868bdb264 + last_write_checksum: sha1:d9b8e50fc46e8ffefb3dabfa4a761e9a0656f9a3 + pristine_git_object: 49f4aa5d1c60d89dda7cf10e221182bb2b0abb5c + docs/models/operations/creatererankresponsebody.md: + id: c7b025478225 + last_write_checksum: sha1:e586c3422c5ea2bc228c42ffbac9197d70667720 + pristine_git_object: b2dee6339c57698c178555ddd13ba406ad14c65a + docs/models/operations/creatererankusage.md: + id: 3a5bad0b926e + last_write_checksum: sha1:157565d7fb31c0fafb9e8274932359ad63152156 + pristine_git_object: 48c7c6abd2c362107043a8ad88c6fbc113b042fd docs/models/operations/createresponsesglobals.md: id: 18acf1695447 last_write_checksum: sha1:c7c9c9c761a321dd149838148cb8fc0652afd778 pristine_git_object: 5f55a504c8ac9025886c6ca77837f43be624a5db docs/models/operations/createresponsesrequest.md: id: 5370180b8635 - last_write_checksum: sha1:e420e1c31638a819995f1985c58bd8aebabb8864 - pristine_git_object: 6d89398368e0dfd70dd396b859ed97b8790f6309 + last_write_checksum: sha1:58e5396e6aa4d2babe67c84bb4d60eca6a679638 + pristine_git_object: 940273672b9877e7f184c0aa103abddf2db11b85 docs/models/operations/createresponsesresponse.md: id: c55a819f0ab5 - last_write_checksum: sha1:b06475f4653b025803adc0853307ebecf14775e4 - pristine_git_object: 05a6aa2b48a979aa960c4a861d0e7e651fce8704 + last_write_checksum: sha1:c87e2da8faa41234a38d45cadf0e9071814759e5 + pristine_git_object: 35a5070422da25126f8a589c506995e4a9cbbe73 docs/models/operations/createresponsesresponsebody.md: id: c0639e97c684 - last_write_checksum: sha1:ab2bd87bd695a2045985ae222355bdcea2fb2ba1 - pristine_git_object: 9a44a6587935f240b7b72d2c49baa09d1fd901ba + last_write_checksum: sha1:b47d4f4d22c120178b14661c8aff2e98ea91badf + pristine_git_object: 8a2f9c8ef7a17edb3c9c4b81d724315bd953ae3c + docs/models/operations/createvideosglobals.md: + id: 0254f1f55eb4 + last_write_checksum: sha1:ec46af1a3a75147c22c0bc95c7e2c351104afd67 + pristine_git_object: 50efdb2d297c622c8fc6f02252506e1f5643d647 + docs/models/operations/createvideosrequest.md: + id: 7ccf04a9576f + last_write_checksum: sha1:9ea7d3886614280b1273275351a577fe4f39bbaf + pristine_git_object: 98397debe5e19b26cb08414df7d187eac6fa00bb docs/models/operations/datacenter.md: id: 7a9819bf0f2b last_write_checksum: sha1:7ea8594aad4e4b93a6f7e5d50c12cb38cc1fbd49 pristine_git_object: fce5586507cd3b4471dd88eb699a6ce1b7f3db82 + deleted: true docs/models/operations/deleteguardrailglobals.md: id: 80951a3b49bf last_write_checksum: sha1:843ad0a94f754dacf5b4f9ff97c23adc1042c468 @@ -1637,10 +2163,6 @@ trackedFiles: id: 1bd1d6b15de5 last_write_checksum: sha1:cb09eb05dcaf199d1835df90ba15df361edeff6d pristine_git_object: 9989ffc9ef5f3ebd4bff9d6078dc4969099d86e3 - docs/models/operations/deleteguardrailresponse.md: - id: d7079591d587 - last_write_checksum: sha1:b0772ea7a1458a5b463290f731f92c21bcdcff1b - pristine_git_object: ef931107083e4cd826ffb22de9c3dfa7f0070f3f docs/models/operations/deletekeysglobals.md: id: eee2ff646d0b last_write_checksum: sha1:be1cc97f87b0e022e9ef1673d28b9063b561949c @@ -1653,14 +2175,18 @@ trackedFiles: id: b7cb4fb91f4a last_write_checksum: sha1:584251965fcdfd8b0df2b6edafdd4945ac372018 pristine_git_object: 5bab0e60c31fc3e0da330544ade1d7642703f6bf + docs/models/operations/document.md: + id: 20633c7fa04e + last_write_checksum: sha1:f6c94c47492cab9f19380585ffa79fb6caaf15b3 + pristine_git_object: d019e7ad42175269dee5b55db48a38fcce8fe649 docs/models/operations/embedding.md: id: 78fbe8e6e84d - last_write_checksum: sha1:2065eb916556a77f713dcceaa8f376c45afe6d75 - pristine_git_object: 840767b68e655f738b593c22673cf3aa1e1dea78 + last_write_checksum: sha1:eaa78d9f7132ae36e597c5635330c39da8d36f65 + pristine_git_object: 34cea4b90863c31ca099620e2961a00992909a3c docs/models/operations/encodingformat.md: id: f39b79526b77 - last_write_checksum: sha1:6c30d2ef586bc5c9f4f5a54c37b755263b7c28b9 - pristine_git_object: 02594e2554793a8b8e1e80bdf6d34cf168d09e61 + last_write_checksum: sha1:692238ac6634649b7d2ddcee20a828d5260e850f + pristine_git_object: 78efaae2ea4087428561ce6ce5b1952eded787a0 docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md: id: b35744ae0419 last_write_checksum: sha1:514d191123f272c81bc4c0ddf33cf7018e2565b5 @@ -1671,12 +2197,12 @@ trackedFiles: pristine_git_object: a520ad7129f8934021c2f4cff67d12c6a1a87812 docs/models/operations/exchangeauthcodeforapikeyrequest.md: id: 39b4f0553f84 - last_write_checksum: sha1:2a8862cc9b9fb8028a8537448516175db6562768 - pristine_git_object: d67d86a086d95902b6498af873f11d0b2d3ae41c + last_write_checksum: sha1:2c52522ec80a53c6de7a9417fa164f4a18ee4650 + pristine_git_object: 1a3e710c1ffd9c3b2063eb7ac6056f5a71a2b665 docs/models/operations/exchangeauthcodeforapikeyrequestbody.md: id: a18c703b0cc8 - last_write_checksum: sha1:167adaf8521d391af1842283ec2e35a10c347dc3 - pristine_git_object: b59a06a5cfbfbc902c0e2afc560abaf41ede338c + last_write_checksum: sha1:f5ebe21efd82e95b848bac61c43f4f69a8e36846 + pristine_git_object: b45ac5dfa857f251d9146e2cb6072efbb25bdffa docs/models/operations/exchangeauthcodeforapikeyresponse.md: id: 1896f7f46185 last_write_checksum: sha1:460d155fade3549ffc7055a244924dfb0b2d666a @@ -1699,8 +2225,8 @@ trackedFiles: pristine_git_object: 04088051fb95d6bbbdcc4c7a57de1a806d2d6577 docs/models/operations/getcurrentkeydata.md: id: aac77b8e156f - last_write_checksum: sha1:a912f22dcbe03e20537bf3f629802bffe65822db - pristine_git_object: c984d70691f898ec066fbb855e73b70a792f1bf2 + last_write_checksum: sha1:59d92cdcae8527c4daaf4e0de1616b9132c64f6f + pristine_git_object: 8b737d4cf541497533e42ba8d0fd4b17b63f849f docs/models/operations/getcurrentkeyglobals.md: id: b5c00983ce7d last_write_checksum: sha1:58cb938c5861bc549dd1c0a283555c4a151e02a2 @@ -1711,28 +2237,24 @@ trackedFiles: pristine_git_object: 788ef54826304f4f6fd82bec6d3f84e947997af3 docs/models/operations/getcurrentkeyresponse.md: id: 9477562332d8 - last_write_checksum: sha1:935f610eed8e405fe405667e54e95c7fd4400410 - pristine_git_object: 30bd2282274b8df4d8cf91113a061081762edf39 + last_write_checksum: sha1:480a860fb16d42eb6357109f33374b2bfab703f4 + pristine_git_object: dc486242358807cc7ccbe5d22771309d5b0bb45e docs/models/operations/getgenerationdata.md: id: c47059f62af7 - last_write_checksum: sha1:af20846a31a320fd39534e49800967bca881f27a - pristine_git_object: 500816daa2609ae1b880c8fe86f6bf4440de16da + last_write_checksum: sha1:6b7d45d23bd9542eec6ae84e6206f6f9ab36564f + pristine_git_object: b8638ecb3edd3d7ed66edf19fa0d4ea35324e475 docs/models/operations/getgenerationglobals.md: id: 5f2afe6fb90f last_write_checksum: sha1:832bdd95d117d8afd5ab64f730df60b90be80b60 pristine_git_object: dc1d1dbefca3833bf2e8ecb7c9a23f4acfcbaa31 docs/models/operations/getgenerationrequest.md: id: fe98f4f7a718 - last_write_checksum: sha1:a03a8cac5250effaae1fd86ea721eb5f7be3faad - pristine_git_object: 721877b0c6ed62ec9ca270f1f8a02902427100bf + last_write_checksum: sha1:515943de37768e391f86dee8d5e2373e2f1c27a9 + pristine_git_object: ab182ccd1b7dd785ed6ab7b3806c020ca89e2739 docs/models/operations/getgenerationresponse.md: id: edafe5ee4596 - last_write_checksum: sha1:2a6b5ed7e9ccbc5ccf1486f345296566925664f7 - pristine_git_object: 2f82ace8b79f14ae2c1d61d3182813ba862b83b4 - docs/models/operations/getguardraildata.md: - id: 698e237b3e04 - last_write_checksum: sha1:0cf06c8dd86e7eccc4f8fe687d417ce75a136f2f - pristine_git_object: ed56bce70f230cdd8bac6302340534381ba4e64c + last_write_checksum: sha1:be05e43b48d9f2c9885abfad10cfaa9be2326ed1 + pristine_git_object: c7cbf5393ca17c0791a5d6eb7c9a34959d0b73b4 docs/models/operations/getguardrailglobals.md: id: e8b35d73e652 last_write_checksum: sha1:61e3b6bd526b08956d6b98402d15277a8129f88d @@ -1741,18 +2263,10 @@ trackedFiles: id: 1e8ddf8ef10a last_write_checksum: sha1:72fb2d0b40588232166ae01afc64ba50e97e5f89 pristine_git_object: fdf0bcfd61cd4a978344d826d4c7ab862842032b - docs/models/operations/getguardrailresetinterval.md: - id: 8f08f64080d1 - last_write_checksum: sha1:1790f5786360c4e46f2a4038e0ee5d4e612b3b08 - pristine_git_object: 3b74eacea86d584ffc8baa6cacafa70783f9cc10 - docs/models/operations/getguardrailresponse.md: - id: 158ac25881ae - last_write_checksum: sha1:2ff76ee41d5f4daf6e74ceb1c3a9a26b83b04ae1 - pristine_git_object: 1f501c881f91f702314209f03f8f1bde80d4ff36 docs/models/operations/getkeydata.md: id: 359964834be9 - last_write_checksum: sha1:c5dcbe772df48d5c997b1d8d93aeb8bab2a42da4 - pristine_git_object: 2cca0e5b3cf61278a349be0aeff5934a8b74e031 + last_write_checksum: sha1:16b3525d704a7da898f9a4b43d94fe7d45f34c9d + pristine_git_object: 2088193b0c6ee577fb36c17d4086f525f683b4ad docs/models/operations/getkeyglobals.md: id: 0d57abd2ecf6 last_write_checksum: sha1:2743c3fda88dc05c7535ac08846af2406951e613 @@ -1763,32 +2277,37 @@ trackedFiles: pristine_git_object: cfbdeba6dd8e8c52efa0de0a1adc0d2f9afa2efb docs/models/operations/getkeyresponse.md: id: f5617e59330f - last_write_checksum: sha1:3b4decb7abd69a0ff7e60f331ce1bd0e0a23124e - pristine_git_object: 1c9ced002dd0db46b6c96ffffc9020ff2e2c64e3 + last_write_checksum: sha1:91ba24cf21fba7fdf975e9f2b579fddd5f5aa258 + pristine_git_object: 91e446ca6374497e6ed6e6ac899d4cdb770deb6f docs/models/operations/getmodelsglobals.md: id: ce4b123aa356 last_write_checksum: sha1:f05a201ecf793b0070f9d54fe7be6a24d9a076bf pristine_git_object: ff8b217678df8e2b62c6dec64bc4350add0b3305 docs/models/operations/getmodelsrequest.md: id: 801c51f5ac65 - last_write_checksum: sha1:d002835390dcc17e508b1471393463c8eafd3d5a - pristine_git_object: 584f2c715beb81dd7aea0917fd044bf119309fc9 + last_write_checksum: sha1:066a59cc51205325a8f604c199f4263acc8b231a + pristine_git_object: 2b9e2e53dea497ea65c3b0afe2d5fdcbc5c07082 docs/models/operations/getuseractivityglobals.md: id: c8e7b780737e last_write_checksum: sha1:a3a48d069e8d87c6f9a6d01ed1706d9c555e49ac pristine_git_object: aa35304d64364b40f20fa4733e02954be2d126b5 docs/models/operations/getuseractivityrequest.md: id: 094eba1cffb3 - last_write_checksum: sha1:3e43f20cdbb65dc5a0c576e4c3b8666ca52ab56d - pristine_git_object: b42df01fc07199083733e2675483899d3aef3ab9 - docs/models/operations/getuseractivityresponse.md: - id: 4f48d035cca1 - last_write_checksum: sha1:eed1b34aa9c90cd31f03b3374363d5b93065b942 - pristine_git_object: 6276d5ef171c677f757a924cdb5992a6521f9d62 + last_write_checksum: sha1:5652206fd6eb4f59090aac68eb899c45acf57cff + pristine_git_object: 3761cd02e4df68823b60d457a33ab07adb4ea092 + docs/models/operations/getvideosglobals.md: + id: 6efb3cde62f8 + last_write_checksum: sha1:6d99a86e4f679bbef487e6179cb07ebf0efb2a25 + pristine_git_object: 8f7b58192894b29062e8a6a054de7e61bde0f62d + docs/models/operations/getvideosrequest.md: + id: 27d0194d0e06 + last_write_checksum: sha1:b5acbefff17e04134d507dc5f03d19b3ad89efc5 + pristine_git_object: 7b9c13fe7570d25574b26f02ab62ba7c07df628d docs/models/operations/headquarters.md: id: 6d8d0f5b8582 last_write_checksum: sha1:df26249f2e2292e0c4f310e0067a54f5f2877363 pristine_git_object: 26917d2f0742440a9561192c9850552f42708b9c + deleted: true docs/models/operations/imageurl.md: id: 07f45cecde10 last_write_checksum: sha1:f77de220ee67c13f76c4278666ce031a56d6a7d1 @@ -1799,12 +2318,12 @@ trackedFiles: pristine_git_object: de8968b29fc5d21bb21cd09d7118240c120ec6fd docs/models/operations/inputunion.md: id: eed9590d62a8 - last_write_checksum: sha1:c09d0ef41cd378ac909b94962e726a67d470301c - pristine_git_object: d9f8b76324d689897fb59610c9a13e1a2d83fad1 + last_write_checksum: sha1:dfc7b3393d8d909f706c482de9322c7d19879c8e + pristine_git_object: 0989515a5467e052ac586d0dbfd358961231280c docs/models/operations/listdata.md: id: d80bed3b167e - last_write_checksum: sha1:37d0f9bfc6a4aa26430873a93ccc18a44b19614d - pristine_git_object: c703836b4afe03706b20b3a8dabfb0a3f1b14877 + last_write_checksum: sha1:96470fd65f63d6836dfa8f50b0547624a0ec1c6e + pristine_git_object: bb23098f86a38a12b81abe6d244ebfa5264d95dc docs/models/operations/listembeddingsmodelsglobals.md: id: 92d77f20bdde last_write_checksum: sha1:b7eada0e1ba9d9b930223e03cf8c4df4287dfc7e @@ -1819,12 +2338,12 @@ trackedFiles: pristine_git_object: 97ff92882e18e4b52f43529b5d31de98dd7c0923 docs/models/operations/listendpointsrequest.md: id: e52338ef5349 - last_write_checksum: sha1:3b4c2df7e469d76796a9477dfa81a751200806f7 - pristine_git_object: a5eecdd5cd6cbb4755e5dc0781759095446b024e + last_write_checksum: sha1:d31e95cf3fcb06444c491c434cecdd8a2b02a652 + pristine_git_object: 6298ca2129603f3eafd95073870da4235c9e55f4 docs/models/operations/listendpointsresponse.md: id: 662f4daf76d2 - last_write_checksum: sha1:6b213b9f0bdc2fb68e0b3d07f13f68e805c765b7 - pristine_git_object: cd366c60649b0588fdbea1f74072759585e04e7c + last_write_checksum: sha1:30dcb458fc146b835a114dd0ab53af879cc9a404 + pristine_git_object: c91f2d9ffb8733829f45698eb2504d388f17d449 docs/models/operations/listendpointszdrglobals.md: id: 398b7a4786cb last_write_checksum: sha1:2c9fbd5b46ec7115c65583d3e17f0d3144de843c @@ -1835,96 +2354,72 @@ trackedFiles: pristine_git_object: 172a25fac65911a10fe0e5237c5c591dad77afcb docs/models/operations/listendpointszdrresponse.md: id: 5c9c93477484 - last_write_checksum: sha1:719e6d95b94c3a9064a7f5d834a3cfa0447a096a - pristine_git_object: 92153e5ad732d668c12b57d90b6c0d3df67f01a3 + last_write_checksum: sha1:64077939981ec584d6aed0c1cc839202d5a85287 + pristine_git_object: 89e64672a09b8de4b186809f393eb810cbf39451 docs/models/operations/listglobals.md: id: f8c0a9ce961c last_write_checksum: sha1:3635bee00d7f3c7e1b2fc1c052fcf95743593094 pristine_git_object: aaf00291062378387c4730897767acb6d1af63e2 - docs/models/operations/listguardrailkeyassignmentsdata.md: - id: 2449d3e220c5 - last_write_checksum: sha1:90c67668b39d1d9014650badbce2bf6eeaf65811 - pristine_git_object: 14a675121c0711d893ad996b79deee38f168cf3d docs/models/operations/listguardrailkeyassignmentsglobals.md: id: 7925690ec4dd last_write_checksum: sha1:8da84afb2dd461ca5071e146a1d2d2add5ded7e9 pristine_git_object: 4a33b8874997b3628aca6328c4618d549b9c151f docs/models/operations/listguardrailkeyassignmentsrequest.md: id: 0da98c6ebcd1 - last_write_checksum: sha1:6172f7a40df9fe488e960b4f5bdfeccc7420a744 - pristine_git_object: ea9fca674108d9523254fdaa211a379ff657733a + last_write_checksum: sha1:961caf693e0f96774a5f10ba563b7d59f5e0e7c4 + pristine_git_object: 98960de4de8ba82fcd41d84ea5b0c03a5c26b75f docs/models/operations/listguardrailkeyassignmentsresponse.md: id: e03a3c240b60 - last_write_checksum: sha1:98226493d1e8244993f796c0c315b1410a29c90a - pristine_git_object: 386a0775b25ff248944ee3a897b756b32471b457 - docs/models/operations/listguardrailmemberassignmentsdata.md: - id: 0f48e0c7bf39 - last_write_checksum: sha1:658762757fac748991893029e84f48cab0b72a0f - pristine_git_object: bccd30f3b2250f966048111d7f090554f60d895c + last_write_checksum: sha1:23c749ff5682290951160bfe414aa795af5ffb54 + pristine_git_object: 92c0f76f4c3c3633ec1f65943d315a1b29835a1e docs/models/operations/listguardrailmemberassignmentsglobals.md: id: 23bf395fd200 last_write_checksum: sha1:47876b17d314afc1d1fa3505fd3b86221665db70 pristine_git_object: 932671e17336d1c5deef79ee5a27f984457154de docs/models/operations/listguardrailmemberassignmentsrequest.md: id: 09467f2fd854 - last_write_checksum: sha1:4d27d1975e66f6c8e0d166f1132114c6cca01e2b - pristine_git_object: 6c3d33e2e0cbf56400f3e02f925cfc3f068d7947 + last_write_checksum: sha1:46c22f93d7e25130d699388f3c96a4bc450c2601 + pristine_git_object: c8c6940d2edc981ec32cc6912d728733ba735bbd docs/models/operations/listguardrailmemberassignmentsresponse.md: id: 192195db9749 - last_write_checksum: sha1:335f647ad7d76bdd149681bc88fe95c7e79230d4 - pristine_git_object: 297a6a8958e0024e63856f852593cbca1c76e49e - docs/models/operations/listguardrailsdata.md: - id: e3026e27f10f - last_write_checksum: sha1:8d0f127b786faf02528605c2ea9c26229b12d474 - pristine_git_object: d0b8b4e9f4939cbe0b58333b174fe5bd846ed6b5 + last_write_checksum: sha1:aa81c3a27e1789825ced8837c59e66a0f31cb920 + pristine_git_object: 7d592e1e80b49e34ab74a4fd4c625b51fd8bd699 docs/models/operations/listguardrailsglobals.md: id: 2f7750b36bce last_write_checksum: sha1:a343ddcb7e52369c097bd2ee69a952feee280e1b pristine_git_object: bd212b445e0509816dd7f1ab76c810d24061e420 docs/models/operations/listguardrailsrequest.md: id: 3ae99ee8cbd8 - last_write_checksum: sha1:945349f076d20164872e43dd1e3408fa9ae440ed - pristine_git_object: fd4c9dede58dca7aa7ea6f0a8a99d2f33600959e - docs/models/operations/listguardrailsresetinterval.md: - id: 8fcdc9f3b5af - last_write_checksum: sha1:ea28a99c2ace8ab453ef2d92254075a38948f0d0 - pristine_git_object: 4295722e4495e43d1836592b7a76a24f6d3859cb + last_write_checksum: sha1:d317459caf6567c578489f05253cbe3950355b4a + pristine_git_object: 1d9c1ad93fa3269b9f179ac681304319ad4fbeb3 docs/models/operations/listguardrailsresponse.md: id: 3d55593e8311 - last_write_checksum: sha1:000d04909a19f19c3ab3e65c775ec85f04378703 - pristine_git_object: f32e01e8003c7d73ab69190ddb7951f658fdb074 - docs/models/operations/listkeyassignmentsdata.md: - id: ba3435f6b2d1 - last_write_checksum: sha1:ff04fa1a32fceb4b46829466dcfe50a170a91c2f - pristine_git_object: e30d8132fdab61f06d909b2207a1e4b7c0924641 + last_write_checksum: sha1:6c5a197211153bb10c10f57c198182900021430d + pristine_git_object: b4f3cf7314bdbe64540121ea1eae5721aca9cb0b docs/models/operations/listkeyassignmentsglobals.md: id: ccf1cb233045 last_write_checksum: sha1:2e1e5cccd6760af76b71aad6fe4d2f636784d0fa pristine_git_object: fb98c566c646303406068eabce63e0554e14b4cb docs/models/operations/listkeyassignmentsrequest.md: id: cf678e788175 - last_write_checksum: sha1:1f6bf385568005e2ec56f8e7c9e10b15db049541 - pristine_git_object: aee7f11525be694399760131ac3a47284cf5567b + last_write_checksum: sha1:06da3575de3d3861a8a9a4709f32f11369b88a26 + pristine_git_object: 5c3f8d71fa2b7adc9a46b30a06c25f4d70274889 docs/models/operations/listkeyassignmentsresponse.md: id: 55f05a5d20ad - last_write_checksum: sha1:f65bc21e6582db5b85e12637b4a1c1dc185ccb2b - pristine_git_object: bdce9b8ec7692cfcafe0cfd99eb21c5fb074e59a - docs/models/operations/listmemberassignmentsdata.md: - id: ee3f4f34190c - last_write_checksum: sha1:d8161ec7de10c1e0659954fd5f468621be7298a6 - pristine_git_object: 52d097617cd3df704040c550e747a0636b35ff0f + last_write_checksum: sha1:fb6ce50361789a09cb7f8616f80ca2d09198fef2 + pristine_git_object: dcf7857250e341ca926e9b80888cfc7d2c3d234a docs/models/operations/listmemberassignmentsglobals.md: id: 248b072d8556 last_write_checksum: sha1:67ac80ef0664b73473b1080135c7847e392ccbc4 pristine_git_object: 464f8c7bcc97289d56794e4c041550aec310d4b7 docs/models/operations/listmemberassignmentsrequest.md: id: 010cf517af0d - last_write_checksum: sha1:929f4837ac72e1111bcf513c4631f30f45e89581 - pristine_git_object: 9d8e2840a82cfe2f93ea29a472170edc0a8abbf8 + last_write_checksum: sha1:59ee7d7795498bc4a76e99af4614a34f8afa9099 + pristine_git_object: c8c39bf75982ca3086650b4e6fbceeb644746ebf docs/models/operations/listmemberassignmentsresponse.md: id: e8da4e9e6027 - last_write_checksum: sha1:6299d28524846483d818ac55a0ebb93a416f71b7 - pristine_git_object: d9d9bb77d9f221b4586c800442fb88b091c8e3ba + last_write_checksum: sha1:2faf9f285d9a1816c2b5d30e8b6703f75cdb1113 + pristine_git_object: 53698d265949aff35dba2f1c6f0fd7b0118f7249 docs/models/operations/listmodelscountglobals.md: id: 0af2c2696127 last_write_checksum: sha1:97b26975a931daec6fea5e671fed1534fbfba4cb @@ -1945,10 +2440,30 @@ trackedFiles: id: 07a43f294881 last_write_checksum: sha1:0960a0a6dbece8266f287e905eb5e592024240f8 pristine_git_object: bfa424be941736220e7e5aef02e0b254b429bbbd + docs/models/operations/listorganizationmembersdata.md: + id: 8e9af7c7ecf0 + last_write_checksum: sha1:b149c0b8b8b49e25a08b476d44e442741e160fe5 + pristine_git_object: 4a327ff8652cf6001e757239d61848c7436df29c + docs/models/operations/listorganizationmembersglobals.md: + id: 83ce3eaf29de + last_write_checksum: sha1:2130f66a4cdf354ac399ea294e0be6d6c56fe29b + pristine_git_object: 16e56661a755e0aefcb16fc12ecafa8bafec7c2e + docs/models/operations/listorganizationmembersrequest.md: + id: b0a028cd1a8d + last_write_checksum: sha1:70fea0c70aa1e6386849ada806220615512a46d4 + pristine_git_object: 28d4ca5d74ad4034441f34775dffa3a4eaff9993 + docs/models/operations/listorganizationmembersresponse.md: + id: 16b76ebf225a + last_write_checksum: sha1:0f6651f295d8eb2f0d874c1e083da50832561504 + pristine_git_object: 90b2325af1a10041a6f80e1860256c2cddea4f87 + docs/models/operations/listorganizationmembersresponsebody.md: + id: ae9cc6ec886a + last_write_checksum: sha1:35721f51d17e97735cecabf5e0872d9641988bb3 + pristine_git_object: dca67117dcbbd8f5190f39d7159a81bab90f227b docs/models/operations/listprovidersdata.md: id: 97edf5a3cd2e - last_write_checksum: sha1:a3db6d0a1068cf29e28627f95216b6e991477e71 - pristine_git_object: 7c3361ec4bb4cd1c9354899a86e2ecf2eb8e4de9 + last_write_checksum: sha1:3fbaf7567eb38484954472fadee01c6769367acc + pristine_git_object: c1904189ae7ec00b8a3f81240ddfd8e5e8f407a5 docs/models/operations/listprovidersglobals.md: id: 93e8277705f0 last_write_checksum: sha1:3aa20c5267cc2a3f8d6b587d67254baa86465daf @@ -1959,20 +2474,32 @@ trackedFiles: pristine_git_object: 7078b856ae958c65d4e00cbb8fbbc685c3dabfb9 docs/models/operations/listprovidersresponse.md: id: df620d200739 - last_write_checksum: sha1:23d40b114bfe5a19fd47a486338d02e63ade5e7a - pristine_git_object: c383f6cd643368b2e7235318cafbc5658a80d556 + last_write_checksum: sha1:cce4904834f58f53ee734fcd121e26563961ad72 + pristine_git_object: 9dd457084593f737668c75068e1891b27514f394 docs/models/operations/listrequest.md: id: 88400dabffcb - last_write_checksum: sha1:5ce56184011ab8b170baf8583c809022efdc2a1e - pristine_git_object: a29359f4850f1b4d5dc7d3d4795307c95689574c + last_write_checksum: sha1:b623d8fa5cb0da794210696a205fbcdf57d616b6 + pristine_git_object: fb1075095ab0e29f0c3fbf945b3d8b338c6dc054 docs/models/operations/listresponse.md: id: dcc8376da198 - last_write_checksum: sha1:67a7c53d70a9a01477bb4a404f088003a492fdb1 - pristine_git_object: 196deab5f612d3c6358697e3f7cab879e394dd77 - docs/models/operations/metadata.md: - id: 4c22404ca93c - last_write_checksum: sha1:0c48510c4e07e55f79753cd344f3f1270af6c6c8 - pristine_git_object: 597c48b5fc1d48d143a4babf7abc90a7b94d4bf5 + last_write_checksum: sha1:dd42b419e29a1b482904ca2f8f379f007c9be36a + pristine_git_object: e927f5c447571d4e8c582680efc18a066e8e07dc + docs/models/operations/listvideoscontentglobals.md: + id: 48ca55aee689 + last_write_checksum: sha1:0c8685efc8fb41450eba115c81ba7310a1579a0f + pristine_git_object: 445832b4ea2c1ccc4dfb2f5a82e74034fbfa7206 + docs/models/operations/listvideoscontentrequest.md: + id: 82d32e33f752 + last_write_checksum: sha1:db17c2135af49aa83a7356bd9e52b9e57a9bc7c5 + pristine_git_object: 32e13b1ea92a5cbf6087682ba32d4605e419cb61 + docs/models/operations/listvideosmodelsglobals.md: + id: afa5c803ffe3 + last_write_checksum: sha1:f7f7aafc21cbc9226a55b91a9bb5b677085139d5 + pristine_git_object: 5dcf9d614a3f0dd63a49a0f16d28a2680d6c4d2b + docs/models/operations/listvideosmodelsrequest.md: + id: cfb4f48752dd + last_write_checksum: sha1:082a1554339188da8ef260f8b4b2fe79facc59b0 + pristine_git_object: cb6dd94cf11d9819f8a6b86b5ffe7c5befc437fb docs/models/operations/objectembedding.md: id: a02a569169a0 last_write_checksum: sha1:643772fa89e5f287be7db8295088c2984685a365 @@ -1981,70 +2508,46 @@ trackedFiles: id: 98bd2cd64286 last_write_checksum: sha1:f9ff52c02c2cff4b24d7b4dad7101418ce372018 pristine_git_object: 6319d7beaa2d9709e126f07a3207533fcf24c1b8 - docs/models/operations/providername.md: - id: 616da1534f02 - last_write_checksum: sha1:1086ea193720fb0da1c7df863e66511c58055738 - pristine_git_object: 37cc7202ebd402d3a705fa4ba5f5c14077af1bce - docs/models/operations/providerresponse.md: - id: 8af09d586b03 - last_write_checksum: sha1:3969076345480f6e5738cc0299685a56331137f0 - pristine_git_object: f4c34c0401f326239d620b1974214dd189306e53 docs/models/operations/ratelimit.md: id: 94a6ae30f279 - last_write_checksum: sha1:55a11ba047d92a3ebaa49307db470a78dc12ff00 - pristine_git_object: 2fa11c778b7bfd350cabb68566c553fc7faf3435 + last_write_checksum: sha1:b857e420c518fc6b1cdbd44492f7eaab90dda799 + pristine_git_object: 3cdf4e9e217fa6a17ec7f7f02321385bcd932839 + docs/models/operations/result.md: + id: 6953cabb9266 + last_write_checksum: sha1:43710798dea61b4c013d295a6ff9e84ae44d37ed + pristine_git_object: 2ff12ff4917b26df4b1bca7cc8aac88c503e7c0b + docs/models/operations/role.md: + id: da2c36811787 + last_write_checksum: sha1:51b191a147a8c242fd8edcc4c251a3a5db0f559f + pristine_git_object: dafd039c7cf683365d9a9f0e90fbb0e1f37e12ce docs/models/operations/sendchatcompletionrequestglobals.md: id: 90e72b8cd0ff last_write_checksum: sha1:d7862a62211f2fb7eef9c731b553de866ad7d455 pristine_git_object: 9f12b326c289cab94bfb4cad2cfaa4ed1c830dc2 docs/models/operations/sendchatcompletionrequestrequest.md: id: 20682772581d - last_write_checksum: sha1:05688a4a24e585e974349f5b36323591a8512092 - pristine_git_object: ae5e29123a59b46b1e5d52f6e8b68747520f3717 + last_write_checksum: sha1:5da6d5e6f2486224ce013bb7b890cd9196706d7f + pristine_git_object: 3a4bd0981c04f68c132ca27a4fd616b705e50dc4 docs/models/operations/sendchatcompletionrequestresponse.md: id: 3ca0009c143d - last_write_checksum: sha1:01ad67821135ffe63f1ca7207fc27213641611f3 - pristine_git_object: c6414b74f47e03ca3ec4a15665b7a829cda2facf + last_write_checksum: sha1:781e7e2a5b75b7143b675140c5769504af62d5e3 + pristine_git_object: c24f870a01d6289c521c1bbd1e8dac34b2517009 docs/models/operations/sendchatcompletionrequestresponsebody.md: id: fb7605216c3b - last_write_checksum: sha1:1d5d315b82137fd932a05a36fc5e036238acb30f - pristine_git_object: 6fbbfa90899e386f6e6786cc5064820a6ec3b1fc - docs/models/operations/transferintent.md: - id: 4585adc299cd - last_write_checksum: sha1:20096e1501c818b6229900c48845a340e10301fc - pristine_git_object: be14c3de94902289b9f2d74ba7472aff1895bc08 - docs/models/operations/updateguardraildata.md: - id: 5b03440d96da - last_write_checksum: sha1:b5fedeff51cb8b4be58b2e741f8a118168cdff84 - pristine_git_object: 22cbd14ec9d351587650487eb6d9df5bd37963ba + last_write_checksum: sha1:03ab5ea7d992da3bf0d81cf19574904324d65600 + pristine_git_object: c949a52d9f3ebf84195bbdaacab61d926bd4d6a0 docs/models/operations/updateguardrailglobals.md: id: dc7cc05a81c1 last_write_checksum: sha1:9a81f6463fdae1bddc1194cd2717b2a6855dae6d pristine_git_object: 5f51b0819f6f85018f24995306dac910a66bf08a docs/models/operations/updateguardrailrequest.md: id: 4750db2d4690 - last_write_checksum: sha1:5cc26a4b53acc9bc2093d7dc25372eef4696fb9d - pristine_git_object: 1a3aa6337529ada13803aeeb59ba63874f6baee0 - docs/models/operations/updateguardrailrequestbody.md: - id: c4990d5fd9a9 - last_write_checksum: sha1:2f1070851bd7d7cbc49899394b25668c69bfdac0 - pristine_git_object: 02e8d2bc846a9724b27ef2425bdf172496bfa340 - docs/models/operations/updateguardrailresetintervalrequest.md: - id: 8535183822a9 - last_write_checksum: sha1:0089c350fd23ca94e266bc9dc9001939071626ae - pristine_git_object: 8e6f6716515e999f55897fc68d120d402af61448 - docs/models/operations/updateguardrailresetintervalresponse.md: - id: b3d1e23bf314 - last_write_checksum: sha1:a38616b6fb876dbe2f5851bc254d5a4998d4104f - pristine_git_object: c4c13495e401930216844d71a4319f9bc25f0a65 - docs/models/operations/updateguardrailresponse.md: - id: 5c8279466bec - last_write_checksum: sha1:714f394c01dbde489c870e026eb7301c497eb49a - pristine_git_object: 51f061f5c4ba1c5c86c2c16e982d127410ef3de5 + last_write_checksum: sha1:0131dc3e9b86a8d6004703586ef1abbf8f209297 + pristine_git_object: 9aad11d3fcdf8899ecb511f360e868893500c127 docs/models/operations/updatekeysdata.md: id: b58660ebb695 - last_write_checksum: sha1:0c0c7f49852d5c09dbd9e29c0bd6031e999716f7 - pristine_git_object: 834d4eb2ccf566f7531ff18288189a748d58cb96 + last_write_checksum: sha1:02996a13a247706687f5d88c9bf9d9eeb1e6f976 + pristine_git_object: 3fa068438bf8276b8c644b859025bf13134851d8 docs/models/operations/updatekeysglobals.md: id: b787a566b0f1 last_write_checksum: sha1:3972f0041ff459140f561ebeb2fcf11952a527de @@ -2055,164 +2558,250 @@ trackedFiles: pristine_git_object: e705b2dfbabd332df155ac7524695820bca7b7ab docs/models/operations/updatekeysrequest.md: id: 153c6f74887d - last_write_checksum: sha1:5d41bd90448068d5031f4941b684fcbf7a0eec47 - pristine_git_object: c58123c8fdd03fe4bcc7da4411edf824dd690d62 + last_write_checksum: sha1:b08e276e04c7283aac08c58bffcc1b36fe7dfac7 + pristine_git_object: 874514ad5a65735244b7b48a5959d1bd3876c353 docs/models/operations/updatekeysrequestbody.md: id: 9971c36d6183 - last_write_checksum: sha1:fa4431812f2f5f4dca931799fabf5f356d61ba16 - pristine_git_object: 6d05aec30d0723da79ffe085c7bed17320dc9f61 + last_write_checksum: sha1:d279a3d52b2496529515e6f54e4a1dd11b8888c5 + pristine_git_object: cba683aaec3536a82d4486b9dafd320de615e2fe docs/models/operations/updatekeysresponse.md: id: fb4d74ed0adc - last_write_checksum: sha1:413f6629b6428c4d158f2a6ea5c19ec04d72dc11 - pristine_git_object: cd71a1d25efc6f689674b57062f31a93309c9ea5 - docs/models/operations/usage.md: - id: 735448cf5655 - last_write_checksum: sha1:4b96e81e4d478f4f489cc9b24728e5997641200f - pristine_git_object: 9fd024851b0da0e68bd923c5ade17fffb9dc8410 + last_write_checksum: sha1:59066d7824c5a499523a24f8965817e61b91628c + pristine_git_object: b27fe94166fe061ec1750a0e3e49b6d1d6d03100 docs/models/operations/usagelimittype.md: id: 22ad2742a599 last_write_checksum: sha1:7a6bf686440f92d48981d49715bcff65bb122e2f pristine_git_object: 83453002a36901fb9972e6c8768c141d6b7e4c02 - docs/models/operations/web3data.md: - id: c7e71a30706c - last_write_checksum: sha1:f20566610f7231c6e4b8616b55612cb645aec2b4 - pristine_git_object: a47730add7de7c357505bd52d7df97ce35232e53 + docs/models/options.md: + id: 5363d2a90efd + last_write_checksum: sha1:beda0d878b9e09357463ccd52f3ac8a6ffad683d + pristine_git_object: 9ab65158d71c5843fab1f315fe3712fefce6d885 + docs/models/order.md: + id: 5d2682daf79b + last_write_checksum: sha1:a2171967c9823ddb7138ba4981a96b9ad7d42e63 + pristine_git_object: 8a2f0898d0183e15dd1a5b2e120cf54be5cb0504 + docs/models/outputapplypatchservertoolitem.md: + id: 19ad32aec353 + last_write_checksum: sha1:e8cec766eb007fddf7313324ceef9d2b947de77c + pristine_git_object: c83f61542428254a53e5f6ddfb4d10389c984579 + docs/models/outputbashservertoolitem.md: + id: 182261db7417 + last_write_checksum: sha1:8ff5ac4bac8b7c1724a90c21f866df910cb91c9a + pristine_git_object: d06bb404e8523e0b35f25a6dfe500247e70e744a + docs/models/outputbrowseruseservertoolitem.md: + id: 923fe281f913 + last_write_checksum: sha1:3d29ec182270378acabd5bda4134b628ab1efe3e + pristine_git_object: d103c236c8d5e4fa9dbbe8c774fd58750a609269 + docs/models/outputcodeinterpretercallitem.md: + id: 63f154a12737 + last_write_checksum: sha1:b3d28c4f63145d69af94ffbc13080d5becfb9a55 + pristine_git_object: 2e1f9327871df82f452278c259f6ab73df18725c + docs/models/outputcodeinterpretercallitemoutputunion.md: + id: 6c3c35f1a289 + last_write_checksum: sha1:70b9903fbf6fcd0d3bb5b5dd4245b669aa1cbff9 + pristine_git_object: e2746e62d6bde2285bafa2666893c41a8b55a719 + docs/models/outputcodeinterpreterservertoolitem.md: + id: 6c502fbcda47 + last_write_checksum: sha1:d15c4a3f9236697e4ec40160d50e029d10dc0119 + pristine_git_object: 01860f5f58f9a5ec3b08df4edc76df5a609c2dc9 + docs/models/outputcomputercallitem.md: + id: df741eb146f4 + last_write_checksum: sha1:9475ed21af5c249108ecfe8ba23378b4d4a81832 + pristine_git_object: 5eff1434d07845ca878055a645659a2833f0af7a + docs/models/outputcomputercallitemstatus.md: + id: 54e141a5b0ce + last_write_checksum: sha1:b12bb4eaaa3372bced5cb9e64473becb8bdd9eec + pristine_git_object: a0f93be87b9c711762fbe845ea50c76f7a1ba04d docs/models/outputdatetimeitem.md: id: a4676f917431 - last_write_checksum: sha1:805242a01e1b141cd29b14f6b3d9de27d11169b8 - pristine_git_object: 0a60dce269a379a38342dedc9815d11a773fb157 + last_write_checksum: sha1:de420e7bd8f01778b133753fafc2927dc525e900 + pristine_git_object: 90730985c67ab078662d543b6f66a1821ff1b8df + deleted: true docs/models/outputdatetimeitemstatus.md: id: 7cc9f23255e3 last_write_checksum: sha1:0311bf99a8c761e5fae4b40fbbb9147a7ee4e447 pristine_git_object: 5f095760ab299e8f3c2970e3b150da535adc3a48 + deleted: true docs/models/outputdatetimeitemtype.md: id: 59d60c98a6cf last_write_checksum: sha1:105802dd34e2b72619465fa8e78a0fd04e647a11 pristine_git_object: c7f484c15d085cb3c2646b2ce10caf299ff0615d + deleted: true docs/models/outputfilesearchcallitem.md: id: ce9d5a22a75a - last_write_checksum: sha1:db1dd3325709f12c6d11bc3ba0fc0cb8c3ce7737 - pristine_git_object: 6663702af913e1bc2121c03c571bb328584035c4 + last_write_checksum: sha1:1873cd41f46051122bee39af559b1383cbb22707 + pristine_git_object: 2a800d5949eb563d7c5dbd456b460a0f7d167b1d + deleted: true docs/models/outputfilesearchcallitemtype.md: id: 116d15acfdd2 last_write_checksum: sha1:a32ae965f4ff2c6cd5b3544c787c28a2ce0c0f17 pristine_git_object: 57c9a6110294580207aaf76c534431830ca37a16 + deleted: true + docs/models/outputfilesearchservertoolitem.md: + id: 08e51f97d609 + last_write_checksum: sha1:d4c7ae0bbe9b4d31074eb8e000ce0f62ff94216c + pristine_git_object: 8909957dbb1dc065f3bd0c97f7b6b1dc68e35182 docs/models/outputformat.md: id: 80d5ef4c9cd5 last_write_checksum: sha1:bf3d1da7cec883391bbe86db7645d87c157e1fe5 pristine_git_object: adb93d341a4c914c9b936a793e586fb212b5c7af + deleted: true docs/models/outputfunctioncallitem.md: id: 8300485b699e - last_write_checksum: sha1:be827944dfa5d651b3063cfeb932f9d5e168ffbb - pristine_git_object: e0790650a586c473797d0110ced96397999f325a + last_write_checksum: sha1:7d9a4aaa7491614ea24a5ccc42f8aec71efc7baf + pristine_git_object: e998474669807cf239f31a513dc3eb33033aa6ca + deleted: true docs/models/outputfunctioncallitemstatuscompleted.md: id: 38f4a88dba7e last_write_checksum: sha1:d71da18899b11ffc260978b45e806b2076835a74 pristine_git_object: 4a190761ba3ba5254a624659d02b4ecd552f018f + deleted: true docs/models/outputfunctioncallitemstatusincomplete.md: id: 2222434c2239 last_write_checksum: sha1:fe39f2efadcd286f958db171a99cb38b880679af pristine_git_object: 48f6496905a1f7f77d968e6a568b3ee086eea5ca + deleted: true docs/models/outputfunctioncallitemstatusinprogress.md: id: f318efec97c7 last_write_checksum: sha1:6078451549f17a3fa643a5bb2968aa0cb3e34f5f pristine_git_object: fcbc33d6cb3ae7ee8f1a1560ca9b96adbcfabc9e + deleted: true docs/models/outputfunctioncallitemstatusunion.md: id: 83b263f79e13 last_write_checksum: sha1:a6ca4c282c4bb7c0749d740e98bcd75668ac0ed2 pristine_git_object: 58bf44534e0360b7f9e0a9b91e7431fb9a84b059 + deleted: true docs/models/outputfunctioncallitemtype.md: id: 51e56376211d last_write_checksum: sha1:980c0ca43e68267bd6693d7dfed8c22de3f1e31f pristine_git_object: 4583d296ed3850987194d2698f596f3bc89091e0 + deleted: true + docs/models/outputimage.md: + id: 7b70cb7f30a0 + last_write_checksum: sha1:d47d0e11351a45e550b4083220f7e33892a96c87 + pristine_git_object: 4888ae6ecab1a2289fc5e32eb7d052c0406ceed2 docs/models/outputimagegenerationcallitem.md: id: ddf7a3af310f - last_write_checksum: sha1:72128dd39e5a35da99a7c233372d91c61b629485 - pristine_git_object: dd03e3bf91753ef7b094d5bfdedf04fa1bc7e8e5 + last_write_checksum: sha1:0c233e8e7a5b471816e2da91606acf5cc8023655 + pristine_git_object: c6ec1a708b2cd9c3fbb7aa49032dd850edd91b25 + deleted: true docs/models/outputimagegenerationcallitemtype.md: id: 0230b362a729 last_write_checksum: sha1:ea2368cb8831fc4fa9884ff6059b3bb36f9cf18e pristine_git_object: df6a64201718fee3a27e06cbd18f7a9df62dd2ec + deleted: true + docs/models/outputimagegenerationservertoolitem.md: + id: 45ef89f9fb31 + last_write_checksum: sha1:db592e1353a54c67f1735f9c666266147e2470fc + pristine_git_object: b2f7539e32cca365a76f8806edf2e5365d9e588d docs/models/outputinputimage.md: id: cde5ba2f8cdb - last_write_checksum: sha1:9615ab33f93eff1229bff6e00f625a33ca96776f - pristine_git_object: 550f10601f0da88e73ee499cc016b881e9af77d4 + last_write_checksum: sha1:8a966e9832195d1add6b67ca4cbda9f22770c8a4 + pristine_git_object: a0f7ffe5b927a11eb21c24bb1eb0efb5c32642ad + deleted: true docs/models/outputitemimagegenerationcall.md: id: 5abecc8a8d16 - last_write_checksum: sha1:032c564efcef5d8e19d85d38b8ccb39522447a94 - pristine_git_object: f441812632b6afbe05ecee38a4a35d2e393649bf + last_write_checksum: sha1:b64ba0a781102dc4c3d0fd89fbd6bff92a18f583 + pristine_git_object: ae881a91c6245664872e21dfb303f6778437a306 docs/models/outputitemimagegenerationcalltype.md: id: a1d4f612e560 last_write_checksum: sha1:08eba2d30f86e31976b86a0caccc0b78af967d01 pristine_git_object: 06c7d7bce3957e371abf88b72932c381684c553d docs/models/outputitems.md: id: 6942c0928d92 - last_write_checksum: sha1:7ee7e5c4e1e1545d5a271e46433a20c2d58045f6 - pristine_git_object: b1e8cd9bcce5d39ce32027313d318018830dd488 + last_write_checksum: sha1:f2026eb6cbbbb5c6bdb51b651e26788009558dc6 + pristine_git_object: 200ffd80a08e701adff4c0b6b0cc73926bde868a + deleted: true + docs/models/outputlogs.md: + id: ad270f2dd1a9 + last_write_checksum: sha1:a51670ded278546d8c604b19047f946ad8bf83d1 + pristine_git_object: 27aeeed4f2e91ffbd479c539f824ccde9a168542 + docs/models/outputmcpservertoolitem.md: + id: cd168c16bdd1 + last_write_checksum: sha1:ed0ae5661b931c05c11c51d44dd591d3ae90ada8 + pristine_git_object: 182119acf506fa9d33431fff74e55b573758728c + docs/models/outputmemoryservertoolitem.md: + id: 505fe948ff46 + last_write_checksum: sha1:fac2f7ed586c1fc290d0825a0be9876b139f4543 + pristine_git_object: c5261bbd8c9921f469465a568ee5affdfb05c355 docs/models/outputmessage.md: id: e52a5866db02 - last_write_checksum: sha1:1236707e8d8923906d77564ed879f0d899ef8190 - pristine_git_object: e5657b7a8fe4d1cc7ad9f80be4a9bf7b8850a7bc + last_write_checksum: sha1:355c43bec9b422e5e2d30c1d1d48bb1a61be6b94 + pristine_git_object: fe9ffd584ee25b8620ac2d84ed89e0952485f488 docs/models/outputmessagecontent.md: id: abe8387622df - last_write_checksum: sha1:a84e14c42f1d6bfbdc798f522b9a87041347b4c7 - pristine_git_object: 24ed1552f16214b458c033eade1f72d2920c939c + last_write_checksum: sha1:7db3c05b1cce37dd96d2788c4c58db41656e68f6 + pristine_git_object: d3e7a05b4252be3f70d407ea01cbc43359ddfd40 docs/models/outputmessageitem.md: id: df3a908de884 - last_write_checksum: sha1:b8cf62511a240f9dc235f99ec3814592b6e5cae7 - pristine_git_object: 4d87ea2d9cc68a02d6def6555b332d5ac777f25b + last_write_checksum: sha1:292d6c2975b5ceb26d8912e5dd8e841543d1145a + pristine_git_object: 57a3a7dda194a6a038245b758c6714268a7029d9 + deleted: true docs/models/outputmessageitemcontent.md: id: af15fd11e7bb - last_write_checksum: sha1:660e68ff025e0de467df64baa97f52cdc6e55c33 - pristine_git_object: 25eee48835dbd2d458cd928fb84a849f38b8cf65 + last_write_checksum: sha1:42ff0274213e8cc4499836aac300c97adbbe99c1 + pristine_git_object: eaa4c521be0b3f9dd9cb7e72248db25dc5b4691d + deleted: true docs/models/outputmessageitemphasecommentary.md: id: 0a9dbc146933 last_write_checksum: sha1:75193d12f3b5a8adb3712dc2bdf39f7cf60d4fdb pristine_git_object: 690746c68fdc8a26288c06bb7d0d45812ba76747 + deleted: true docs/models/outputmessageitemphasefinalanswer.md: id: a343ac162e13 last_write_checksum: sha1:0b2f4bf75e32dc8b43e717790ac8bf0833da3af1 pristine_git_object: 7784283204bccf680bebacc1298ff4fbf8c62b2e + deleted: true docs/models/outputmessageitemphaseunion.md: id: 94639ab12576 last_write_checksum: sha1:aca4410b3a953ac9fdbf789e3061a83da217d25c pristine_git_object: 498b15a3aa42ce64c17b3344ff141013805470f8 + deleted: true docs/models/outputmessageitemrole.md: id: 98035b527ed3 last_write_checksum: sha1:75c9a89bc8303ae72f505224f2059f84299dd4e6 pristine_git_object: 7393820604169f45c9970697009501b8aeaef99f + deleted: true docs/models/outputmessageitemstatuscompleted.md: id: e2d87deb086e last_write_checksum: sha1:81955ddbeec811b5cbaba7437f76c88d48fa223f pristine_git_object: 038eb97b6322ed2e86692713df75ad5754f01aca + deleted: true docs/models/outputmessageitemstatusincomplete.md: id: 5c5621c63e11 last_write_checksum: sha1:98a070697a3aaf381e96b6ebac3171d0a4df0786 pristine_git_object: c03719ab1bbe182399fd7e7b17efecb9e9ef66ee + deleted: true docs/models/outputmessageitemstatusinprogress.md: id: 4d22226f7a11 last_write_checksum: sha1:dd4d564c41fffb4cb0b240997a94a57f8e3061d0 pristine_git_object: a2cc7d80ff25fe67ae6bd79a797522e54c21cb32 + deleted: true docs/models/outputmessageitemstatusunion.md: id: f040d7bbedad last_write_checksum: sha1:da9b7f104e2072c510040fe202a5e91bd3b2c932 pristine_git_object: 76f9ea1f793d1c8e701070a81791f0a62245e76f + deleted: true docs/models/outputmessageitemtype.md: id: 3b5c6c1d622a last_write_checksum: sha1:81edf556281bd041afaebd3e4661a5c1a0701a78 pristine_git_object: 7f0427fedc0fc3a99c63ae06305812aa4e3fddd1 + deleted: true docs/models/outputmessagephasecommentary.md: id: b5d26a8522fb last_write_checksum: sha1:543070c314dcbddcb234c1677871c9bba60c7f12 pristine_git_object: cb0d8814dded7da129f2a0fb2d3b8e5d597e6ddd + deleted: true docs/models/outputmessagephasefinalanswer.md: id: f21e6b8aef89 last_write_checksum: sha1:ffdc75a7be0502f12c0993539dec38e7700fd565 pristine_git_object: ff5fc926e8d041b056ff478185b46d273235e1e6 + deleted: true docs/models/outputmessagephaseunion.md: id: 26aacc341ead last_write_checksum: sha1:9127c5bd1ca95a9f5420a7d863116bedb8e71096 pristine_git_object: b472eac7923812c7c6f8463bec7a259ee5189bfb + deleted: true docs/models/outputmessagerole.md: id: 400aaea846ec last_write_checksum: sha1:3da10c86f5398b928976f7c068ff336ca0f349b3 @@ -2239,60 +2828,95 @@ trackedFiles: pristine_git_object: 698f2ba84bcf9d383a76f4dd216ffe19ed15aad7 docs/models/outputmodality.md: id: 6fd80b0d62b6 - last_write_checksum: sha1:b2c958285bc75bd48ddd94b18a42710eace5e2c8 - pristine_git_object: 1efcd8a374a2094b5d60f1b4a6783ecc85345e42 + last_write_checksum: sha1:08c40364afad54a7ef5ddd2bd703c8decd8f33c4 + pristine_git_object: 8552be6cc5568b8badbcb7fc9799e83d376a9cd4 docs/models/outputmodalityenum.md: id: cd0418e6bf91 - last_write_checksum: sha1:2483ce61d4952ddb430ef27c62f89d6d974ac57f - pristine_git_object: 8e3d38281833e806188cba5e5105197daa50cbc4 + last_write_checksum: sha1:24278972b2bc023e114accf89472a40f157c37f9 + pristine_git_object: 68d8d90c801e4408a2d09a52486623813803da09 + deleted: true docs/models/outputreasoningitem.md: id: 637d725308be - last_write_checksum: sha1:1f5345a5c463f91f5c82694c2271965b7d7d72b2 - pristine_git_object: 0e2177599ad723fbdc03b0ed8d392702e8cc8ada + last_write_checksum: sha1:dc288c5007f57bd6ebb8606eff20da7e1fd03de0 + pristine_git_object: 8d872619dbb585e35eacb62f39d5233795687b59 + deleted: true docs/models/outputreasoningitemformat.md: id: bf973298665b last_write_checksum: sha1:b710819c6c34e5aa09ec2ff0f310e78249ab59b4 pristine_git_object: ad8bbc58c4718711f611e9e40d28c142c700d46e + deleted: true docs/models/outputreasoningitemstatuscompleted.md: id: 7b93f7378f4b last_write_checksum: sha1:bc133811705c7e690ec418214fbd37ac1a791ae1 pristine_git_object: ef7e91ad638a20bd6e2b1cbf8cf08eb7c30d1e0b + deleted: true docs/models/outputreasoningitemstatusincomplete.md: id: e66f8ff1239c last_write_checksum: sha1:f8e6b7535a8f64b75f4d91d251b15e93626045ba pristine_git_object: 89f6d13e713175c4cfbb70ecf745220c2a1c6cc5 + deleted: true docs/models/outputreasoningitemstatusinprogress.md: id: ffcaddd476cc last_write_checksum: sha1:616493ea192b22bfa45b8b0180f9a9122c6fbb72 pristine_git_object: 1f9272b2c8321b8cfa82c15750cf2a8d51db668e + deleted: true docs/models/outputreasoningitemstatusunion.md: id: 398f89ba59f1 last_write_checksum: sha1:f167d52cbbe3fef57a71a9a099933e238147c1cf pristine_git_object: 38e44c477134417cd23ec61799f4eab38c770e9d + deleted: true docs/models/outputreasoningitemtype.md: id: 16a29b2510ea last_write_checksum: sha1:cc2d2709184125f90f7245b75db2cc1d39392512 pristine_git_object: 513224aed83087ae965e7d350f46e32556ba0719 + deleted: true docs/models/outputservertoolitem.md: id: bac48d21696f last_write_checksum: sha1:79b8d3c3387edb5ee597d24778df21e797c27aac pristine_git_object: c5982f7ae6c6cfd0a085bf6f209b6dfca379b3c0 + deleted: true docs/models/outputservertoolitemstatus.md: id: b322e4087fb9 last_write_checksum: sha1:2d2dac26e3bacbf6f2db3a8a0cff0579c71368a2 pristine_git_object: 2332206826b5eff8e7433b983b95448dd9dfa1b2 + deleted: true + docs/models/outputtexteditorservertoolitem.md: + id: ec2973f798d5 + last_write_checksum: sha1:5d1c8becd8fbc8dd16ba35f74a37ab6a7a9dcf20 + pristine_git_object: d3b74ea772b350e9b4d029a30bec1299a55e08bc docs/models/outputtokensdetails.md: id: 4ea91230cf2d - last_write_checksum: sha1:2523e32649cad606e8e0b52151d862cf08456b29 - pristine_git_object: 294456ad9a1bc15fb0a9cd6c5b7839c17d0b70cf + last_write_checksum: sha1:e58beb39439aa240e55858909534036b23640af3 + pristine_git_object: 7d5103ff709124192f32f744c74bb1a3ba5b2f7f + docs/models/outputtoolsearchservertoolitem.md: + id: e7d2599591c5 + last_write_checksum: sha1:d2072adce71a1f89aa41b464bb4f50d79d4aacb7 + pristine_git_object: 3ae5ac4c431597f386ec66c24ddda8dde920f5ef + docs/models/outputwebfetchservertoolitem.md: + id: 44c247302868 + last_write_checksum: sha1:6eeae930b71884576a80293a2e623aec3068050c + pristine_git_object: 77dba358e69efd7daa61e5e04429d76fd951ab7b docs/models/outputwebsearchcallitem.md: id: c714eb79154c - last_write_checksum: sha1:5bf0bf3fbeb7ecd7fe29d68a01bf7d3e550ab834 - pristine_git_object: 87371e17e25ea5ffc7e83bbc7a4425f21ce2ddf5 + last_write_checksum: sha1:f31a4c1a1b9e6d2b72f2152ccbd31893bdac19f4 + pristine_git_object: 5f8e7bc1041cef587a0a9ce70f5ee7d44463e6a5 + deleted: true + docs/models/outputwebsearchservertoolitem.md: + id: 250df1e33399 + last_write_checksum: sha1:25437be3fd6e4a2d07b23fd189b861b139e4bb8e + pristine_git_object: 72adc5a79e0f4ef2be5f90431440225f166a2504 + docs/models/outputwebsearchservertoolitemtype.md: + id: 189176609ad1 + last_write_checksum: sha1:31c8c30167b5bed9814faabf50e886876f8c748b + pristine_git_object: d104c7b5a6d131ceeee2b316d568154b00b7e4ac docs/models/parameter.md: id: 287afbf6f281 - last_write_checksum: sha1:278b115df3ec93032ae628e759c82fffa3addcb6 - pristine_git_object: 90d4c5b2f0ff91152a230e066575cc4fa1e03197 + last_write_checksum: sha1:c27ee6123f99f8a43e1a108a2bfc3782ccdb6877 + pristine_git_object: ea3baf1a757026b4a86358ab7a89bc78bf5e0915 + docs/models/parameterst.md: + id: be21afd3c379 + last_write_checksum: sha1:751da2969f3a17d32f21743e613d4bad888a366e + pristine_git_object: 554bc2c3c600ffc7f7b9472e42b28a5a85e77f41 docs/models/partition.md: id: c7e0d61fe8aa last_write_checksum: sha1:646cefdcc27fd7da7031e0e8f3060bcb0f16857b @@ -2307,20 +2931,26 @@ trackedFiles: pristine_git_object: 25760477441c4b246c48d1ac7fdbbe0cad64eb16 docs/models/pdfparserengine.md: id: c7ee8484b003 - last_write_checksum: sha1:391ee26c6000bc63d9d52c204a3f9afb884198b4 - pristine_git_object: 99aa61a7793cc6bafaeface2a62d22c97ccfdd10 + last_write_checksum: sha1:442a150fa1f258d87374f3f9ab72dfc35569fac2 + pristine_git_object: dad11a13c7fe4374e794671c992ac1943f21d271 docs/models/pdfparserengineenum.md: id: 57198a073d13 last_write_checksum: sha1:06928135e8f58fc34e19b6db50e940ffa4713ee7 pristine_git_object: ff319bddd6cc6893b7e30f7562a1d04585f9fb6c + deleted: true docs/models/pdfparserenginepdftext.md: id: 2928c7f3697e last_write_checksum: sha1:8735c581db56b50c0ef6eb23894b9bcdc09822a4 pristine_git_object: c94c57751d6721c32a2c532976dca65dafca3a54 + deleted: true docs/models/pdfparseroptions.md: id: e1affaa37c33 - last_write_checksum: sha1:f2d4246e89540ca8e2595b29f9212a7fb536700f - pristine_git_object: 6868a31d3f6117d0cced28214add244774ceb19f + last_write_checksum: sha1:b02a110bfdec9b4beb374f002d3704aaf56f3db8 + pristine_git_object: b51efdb5619158c73b1e3f599eeea1ad0025ba8e + docs/models/pendingsafetycheck.md: + id: f6120f71229f + last_write_checksum: sha1:fd057581729e22dcab2e63c2864848fa8229773e + pristine_git_object: 01ff402c4a072f85a7e41a58fdeb471db83d425d docs/models/percentilelatencycutoffs.md: id: d12acbf645e5 last_write_checksum: sha1:90ff738ed045521e36725c2f8f0312752e766530 @@ -2335,8 +2965,8 @@ trackedFiles: pristine_git_object: ebaceb6e280132fb0990b015af38d5d895b67d82 docs/models/perrequestlimits.md: id: 34d264d24d04 - last_write_checksum: sha1:06a6fd664c3dfa29a160352bc4db448475e21b9c - pristine_git_object: df2c4efd50c0e3e28237422a51d26d55019bf24b + last_write_checksum: sha1:e18c331048e7b63908cd67991011f711c7f69ba4 + pristine_git_object: 887aa4dce3b9b54652fc7f4a21cd50f013fba61e docs/models/preferredmaxlatency.md: id: 6c99f91a353b last_write_checksum: sha1:e53440e449330e6feed91ca6a5646354c9f4b002 @@ -2347,44 +2977,56 @@ trackedFiles: pristine_git_object: 90581244ce1ba0be538b910ae3a6d4380685c90a docs/models/preview20250311websearchservertool.md: id: c8a03f19c663 - last_write_checksum: sha1:f38922b523509bed331fcc8e130c0d877c89956a - pristine_git_object: 653aa40471dfb7bd70e920f6819a28cde70854f1 + last_write_checksum: sha1:1ad80afbbdcb1daf408e7eae4177482611b83b49 + pristine_git_object: d2bcd904fe9e98b1f82258331ce5e0bd6f84d4b5 + deleted: true docs/models/preview20250311websearchservertoolengine.md: id: 893b4af66eb8 last_write_checksum: sha1:6bf77673a979be06cef74b5293cc65ac48249ccc pristine_git_object: e5b4d388569d66f75b4a103f0d5ad0a7d6e577a2 + deleted: true docs/models/preview20250311websearchservertoolfilters.md: id: a162adac76bc last_write_checksum: sha1:1b56f39dc2ed925220387c6b3ed3e566193aa5f1 pristine_git_object: bc8ddde1a1d82df1222bfe7ba78bd57191a2e3b8 + deleted: true docs/models/previewwebsearchservertool.md: id: 6aa1fade253f - last_write_checksum: sha1:4d3ad99d478d09616ed0ef4a39a69b5086023113 - pristine_git_object: 97014376570f49822486fdbb0e784b2067346400 + last_write_checksum: sha1:cbba015f3849b2aa6edad8bcc66ab29785e4ee31 + pristine_git_object: 8fffe19f95357b98541b1b6f7ce0a417f2bc94ae + deleted: true docs/models/previewwebsearchservertoolengine.md: id: 8719c84a2bdb last_write_checksum: sha1:b5236509945c148e84bafaf8ba04124cc90f4c2d pristine_git_object: 14dada80d46251948ea4a25d32ba5105a49722f8 + deleted: true docs/models/previewwebsearchservertoolfilters.md: id: cd0a1ca2f48b last_write_checksum: sha1:e4b44695d9437e97a308bede7db5a976cd200990 pristine_git_object: 7e7ce150e16402e84475d8cd226b04ab13cddc43 + deleted: true docs/models/previewwebsearchuserlocation.md: id: 98fb947f496d - last_write_checksum: sha1:9165bb9710048abe44a1ea51a28ecf7b9b56898f - pristine_git_object: f5d551ae7b3f8b0aef18f172f9a13f24ccf202e8 + last_write_checksum: sha1:4dba9cb708ec4ca0089d38fc3fe52fe7f685c8c2 + pristine_git_object: 5777d4c28d13893d4d77e74f82491e0d60e12c7c + deleted: true docs/models/previewwebsearchuserlocationtype.md: id: 5a9e7c90444d last_write_checksum: sha1:6eb283685953c2748ba283e1bc07179e0a90fc9e pristine_git_object: 261e1588833ca69b101954e045d02e5e1c4557f9 + deleted: true docs/models/pricing.md: id: 3f8579be3813 - last_write_checksum: sha1:4523c496c667b90955f9e841ab9ccf3e3aa93c0a - pristine_git_object: 7f9e3da97e12666c51ac69d9db1a8e1de46502f8 + last_write_checksum: sha1:e5427b787a0aa59bb95cb858e829b84b399f4af0 + pristine_git_object: cf48d441d72faadf32f05a49a9b5400cf990153a docs/models/prompttokensdetails.md: id: 1391892fce0a - last_write_checksum: sha1:3357d744d9a0c49c5a5b1eb839e95ebb687c5699 - pristine_git_object: ccc55e39bb505328a748b34c3978bf69e2e31fb5 + last_write_checksum: sha1:f49f3ccc8f0b25ca4437c9c08c660fce0e5c6007 + pristine_git_object: 4ef32473003c59e83028e6c45f13b7e5aa1c03fe + docs/models/provider.md: + id: cedb2a98f8e3 + last_write_checksum: sha1:ce2d8f8b84b6d37feb674a782aa2b20170167b0c + pristine_git_object: b744aafa3528e2fc0a0c8d15525c908b946e578f docs/models/providername.md: id: 661ee6ccfa8a last_write_checksum: sha1:fcfb3c629ab2fcc010e2ae47b17045609d452042 @@ -2395,56 +3037,16 @@ trackedFiles: pristine_git_object: da229099b7c8cdff965c40da5b86e910c47a29d2 docs/models/providerpreferences.md: id: f9bf4d106c4e - last_write_checksum: sha1:260d41833535a617691fdcada2469b8a7a557fe7 - pristine_git_object: 306c9db4c74770bac0d3ccb22c1ca343c1826829 - docs/models/providerpreferencesby.md: - id: c158490e5169 - last_write_checksum: sha1:4db69ffba2c98c3cae80b6b9c15ed98897c9ecb4 - pristine_git_object: 8fa6b2fcff47af73dfff385a4292a1a9d1b0875d - docs/models/providerpreferencesignore.md: - id: a4edb667e4e3 - last_write_checksum: sha1:168239130d7819aaa9dc83613dc8a75564927122 - pristine_git_object: d14a7d5eb6a333dd85db753faaab312d316efd92 - docs/models/providerpreferencesmaxprice.md: - id: 230affd50590 - last_write_checksum: sha1:ffc88759aaf01953a1006c039613acfbd44ff7f6 - pristine_git_object: 329af3fbaf0d32435020b1aa23ea4af34ed34bf9 - docs/models/providerpreferencesonly.md: - id: 76e7e4fc8162 - last_write_checksum: sha1:2b9fc5eaeb0671330c629459eec885989f42b714 - pristine_git_object: 9240a5eee9e85439abaa47400a5af8404bb44d5c - docs/models/providerpreferencesorder.md: - id: 40023712411b - last_write_checksum: sha1:3611c918be2df163f89b12df60d86bac28f7c8db - pristine_git_object: 0937f38f8fac992647d866acab87aece85f02472 - docs/models/providerpreferencespartition.md: - id: 8e25d1553b96 - last_write_checksum: sha1:8c379174b71869bdb697895f9e328bf2de3dc36a - pristine_git_object: 3c1d3ffe3ff5a38f2d34c0d15f69bebd263a242d - docs/models/providerpreferencesprovidersort.md: - id: 07b60010ff38 - last_write_checksum: sha1:ade0999f5bdc7c06f07bb52ff202615b0a97da89 - pristine_git_object: e9b44bf11bf555894e988f3f7cd20fde5988484b - docs/models/providerpreferencesprovidersortconfig.md: - id: 166996ff16db - last_write_checksum: sha1:080ad6b029f43acda782720deebc77e2a1a71322 - pristine_git_object: 5fe0b816124b2af1cf20e73210c65aaa4dd36f0b - docs/models/providerpreferencesprovidersortconfigenum.md: - id: 94d3da0f14bb - last_write_checksum: sha1:f791319a3b2291f99055511df665fb852fb6926a - pristine_git_object: 488f781432cdbfea0c83acef02f4dc7b0ca38c36 - docs/models/providerpreferencesprovidersortconfigunion.md: - id: 136affb233c5 - last_write_checksum: sha1:4722e94c3ccfd87a2e479523046d9ddfa1af9954 - pristine_git_object: ae0d8d189e7d2a6f33ca30ad7779e252bf614563 - docs/models/providerpreferencessortenum.md: - id: b6f1768bdd66 - last_write_checksum: sha1:e1fdaac025717317215673631ad63d9c93cab684 - pristine_git_object: ed6e30ea8bfda60eac977975050d610ab0e029bd - docs/models/providerpreferencessortunion.md: - id: 92cd060f2cd4 - last_write_checksum: sha1:ec91b09ec4d78fc63c0bb0149026515107533ea8 - pristine_git_object: c71c5597dba6a76f72d42143726d2d3f51f71eae + last_write_checksum: sha1:5c70dddb55106a986c183fc6ad83358a0bb5c577 + pristine_git_object: 995f52dcc85f5fce660b95033833eeef5e6191e1 + docs/models/providerresponse.md: + id: 489064dddb13 + last_write_checksum: sha1:30e543280d19a3a8077eaf3ea5040848e7057f9e + pristine_git_object: d1acf0cfa539064067ced3e83856cff1520b89fb + docs/models/providerresponseprovidername.md: + id: d59f0f17ca15 + last_write_checksum: sha1:bc63217e1cc0ae9de3475f0369da078aeeb05308 + pristine_git_object: 2d654e404f07cf4b6618ae2129892486a0b7ca24 docs/models/providersort.md: id: dedd9969d635 last_write_checksum: sha1:fdcd79fbebb3c669d794ca73835c447f398a538e @@ -2455,20 +3057,21 @@ trackedFiles: pristine_git_object: 4b6763492150066e02a4c24ae39d996dcd2679f0 docs/models/publicendpoint.md: id: 981d88d3c6db - last_write_checksum: sha1:fe984708689687dc2cc975bb6e1182e47c58932c - pristine_git_object: d334bf1904973a0ceaec9269fc1eabf7e75f5f04 + last_write_checksum: sha1:21e62f2b7d0abb3d6add1996819595ef3a8b20fe + pristine_git_object: f0c44d33046eb5832daf8e32deaf167543439373 docs/models/publicendpointquantization.md: id: b5a1de0acc9d last_write_checksum: sha1:a4c036afaee8c2fc88afeddafd51e1bb545cbea9 pristine_git_object: 838fed7b4f524338d92c3d87f0e6ff6330044c57 docs/models/publicpricing.md: id: 458e4872bda4 - last_write_checksum: sha1:f16e42c805ba68b931793ef7cab7c41dd56a1372 - pristine_git_object: 280397773584e18f996651fd71062568182befe6 + last_write_checksum: sha1:d0ecf0d58bbc9fc14cdada2b42e44255022d3330 + pristine_git_object: 2496d9023e2c24b6d5dcaaeadebeaaea82e1e1e4 docs/models/quality.md: id: a266576ad922 last_write_checksum: sha1:4565b3924a40e89a5c6c67b6c34e8c4fb8e77d9d pristine_git_object: 67ba1972164d4e74f843fc586bd641da8a7e0ddb + deleted: true docs/models/quantization.md: id: 3ca4534df268 last_write_checksum: sha1:24fc1d737a110e1885962a97994900650dac89a5 @@ -2477,254 +3080,319 @@ trackedFiles: id: 228bf4500066 last_write_checksum: sha1:cb137d542c3169ece7248f277b84f48a8964c8be pristine_git_object: 547d2a594e12facb6c743e1dc9d40c75c3ed28af + deleted: true docs/models/rankingoptions.md: id: e5499f41aa21 last_write_checksum: sha1:676ed3efcee47be2f7c8885f887ecfde8469ee45 pristine_git_object: 3adf112f484a525afb683687365cf61df1955d16 + deleted: true docs/models/reason.md: id: 087688da6fd4 last_write_checksum: sha1:609a3d27136cc2526df76538f697c462fab0dcd5 pristine_git_object: d3599ed4f44c99ac22f4a1648423faccc74d77c6 docs/models/reasoning.md: id: fb409fba3ea1 - last_write_checksum: sha1:0779de67c944ca3adace35f2381b0f18a6292d2e - pristine_git_object: f595b98f563af1ba5d58448796169d82da4bb0fe + last_write_checksum: sha1:e3e39d7baeaebb576646fbbe9714de0c74f28fd3 + pristine_git_object: f3909245532e15fad6b2dc45fbb2e1c7134d31d4 docs/models/reasoningconfig.md: id: 21ecd2b7375c - last_write_checksum: sha1:8dc29b7db158f8f33aa7cbcc18fcbbb669b58ada - pristine_git_object: 3b95f7799e773472b45ee7e7dfaa495bb3f0c282 + last_write_checksum: sha1:9d6c1935b81fdba42c3946830346e90748e1ef9d + pristine_git_object: 6678a0b3548ed09c759fb3f8c829c48cbd76ae1a + deleted: true docs/models/reasoningdeltaevent.md: id: 572f2ee74ad4 - last_write_checksum: sha1:7ccfdf411262a47ec0461786a9def046a7b02c29 - pristine_git_object: c5c2ac8ee57796ade0d1762ce2d56d84bbcd1818 + last_write_checksum: sha1:dddc7efdd9dfc8cff96e4e76a9c7b03f92c232fd + pristine_git_object: 67094e51f967a9de6094f46289ecd1d9303bfadd + deleted: true docs/models/reasoningdetailencrypted.md: id: 4b89489f8b93 - last_write_checksum: sha1:fb3157cf93459a9e52af9cd513fb251a5dcb183f - pristine_git_object: 42f226cbf68cad5341fa1999df7b61163239683e - docs/models/reasoningdetailencryptedformat.md: - id: 427fe9e4605c - last_write_checksum: sha1:a90e72a22c3c56e56ec43abef15493dc2d06bd93 - pristine_git_object: 6a53e623989fdbb74bb0c6297213e1be0d62cf85 + last_write_checksum: sha1:31b301a863bdb4bccc17c9e4b1ed14d32b7c6691 + pristine_git_object: 6c9b6188cf6a7a5c9e9bbc378ce6fe1d7ae1618b docs/models/reasoningdetailsummary.md: id: 1aedc148a57f - last_write_checksum: sha1:336004273d0151d3885e6f80fab67e448b42a57b - pristine_git_object: 85c377e28e9d925f950fc861f05d3e3d3b47fe4c - docs/models/reasoningdetailsummaryformat.md: - id: df380badde4a - last_write_checksum: sha1:e76f89fb6a0e98ce31874ea4defb944678958672 - pristine_git_object: 62cf8a26594a916978ca364b26750c50da99fd13 + last_write_checksum: sha1:74253b1cdbb34b3af5b143da4febcf4d1702b229 + pristine_git_object: 3fdbd9580f67a76f9b47a1ea0884fed8324788d2 docs/models/reasoningdetailtext.md: id: 736fc4cb08d8 - last_write_checksum: sha1:521d0a0c0bdbbb2044fa42a0e2cbb5b603238755 - pristine_git_object: 0a428c24ffa94e2f97e7ed62fdc37198ca154adb - docs/models/reasoningdetailtextformat.md: - id: bfc492580515 - last_write_checksum: sha1:6c0df1d7eaf432cd4de8d6b9698596f7a74c02d6 - pristine_git_object: b1a3b6869fe53997d8c931271b68751d86debdb1 + last_write_checksum: sha1:d895d300a2bfd9a2fc8b454386b25d6b6acac8ee + pristine_git_object: 97dd1233f39a1cfc37a0df4c2e77c50ea605ad76 docs/models/reasoningdetailunion.md: id: 7425c6e6d4ac - last_write_checksum: sha1:1dfcc9fa59cd35fc1c2c2876c255d0b78b9f9518 - pristine_git_object: 88328d825878c6109695e18e62819c722bd48036 + last_write_checksum: sha1:1435c5e4507708623a265aa947502ef219b0be36 + pristine_git_object: c0e5e40d93a60d1cc5e6303191c9e4b5b0feb83a docs/models/reasoningdoneevent.md: id: eb8f7bcce8d5 - last_write_checksum: sha1:e12eee1b165d87a486f9c12aa158627bc5c3d558 - pristine_git_object: 6b2a7606232cdf2faf259913f3a5f418dcec0e52 + last_write_checksum: sha1:f5d26cd89a65f5b5370b97bdb82c708240de02a8 + pristine_git_object: 8c9220fd53a8a42701cdd2f8e11de8aee99d279b + deleted: true + docs/models/reasoningeffort.md: + id: c8fd630d3f07 + last_write_checksum: sha1:ba41715e2053fc6734d4533c311060afa615250a + pristine_git_object: b714ed98184769738fccb5623c933c3b19b0c6ba docs/models/reasoningeffortenum.md: id: 75abca7f5e9b last_write_checksum: sha1:a00e02fde2f4ccfc2142204165ba2b0d345a805a pristine_git_object: 14fcfd7ed7e1bf4ed02684a4f0e00dd82d334534 + deleted: true + docs/models/reasoningformat.md: + id: 5e0f5873cfc7 + last_write_checksum: sha1:194ac047f4416700e8103f8d2c4f88b6533392d0 + pristine_git_object: a50737cfc4d272805d4f7d347eb1556a841694ac docs/models/reasoningitem.md: id: 9b64e42a341c - last_write_checksum: sha1:f30e07c04d7144e0f7d9f4e7504c717900ebe438 - pristine_git_object: 09022484149ac59bc64e24c56bb168474ad320db + last_write_checksum: sha1:aedd52e8b127921fb38f25c4181cf8a74c02e822 + pristine_git_object: 7d6b955050a6f7157229c37d996adaad2d6e871e + deleted: true docs/models/reasoningitemformat.md: id: d99c0bd3e54d last_write_checksum: sha1:98c8d46e389546dc38dea7259196805dfb64ea4b pristine_git_object: ab63c22118d327711a5b3e91e399e877fee62baa + deleted: true docs/models/reasoningitemstatuscompleted.md: id: "220760810899" last_write_checksum: sha1:0c707b469f310418efbaf989a9e8e3a850346271 pristine_git_object: b6733f09ae9362c1c4f00e9aa79767ff98e04a97 + deleted: true docs/models/reasoningitemstatusincomplete.md: id: 7aad8f3629e4 last_write_checksum: sha1:530a5ea91b7c349216a7fc16164aa9dda11a4e36 pristine_git_object: 5faa7ef2a2c36bf43cdaf2d8a2404f8268cdcd29 + deleted: true docs/models/reasoningitemstatusinprogress.md: id: 2342b01676ec last_write_checksum: sha1:8be9c09aa516dd7112a1d8045bca0b22029c2455 pristine_git_object: c1d15f49b83209a76539fb955164ae3bc2ca7e9f + deleted: true docs/models/reasoningitemstatusunion.md: id: e04f620129ea last_write_checksum: sha1:45991bf7c8dc2173cf44f74c000b4af4b1a57aee pristine_git_object: 6f365706113ce773fe22b13c45003e33d84ba061 + deleted: true docs/models/reasoningitemtype.md: id: 7a6808f9322d last_write_checksum: sha1:419ca13347add1005233749355d53f7fbfaaaafc pristine_git_object: 2e29f8aa08d820bf15a425bf0de2c024b0e60bb7 + deleted: true docs/models/reasoningsummarypartaddedevent.md: id: 7052969259d1 - last_write_checksum: sha1:e87692bb444e730b0077e7feee57369f8abd5538 - pristine_git_object: 8a6ab6337d6a55946773509fdc4f7c145ab74a03 + last_write_checksum: sha1:4d5c57e8f396dcaf8ba18270a4dbee97f4262dce + pristine_git_object: fa2544313dbe812d7c6e30d57f1476e547e4f2bb + deleted: true docs/models/reasoningsummarypartdoneevent.md: id: 03d3da99ff88 - last_write_checksum: sha1:6a624e34631574a7e4b460b32a4004117532a48c - pristine_git_object: 878651d7f9e9a938e07f3098b711defb41466982 + last_write_checksum: sha1:7cbd2abaede8021cef194530b67c86c732f9824f + pristine_git_object: d793c3aa70a7610834162e3149afbc6a89b7ea50 + deleted: true docs/models/reasoningsummarytext.md: id: 18b35794819f - last_write_checksum: sha1:002f812610352dbdbd727d53b3a8bca2426b1511 - pristine_git_object: 6ee39e828fcfb794ffd3ca8624fc697301991bb9 + last_write_checksum: sha1:dea8d2e74c01c2106cea3716080dfbd05d189fcd + pristine_git_object: 938c8a740e740fc29cd64956c606e211360958c5 docs/models/reasoningsummarytextdeltaevent.md: id: 748d0f5c8be4 - last_write_checksum: sha1:21e79d1453cb1ce36ec55ceebe1afad50f47c45a - pristine_git_object: 9bb36a4057493ad1b243ae03c941a993ab812ca6 + last_write_checksum: sha1:e2bab1a5e20ac98d253a032e19d1973d1dbb458f + pristine_git_object: c596c6af08883f8e8b144c45b85b698a46fba025 + deleted: true docs/models/reasoningsummarytextdoneevent.md: id: 34716eebd13b - last_write_checksum: sha1:2d64e99c02095a37464bb415f7b9c3f3b9372028 - pristine_git_object: ddaf405d50cc881cf83fbf17cffa65c361273e7d + last_write_checksum: sha1:4186448f43b68a4d9874bf2aa5bf29f67233a014 + pristine_git_object: 47efa29a449a6c122a3c0c01f9b52738516289f6 + deleted: true docs/models/reasoningsummarytexttype.md: id: a7483dfe07f5 last_write_checksum: sha1:63143ab05932a80c5318665fec4bbd72e30ce866 pristine_git_object: 63ce1eb4b9607dfb736d4027049f1338205e0351 + docs/models/reasoningsummaryverbosity.md: + id: d925ace91d73 + last_write_checksum: sha1:d804d28e46e42537d5afbc29f6bbcd2c67fb844f + pristine_git_object: 20c0d4aef8f3ff64364826088cd8baed1fa5c0b8 docs/models/reasoningsummaryverbosityenum.md: id: ac9ad84db923 last_write_checksum: sha1:bbe3d643ff8e0e5cf10b6efe75c2bf453c983e29 pristine_git_object: 8139386d0583f3c6328e86bac32be5336e3412bb + deleted: true docs/models/reasoningtextcontent.md: id: 720b21c43aad - last_write_checksum: sha1:a5fb7d585418f1ae608305508e64d71ac8cbecee - pristine_git_object: 81b2970576e647436f4c533383060c787102d9ba + last_write_checksum: sha1:b688e147e52c35720374ff12457e6f9d460161e0 + pristine_git_object: 33a49d7541d840d260a2d70bab8950b68c7ccf6f docs/models/reasoningtextcontenttype.md: id: 0fadcf492f2f last_write_checksum: sha1:1eea8859ba2b0026f5bf685e867c95627d78d006 pristine_git_object: 587fce7a1be9ebbfee6b40fe93f47e4e7991e172 docs/models/refusaldeltaevent.md: id: 0abec2d1df62 - last_write_checksum: sha1:5b66f9806ea33f5d5c7b5ff25fc9fe2a5ff154c9 - pristine_git_object: 8a674f4bb33d195ca8a8b99896c25fb95ac068d6 + last_write_checksum: sha1:8c93f32c52a831384c54095ed049025e0f6818b7 + pristine_git_object: 3d4cd79c9eb5b88cf5ec0c20525717a69df29cc3 + deleted: true docs/models/refusaldoneevent.md: id: 6afbde18e9f2 - last_write_checksum: sha1:03f91c282666c7b395a278c27bb53d4ed6831eb3 - pristine_git_object: abe4a0c53992cfbf18a8fcb96f70ecc77f844995 + last_write_checksum: sha1:22a0c4a77246571196d2db1c401c0a596d94efaa + pristine_git_object: f9e461ca9711800101582840ddba41a6710138ed + deleted: true docs/models/requesttimeoutresponseerrordata.md: id: d8c3c018c9da last_write_checksum: sha1:db536113967f3acb8e19fed70eee3dc3dedfaa19 pristine_git_object: 035e06a4d3553d4dd50a7f39bb788eae7e5ea48b docs/models/requireapproval.md: id: 849ef50aae95 - last_write_checksum: sha1:a30899df180d439ec5c3389aa7dcec2f39c7a5d1 - pristine_git_object: 32ae10be36ceca3a94b26e75a646ca58e2ab2a9a + last_write_checksum: sha1:7c1ea1cd70c05a83051fa9ac0360142ab288d1b4 + pristine_git_object: a8e7a7e23559c40221236026eb2e9f9f0e725cd6 + deleted: true docs/models/requireapprovalalways.md: id: 05d4af4eccd7 last_write_checksum: sha1:ec913748088e06f58bb2c16860c983413b767768 pristine_git_object: a773b33e76efa25e53a56d4d729221d3fdd3f59f + deleted: true docs/models/requireapprovalnever.md: id: 77f9fa189fee last_write_checksum: sha1:9cc2b084de7b3d0ff91d18d051083eff8adf31f9 pristine_git_object: c67e97d077270ee4cdf641bd24a871c53b99e3e8 + deleted: true + docs/models/requireapprovalunion.md: + id: 551dc6a7a607 + last_write_checksum: sha1:febe4ba6a323741431a0d66490487ff7f0416585 + pristine_git_object: 3a877dc9fa39dd5bff9ccb16ef255e6af80a49f0 + docs/models/resolution.md: + id: 7d1066bfde17 + last_write_checksum: sha1:0319d080679b03d75765d5f87a5615833db105d3 + pristine_git_object: 01e22beaac6254850b7af1dfb6bcd19e8ee0bed5 docs/models/responseformat.md: id: 50a1e4140614 - last_write_checksum: sha1:24a9b20da24512740fa4519d08c132e7d836d739 - pristine_git_object: 229fe6f8d86ca655bdc0e84f7f6e162cf916fd5c + last_write_checksum: sha1:60176b684377e23563f0fd75f0505493283e10df + pristine_git_object: 85828f02bcd71847bb663aed19931a3ee40510fe + docs/models/responsehealingplugin.md: + id: bac517f9331b + last_write_checksum: sha1:d648c8cf3df4c59aac454314552a7864745f7ff4 + pristine_git_object: f4ab86a3f5d638e759ce2bbd475173bd18134889 docs/models/responseincludesenum.md: id: 40a516114048 - last_write_checksum: sha1:5658184501c960050bff953f9454bee37b649bfa - pristine_git_object: 814f2c3b8c409e09d941945a529cad20208de84c + last_write_checksum: sha1:1fb4c14f13470056b3ef992f363556c50fd1a67a + pristine_git_object: 2a00ce799916a73a6f7b4b54d16a2409cc1cc3da + deleted: true docs/models/responseoutputtext.md: id: 95e91ca81990 - last_write_checksum: sha1:50491236b5e708d7b7784b7945fda71901bf2269 - pristine_git_object: 76338eb342729aae5bd236f26d087354499371da + last_write_checksum: sha1:41b793f7e10801c6ec503ec3a6a04362cc17eb20 + pristine_git_object: 30fab527736e54331b97c55370f10cfafeee518e docs/models/responseoutputtextlogprob.md: id: c8fe84770887 last_write_checksum: sha1:33d456f609ec0289cff49992181390dc2162aa76 pristine_git_object: b8f8dbd40a99c8dd179a8746a73f41359df2e499 + deleted: true docs/models/responseoutputtexttoplogprob.md: id: 4cae20e12fcf - last_write_checksum: sha1:561e05b3d842295788e963a3cd0d5609657a7778 - pristine_git_object: 9e5fada59213aea3dacee5009176b80cfb637d03 + last_write_checksum: sha1:3c5b3ef88bf9e43df5d59d08b298d9dee5bb8c23 + pristine_git_object: 9c09574bdc0f9beae841fe7f0e081adb3040c28c docs/models/responseserrorfield.md: id: 03dd50404dff last_write_checksum: sha1:84b4728077d3f577b2ef7f0c41d0f96cecb3bf10 pristine_git_object: b29a01e17ddc4a8537b7fce887b467ed248709ca docs/models/responsesrequest.md: id: 8c2dd311f9ae - last_write_checksum: sha1:7aad6e2ba6accf08404632703d8b8b883f448555 - pristine_git_object: 6ec515f2ef6c222e1be0aca391a15c2f827223d6 + last_write_checksum: sha1:b38d1aad58074ab0f4e863ec5ae1cc8dac28d9a6 + pristine_git_object: edf2460066996479cd8e1998f57f9c7616bf0930 + deleted: true docs/models/responsesrequestignore.md: id: c4f071afde0b last_write_checksum: sha1:1d8443ce44e3c7f5a15fbbcedb391e780e158cbd pristine_git_object: f9cc42bde19d262e224bf4e6ae197896494723c8 + deleted: true docs/models/responsesrequestimageconfig.md: id: 8f45935983c4 last_write_checksum: sha1:15e6cf836cf0cf46d94eac7bc0f7b89404021d6a pristine_git_object: 9091908dd31fc14aa3a2c9fa589be3062de41ada + deleted: true docs/models/responsesrequestmaxprice.md: id: 98f199c91fee last_write_checksum: sha1:314f8ae0a29ae8893496cf795249ea3badbd8ca9 pristine_git_object: f388065b14ae9d902171a8cb3b49e025ca6494c0 + deleted: true docs/models/responsesrequestonly.md: id: "294886662168" last_write_checksum: sha1:42ef7f9a2d06cbe43fdffece7d7be80e0360fdee pristine_git_object: cb8a63954fd881e0bd9d7d8caaf8b0ca60c218e3 + deleted: true docs/models/responsesrequestorder.md: id: 23cdc1d05fda last_write_checksum: sha1:9cabbbb09d8e9fad4b9982d68d5e01e5959af82a pristine_git_object: c9292ff23a502c82d92a0084883431820678579f + deleted: true + docs/models/responsesrequestplugin.md: + id: a4b8f9908846 + last_write_checksum: sha1:a23891763877b1a84804340fdb1b433005191861 + pristine_git_object: aff38c35647a5bd8c6c03c1810a81948f6feef2d docs/models/responsesrequestpluginautorouter.md: id: 201bec68ebcf last_write_checksum: sha1:880379cfe1180401f149a026ca9a673910e6702a pristine_git_object: 1a5702c2f74af6d39f3f9e39e5ede14801bd2bbb + deleted: true docs/models/responsesrequestplugincontextcompression.md: id: 7d9bdded251e last_write_checksum: sha1:ace8e9bb310f425bc6c263155847259ea2e7fa3c pristine_git_object: d278926ea8c3acfac70571a8d1f492c1916aee30 + deleted: true docs/models/responsesrequestpluginfileparser.md: id: bc0d5e7866fe last_write_checksum: sha1:fc3a08f3b8394d6d1a0de65bc388557b7c43a8ce pristine_git_object: 209065d0de74e5c666d3b9b07c77d6a61b4f8d43 + deleted: true docs/models/responsesrequestpluginmoderation.md: id: 0f7e9f0c217e last_write_checksum: sha1:80ea7f74940c16aa77719fd57b808039b85dfb13 pristine_git_object: 11e28cd49fa01bef2681bfb471d2cd97cfaa01bd + deleted: true docs/models/responsesrequestpluginresponsehealing.md: id: b4f19ad0d160 last_write_checksum: sha1:22c5d9e5a1d7828561a0a83a4395c45f1c07cb13 pristine_git_object: ace526814f86afc1cf60cf814a251fd394a72546 + deleted: true docs/models/responsesrequestpluginunion.md: id: 6cb4cfe01348 last_write_checksum: sha1:d294c8375d856c7c5645465600b90a903a866a43 pristine_git_object: 71eddc9314d95d5b5810b8c6b04dbaf9b6d7b221 + deleted: true docs/models/responsesrequestpluginweb.md: id: 72acbc887188 last_write_checksum: sha1:41296b2204734038c53ea2b55cb817eb236294c1 pristine_git_object: 63ce40d59bc41b1c9a25e6b5650d7e8962b69537 + deleted: true docs/models/responsesrequestprovider.md: id: 5d604be8a30b last_write_checksum: sha1:d464dc87d59f8fdf934c873ac9d3b68e23a78f92 pristine_git_object: 209abb7df9ea741d9311859bcbeab2626b3e04df + deleted: true docs/models/responsesrequestservicetier.md: id: 1bf12cca7f6e last_write_checksum: sha1:84e5d6e8fd95e96ed39d226a25d2b8e78ae81d41 pristine_git_object: 7fb0292f6e887f1bc5695f0034be275f8f406a6e + deleted: true docs/models/responsesrequestsort.md: id: 58bd32eeaa12 last_write_checksum: sha1:d2e7907d583d15cd538c24416639400309bd90c2 pristine_git_object: 264217e109e7bb5ccf81a0c8d5a5f100605688c8 + deleted: true docs/models/responsesrequesttoolfunction.md: id: f8b922a40569 - last_write_checksum: sha1:fe1c3aac7b1638ae4c1e928eb8d396b134e44348 - pristine_git_object: 28570932289bbc5723956f011058e21cf233eb82 + last_write_checksum: sha1:1859a49fdc4540244836833e22430dd6e9039595 + pristine_git_object: 05eb79a87227dd26ffa35788a22ea5b9de6192ce + deleted: true docs/models/responsesrequesttoolunion.md: id: 0cab4203954b - last_write_checksum: sha1:66b53802b3bf446c52d14778924813ad27f593eb - pristine_git_object: 335cbd26f4a12ff7c88cb8e8b3dd8337ec7c9f09 + last_write_checksum: sha1:73a6fe020106147f207c48a80c74ab3f3925a6ea + pristine_git_object: b9a408cd102e99c793193344b522763699eb6dc1 + deleted: true docs/models/responsesrequesttrace.md: id: ace3d4b73652 last_write_checksum: sha1:6933c4c733cb6f45cb07dde56a02d8fea17fd476 pristine_git_object: 099922b73a48bff6768fe90481b8ca7a168996ee + deleted: true docs/models/searchcontextsizeenum.md: id: 4de34693233a last_write_checksum: sha1:efc7659126209876e2b83b5fd67b1dc379796ad0 pristine_git_object: cae2b42b5d37cec04614acacf0805b08217dec45 + deleted: true + docs/models/searchqualitylevel.md: + id: 2940faca7194 + last_write_checksum: sha1:0957dafcbade0cad136e8fce0f43ca7482329995 + pristine_git_object: 0062e6bd899d73d982537e656e191888eedbb2d3 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:1978f84a4c782f5ed85eb03074a6fa5e19f103c7 @@ -2737,118 +3405,187 @@ trackedFiles: id: 70c2f7120f4c last_write_checksum: sha1:ffa7c6b7a9f2286cbd677ab7fd97d240f0e29ca5 pristine_git_object: 0e1a320b56b42a7817387a2538a9ce7ddcaf67f1 + deleted: true docs/models/size.md: id: fa13061e86ae last_write_checksum: sha1:18590e6cfd13d671a075480e68beecab874b614c pristine_git_object: b226d39ff9119db35c815d05c34b41923d840954 + deleted: true + docs/models/sort.md: + id: eab5be40af59 + last_write_checksum: sha1:21724ae2bcd6f9cbdf5bcd83973edec12a4f6729 + pristine_git_object: b128eb45dc4400f466a592da89c0a2654321b5a7 docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:a42cc7c70cebcf51fcff0924a663565de5bfeca1 pristine_git_object: 9b64b472f50739a8f356df88f52730fbd23d42e7 + deleted: true docs/models/stop.md: id: f231cc9f5041 last_write_checksum: sha1:5e7c2e81c789b9117be2062afe12bc8dda431846 pristine_git_object: bbb864dc85fd4feade6c614757fb2951386304b3 docs/models/storedprompttemplate.md: id: 53344431423f - last_write_checksum: sha1:baab6ff9fcf9ce7faa9abdb672539d430102430c - pristine_git_object: 7671d76e7d3fd1ab53f08c9239d87117aade94b1 + last_write_checksum: sha1:91e6a59617d31a34605a530690e08cf0b037d8f9 + pristine_git_object: d7eba318f407adfae4996ceb42e350957bf767de + deleted: true docs/models/streamevents.md: id: 7b9e7f83a124 - last_write_checksum: sha1:d23aead4762247ffde5ff96f9b68fd0e7753b8ff - pristine_git_object: 4852acf6e8d9839096a3c81fc98a56ba9d1425f2 + last_write_checksum: sha1:e4b4b0fe65b4b6a2046b2b1da803635f38b77420 + pristine_git_object: b9ddeec16fce427e1e6647f44104d59b8f198e09 + deleted: true docs/models/streameventsresponsecompleted.md: id: 162356c5e731 - last_write_checksum: sha1:9a6b01ee52ad161d34f98ca0beffab60d521b1b6 - pristine_git_object: 48ab621e694b64b7ef6ee8e6c77270378f66aaff + last_write_checksum: sha1:018658369e40de9ed1c98469ef0d5edba02130ff + pristine_git_object: 999b2252ce67327c137ac45a84d4f819f9318ad8 + deleted: true docs/models/streameventsresponsecreated.md: id: c7d88a6e1e7e last_write_checksum: sha1:98bf239fad1ed6746cf0a4a8382f573ff9936235 pristine_git_object: 0360921330e6b67643f50f9065d0fc57882be6ae + deleted: true docs/models/streameventsresponsefailed.md: id: 9b4d88a50d47 - last_write_checksum: sha1:ff0b646e762dff21f71e297281f788239fbdc134 - pristine_git_object: 370f44ec35b60ab1c1a606f614d0caeb31d04eae + last_write_checksum: sha1:e81c72af5ceac4d7a42f566ef6bee00fea6c312c + pristine_git_object: 604b37a1a40f4482050b9f6263f177784408e7b1 + deleted: true docs/models/streameventsresponseincomplete.md: id: 095f1aaabbb9 - last_write_checksum: sha1:acb657418d960ac95174e0067d7e48043b88b050 - pristine_git_object: 02c3ea1a80d94db2ec951ba1846158b91c7eeb83 + last_write_checksum: sha1:4c01fd2a485a4ee9d514fa7ece6d10a00b8e6e11 + pristine_git_object: aefe83a9cbe48c1db11652d488aa599435df5d4f + deleted: true docs/models/streameventsresponseinprogress.md: id: efae882cc940 last_write_checksum: sha1:57c64b48566d37f8e57a304add33218018440bae pristine_git_object: fd9866632ce405f3c22dee7cea2d2653a099ca51 + deleted: true docs/models/streameventsresponseoutputitemadded.md: id: 322d7352fb7b - last_write_checksum: sha1:228b91b3c0d9f2b8d1c78d0b87ca91d9de35001d - pristine_git_object: 1a35e6a3376f84f932622d76d02386792911eaa7 + last_write_checksum: sha1:13703617c03afe83672c77df7a577ac796fff206 + pristine_git_object: ff75ee327d968b963a9cb5c29890f0f464295e7d + deleted: true docs/models/streameventsresponseoutputitemdone.md: id: 2e34f520d07d - last_write_checksum: sha1:0b05b5f2d34a3aca47ee4e5deabc9949f0111617 - pristine_git_object: ad3f6ab4e687cf302bb7568b5dbc78cc5c06b8e5 + last_write_checksum: sha1:286ccd0a4917f142268ececd2463371d263fafb9 + pristine_git_object: 2dc32ef13b17dafea48673fd0392b54a31b75061 + deleted: true + docs/models/streamlogprob.md: + id: 98efa527982e + last_write_checksum: sha1:3e845d902c0aa78dc24bbc84ae88f26d00ac7e19 + pristine_git_object: 7aa0058335f739bc6b543e47bd8f38ce13d681d6 + docs/models/streamlogprobtoplogprob.md: + id: 33795bcad34b + last_write_checksum: sha1:78d44f4a01a19cb3de4ea2669e1fd44a99f9ab33 + pristine_git_object: 3e320b34ce6fb3c0ca11180394f3d9b3c94a2a20 + docs/models/supportedaspectratio.md: + id: c1b5ceb02e57 + last_write_checksum: sha1:c5ed1d29d1f893896b88eb542138e00245686be2 + pristine_git_object: 173648a8def335d9c999d51c330e5537530c652f + docs/models/supportedresolution.md: + id: cb5130f8b15d + last_write_checksum: sha1:8378d85b04f6e0f7b0371dab83be60df120c8ff9 + pristine_git_object: 27f82ee4f36a460141dde8098262eed9d86c11e8 + docs/models/supportedsize.md: + id: 8e46a1057de1 + last_write_checksum: sha1:84419b5fc7917caea0c0cc99e43153cf3cda59c2 + pristine_git_object: 117b4c03e04cefe2f0d00ff51d4da24ebbb92ddd docs/models/syntax.md: id: b5f23261fcd5 last_write_checksum: sha1:5ddcfb4d7a3b0cc1a8830cd48da5bf1f6e98c399 pristine_git_object: 9d8c8f924213423ee1ddcdbbb0f8ae3fcd7405d6 + deleted: true docs/models/textconfig.md: id: 3545c99b0969 last_write_checksum: sha1:f239ea46d9e41cb9356d9a2891dffb5ed99de9a4 pristine_git_object: c8bce4c0f9bcd1f57c1032c1d9664314e10054e5 + deleted: true docs/models/textconfigverbosity.md: id: e21981b23ae6 last_write_checksum: sha1:b201f812f8f8daab2a7e0e516517d5ee3884f286 pristine_git_object: 329d2368122c268da2ee979efb970bf0b2358727 + deleted: true docs/models/textdeltaevent.md: id: 65173e5d6bac - last_write_checksum: sha1:23eebb9a1f1a8b310f104f5764de004389161f0c - pristine_git_object: fb6a786a8c7c9b0392fbce6ab58c078f3700f0d9 + last_write_checksum: sha1:f87095fad3084db63f515e0044779984f66197d9 + pristine_git_object: 0dc56952b97d8de48adef6592903483c24da7671 + deleted: true docs/models/textdeltaeventlogprob.md: id: 1ad4e5b84cab last_write_checksum: sha1:762445950c90f4eb25cbe1efec2ef576c2635bb2 pristine_git_object: 797f8dabe96d2d3d4406b62caea571f242df9df4 + deleted: true docs/models/textdeltaeventtoplogprob.md: id: 1e9bea435307 last_write_checksum: sha1:cf9b8a6a51c85e8a0277ec91ff2ed78d1b862a3e pristine_git_object: a144419ebd9c8f1bacf39cad90e5919eddd22a9a + deleted: true docs/models/textdoneevent.md: id: c106b854de8a - last_write_checksum: sha1:84f5fc0c5371be365041e46e829726056c83fc49 - pristine_git_object: e89d7fe794c2c274018f81c0da1b3d8d90711592 + last_write_checksum: sha1:94eecab8ddc1e9aa16bfe39c46f8cc0d0dc49d87 + pristine_git_object: eba604b687b6f718f2714497ead6d9387df82985 + deleted: true docs/models/textdoneeventlogprob.md: id: 8c0358bac31a last_write_checksum: sha1:4ac240ac9ab81f72022a59742352e11cae04b56f pristine_git_object: 3c9576e9c52fac730a06318c4d6bac134cc723d6 + deleted: true docs/models/textdoneeventtoplogprob.md: id: 84f7c14b9668 last_write_checksum: sha1:d91e7b0430bf4e53c89e6a11bd252d74d83da979 pristine_git_object: 7edca947716376d54ca3bcca9039379e2b332f2b + deleted: true docs/models/textextendedconfig.md: id: 84225a911df3 last_write_checksum: sha1:fb75ec057fb264f6b165f24e4a2fdfd982571e41 pristine_git_object: 98416cbbd0ad574a7806407427670e99b44c6650 + deleted: true docs/models/textextendedconfigverbosity.md: id: 7e424c254a56 last_write_checksum: sha1:1f2c4a517dd885c1e844f45c9dadc012b215f4d7 pristine_git_object: 3853b4986cf6f15e5d053aad75f1cc86c13ce8b2 + deleted: true docs/models/tokenizer.md: id: 8f0a31dac373 - last_write_checksum: sha1:dfc9d70bc2c2981b40ae2471216a8654c390d31d - pristine_git_object: 38a08a8f06dfb4f9e5d41381e1bb1bd97d6448e0 + last_write_checksum: sha1:f25c6fefc85b42fe1bb251de683c720dbefefbad + pristine_git_object: c8cb31d3fa36467c32e6e9afdf9764253d1db2dd + docs/models/toolcallstatus.md: + id: 0eab420fb379 + last_write_checksum: sha1:629d281b98874d122c4afea78805d6795785638b + pristine_git_object: 2eeb28226e7795ceb5e4e547cc89f97bcb959113 docs/models/toolcallstatusenum.md: id: cf730692ab4f last_write_checksum: sha1:0082d561dec94b9038ae0684f63a7f6f4814a644 pristine_git_object: 081120623a6946b2bd980ed232da7f2fb399395e + deleted: true + docs/models/toolchoiceallowed.md: + id: 89031dc03b63 + last_write_checksum: sha1:a23d0a3a47324185aafd18981506f9d9032d7057 + pristine_git_object: 2e199da23a0aa599a4025cd0f8cce139edab7847 + docs/models/toolchoiceallowedtype.md: + id: 6b8cf808ffde + last_write_checksum: sha1:111e239d5707ca99fc56e67226fc46a6399fab47 + pristine_git_object: 344baea88a8f97f72c421ce4c8f5b029081a1a71 docs/models/toomanyrequestsresponseerrordata.md: id: b4929af623aa last_write_checksum: sha1:6135140c8a32957c3007ab7a00bc13970d083cca pristine_git_object: 5271aa4e738ebdd133994f2ab47b0a877ddf669f docs/models/topproviderinfo.md: id: 6d198b9b973b - last_write_checksum: sha1:4df4b348401c3e30d52b27aad85d649bfea28ed2 - pristine_git_object: e318660cf6780d3417a5271672f8f9416ec08060 + last_write_checksum: sha1:d79eb43a173093259badf29c6f1a370b094454e6 + pristine_git_object: 13b362bc3bfad1d3ab46258acefee44885fc5670 + docs/models/traceconfig.md: + id: bb233509f282 + last_write_checksum: sha1:bf598736d04f22cf1471e30a22526544f1f7b947 + pristine_git_object: 1e0017da5cca4428b5c3abe163de55f006c67e41 + docs/models/truncation.md: + id: 075cd6c561df + last_write_checksum: sha1:192825e4cedb7b6ad0e3bd62e884444a1a1d6e9c + pristine_git_object: 35488c984cdf487047dc9422efae0dadeeb2d503 docs/models/truncationenum.md: id: 83317dc28c04 last_write_checksum: sha1:fbebabba0d9d980f3726e2288d8817dc17f942d3 pristine_git_object: 2c019ced935ddc3a9fcd94c1d9f00e4c64ebd0e3 + deleted: true docs/models/type.md: id: 98c32f09b2c8 last_write_checksum: sha1:0ab2246ff8dbb5a4b379ef7356b2b6d3fd5d8d6f @@ -2857,10 +3594,12 @@ trackedFiles: id: b2b253610bfa last_write_checksum: sha1:8a8edef8f989c578d2c1a6d60a3c2345723ef2d5 pristine_git_object: f3dff1721e733ae4322aaf271700fdece67aad10 + deleted: true docs/models/typewebsearchcall.md: id: 94eb257927f7 last_write_checksum: sha1:d720b3663ff1b3bdf3466c91ff808872889b6dad pristine_git_object: 946c111d2b0a8421355b271b606b1420e65716d0 + deleted: true docs/models/unauthorizedresponseerrordata.md: id: 769991618d26 last_write_checksum: sha1:073e42ea882cc210725f64898e33a58687444bdf @@ -2869,122 +3608,211 @@ trackedFiles: id: ece17be345f0 last_write_checksum: sha1:f9fb4891998fb92818f079d00d3081ead7d51421 pristine_git_object: 3f171e2729563d44cc0814b7f6707b88b4a24f49 + docs/models/updateguardrailrequest.md: + id: 720b87f201c8 + last_write_checksum: sha1:98f62fb10dafe6498ab306e59f962b27c550970f + pristine_git_object: 6bfa8196519388c21df186992dff97e58c25f3f3 + docs/models/updateguardrailresponse.md: + id: e651ac0d6e06 + last_write_checksum: sha1:3145238ec04164390f5771b79a97d5fd5abc9375 + pristine_git_object: 83b87eac4242523b8ea613267b10d0406f86d7f1 docs/models/urlcitation.md: id: 6aea1a90dde8 - last_write_checksum: sha1:5c2d51069922bda24df2a5c183056ae3adaf28ef - pristine_git_object: 284cac107e23a55fcf60f87c6ae3a23bd351365b + last_write_checksum: sha1:e165d05ffd4cd04c327ca3dbb6aab52b2908d734 + pristine_git_object: 3b7bed473bc0ce956916301ba03fdd2e30cd81fe docs/models/usage.md: id: ba79ec873169 - last_write_checksum: sha1:dba6fee826d3263cd168bbad34df259deb8ff517 - pristine_git_object: 1795427f569c1437edf6401cc7eb02dd68795685 + last_write_checksum: sha1:1e186f8a9e795063cf1ff168c38a9a449b48da78 + pristine_git_object: 780c4bcab8037d74aaf81a330e425b63be9bc5e3 + deleted: true docs/models/value1.md: id: 5d6c54c6615a last_write_checksum: sha1:8f0d1850d9d5b27f3717389e66940ea8b79522bc pristine_git_object: 14cf6ee7046fb6906ba16a49b42e0adcae8e937c + deleted: true docs/models/value2.md: id: 4eceb26154e6 last_write_checksum: sha1:6a308cb36ac4093c71db9b30b0dacb56e9a69d45 pristine_git_object: bc3d57a239e953ecbf8db811e906c50c38d7fd60 + deleted: true docs/models/variables.md: id: 332583bb3e65 - last_write_checksum: sha1:581d6e368583ec6e73710ac6995fd140775b66f8 - pristine_git_object: af35d730d67e9cc7545315d87aa7bfac27247e11 + last_write_checksum: sha1:c1535f9a967396c0a9c48aec4b3a8ff78c3992c3 + pristine_git_object: b49ee1248d2e751a82476c0ae7b852a85d7d9661 + docs/models/videogenerationrequest.md: + id: 54058783eb0d + last_write_checksum: sha1:37efb3ff5c68133b98a3180ddaac5237b1920339 + pristine_git_object: e0db7cc798936179fbd0b8c2ed2f52253bde811e + docs/models/videogenerationresponse.md: + id: a34cc8c878a2 + last_write_checksum: sha1:ab1cd51722f034f5edd024a6006efa4fb3adbbf8 + pristine_git_object: 5cee5c105ebf615dcc1ebe4ed607f8a397a8ee75 + docs/models/videogenerationresponsestatus.md: + id: 8f8cbbe2dd14 + last_write_checksum: sha1:23e73263a77ce0cb8a90f8b4a2239d8d25dfb242 + pristine_git_object: 0e3ce873795597213c1edc195479bf2d081130ca + docs/models/videogenerationusage.md: + id: a9f1fc9e771f + last_write_checksum: sha1:76cfe74934b40b9b933771f4a9f703ea685f4c75 + pristine_git_object: 3a4f50dce5e3849c4c3c3557abdbfd0b32d807cb + docs/models/videomodel.md: + id: ed1b9c7f5fdb + last_write_checksum: sha1:ff4195bbd790292a579e342ce670032eacb4d329 + pristine_git_object: ad2facb0792c807ba33571995b3b2c256a8e63e2 + docs/models/videomodelslistresponse.md: + id: bf7d9398141d + last_write_checksum: sha1:11eb51092244eb5fc24ae54e00ec5d04892576af + pristine_git_object: a442bdab9d4c422736ad8489bfb10edf584774a0 docs/models/websearchcallcompletedevent.md: id: e2a1dc96eec9 - last_write_checksum: sha1:d627396314c56e2a7d51a0217473dc927a74514e - pristine_git_object: 16972ad48fd6f7da0a3cdcf0e981bf63a259f4b6 + last_write_checksum: sha1:2b30a617fa4712635ad9c0d0bb928d5fdebc2bb8 + pristine_git_object: 2ac40d7fd46b181b675e0257ba63a161326e6d56 + deleted: true docs/models/websearchcallinprogressevent.md: id: 2b72bdd03768 - last_write_checksum: sha1:302459567e87522b673d425a31a4bdb46bdfd4ef - pristine_git_object: b5fe15a11ba9f045afa16db67b04ec2baddc8a51 + last_write_checksum: sha1:4ad5b51abf03e53dbd269af2b026c1669376ad3c + pristine_git_object: e703f24393f6f64042f3fc82543e03f93a599564 + deleted: true docs/models/websearchcallsearchingevent.md: id: e80558eb0591 - last_write_checksum: sha1:d32693dcca534f8e5773bc4f93a6ca9dfc9f5599 - pristine_git_object: d92f1a0af094770d5d31d2165f64c230b7a9ce6d + last_write_checksum: sha1:e2258e5a4588700b798cc5b8cc20caf3aa55d1ef + pristine_git_object: 4bb2fa89a0f24a0bbc7aea3c1cbd54dc01aadb51 + deleted: true + docs/models/websearchconfig.md: + id: 9db26eaa5afc + last_write_checksum: sha1:ff8f6d859f3412ee710c1033d6f2954672922dd1 + pristine_git_object: 7cbc4bc7b04fc74a6bc9f8b72cd4d5908085f272 + docs/models/websearchdomainfilter.md: + id: 0139e0f81963 + last_write_checksum: sha1:148f58c10dffc402e72aecea9550f2e1fc780e00 + pristine_git_object: f133a06445e56c8bacf3c412b48bb220a93e2e2f docs/models/websearchengine.md: id: 2a21d29e41be - last_write_checksum: sha1:ee5e6ff9fd57151f6dbec8f17543aeee75107597 - pristine_git_object: cc70585e4501b4082656461d94305ad65a867376 + last_write_checksum: sha1:d99c15bd9691fd057218e260d6b88f342b90e265 + pristine_git_object: 142e52f7d42af65d3fb2df405bfd9b94e5d54f17 + docs/models/websearchengineenum.md: + id: b841cc1abdd4 + last_write_checksum: sha1:1e800fdfd978eee813fc468fa19ed9f293173d8c + pristine_git_object: 45d3c043d243c18ffde26085ceb33dee4e4223a8 + docs/models/websearchplugin.md: + id: 92ab32076027 + last_write_checksum: sha1:8cfa45758cc91708eb598c6f9394908f3695ba71 + pristine_git_object: 2189a2bf07d2987f6a8283b58a39e331a2df2741 docs/models/websearchservertool.md: id: 46b94ec8dea6 - last_write_checksum: sha1:e04d95d2fcb7de91c7658da60363b188753a0457 - pristine_git_object: b63fce39db56c2b0b599bda0fcc80b0b3ada9647 + last_write_checksum: sha1:2a6f051be9e689206459d10def6372553c2aea71 + pristine_git_object: 0c1c7c3da155a876cff4dcc0284d6db235a52d1e + deleted: true docs/models/websearchservertoolengine.md: id: 2901cb207f2b last_write_checksum: sha1:8b9459d977542bfd0c40014bb77e63617b02ac63 pristine_git_object: 26acc86c0b104b78a795cc881a60963e18743e20 + deleted: true docs/models/websearchservertoolfilters.md: id: 5ee49da43853 last_write_checksum: sha1:cbdb2e28921910fb5a990851106cf72d256f520c pristine_git_object: 31a41965ebe70022a6b07e22b2e93ccac87e3d72 + deleted: true docs/models/websearchservertoolopenrouter.md: id: 0246a19f960f - last_write_checksum: sha1:6e0e6eb38953b7ef2113f5afaa075b155587fb4b - pristine_git_object: 7bed7b6caf1fc814f5abb9c887a2029fbe5a2a0b + last_write_checksum: sha1:ceca959b516331eb09b3726b7589c01dc8dd4df2 + pristine_git_object: 21a01d50d958987cab8b044f71cebf9891eec862 + deleted: true docs/models/websearchservertoolopenrouterparameters.md: id: 0f148073d88b last_write_checksum: sha1:75ff4b5e7c5e5cefb25c945ed4e75c8ed772e0f8 pristine_git_object: c6b7e6b3bd29b5a19f8a067bdfeda71722e95231 + deleted: true + docs/models/websearchsource.md: + id: a8025a04f2ee + last_write_checksum: sha1:599ada4d8ffaeaee4191f942bbdde890d303304a + pristine_git_object: fe8e5366d64df02a951294495205295fa47fc562 + docs/models/websearchsourcetype.md: + id: 3e68acd287e8 + last_write_checksum: sha1:8cd80ffffb30497b4fea5f38c3525951d9518098 + pristine_git_object: 10a3acffff337404e396e0ef80e2fb128e1c5bbd docs/models/websearchstatus.md: id: 2d69b50ae71b last_write_checksum: sha1:d3e1e883df750a8336351c3ecc8b62f2049b8086 pristine_git_object: e0053fa131c06af8a33038824f0d672050eff484 docs/models/websearchuserlocation.md: id: 158041f6dfe7 - last_write_checksum: sha1:dcf67aee35de7d833b3933a095fb5a7b532ac91d - pristine_git_object: 55b969a08a276f01cdaaf252321ea555adcd3b29 + last_write_checksum: sha1:6e9562ffcdc27cd387d9f5b7a02c30d39bc6eba9 + pristine_git_object: 0371ce87eb64510042f459713ef958ca57094d62 + deleted: true + docs/models/websearchuserlocationservertool.md: + id: 938bad6d3533 + last_write_checksum: sha1:e5f775f4783918cd8d1ad2accfcf9cda2632db81 + pristine_git_object: f5ff78a3c9269fa65acde69d94fa9534724f3fe9 + docs/models/websearchuserlocationservertooltype.md: + id: bb6078a05d2a + last_write_checksum: sha1:3a2c923d1d6f1f8f9a1e5b2fd2b2c35040a178dd + pristine_git_object: 2378945bfa68175821a28c7cd087d67aea950456 docs/models/websearchuserlocationtype.md: id: e437c7477fce last_write_checksum: sha1:9913dd9efb5078245c84567023699e183f97eb33 pristine_git_object: 8e81b3fd5c750c14ae6cddfed175945b72089152 + deleted: true docs/sdks/analytics/README.md: id: 4c84abb05030 - last_write_checksum: sha1:4e54a77cc2c4e0231428ff27a9d20541b0f4ed7f - pristine_git_object: d74a22067d9997ec0c76f882f351ec558cd01ff1 + last_write_checksum: sha1:2fa9f1d634d11b67fe2ce775619b5902fa1626e4 + pristine_git_object: ffc847275bdd4a6f88170d4a0a198faa083a28dc docs/sdks/apikeys/README.md: id: e2bd25998427 - last_write_checksum: sha1:93bb601c259c528457774cd5bd9493990a21dfce - pristine_git_object: d5424399394468280b833d9a1082c00a42c9534c + last_write_checksum: sha1:cd689cda1abc84e10b26a684f4528fa7ca978c38 + pristine_git_object: 7ea37a8bdc7b66d940fd241301c6e06267a7d2ad docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:0e620173587952ab3d77b9464285431aa41526e0 - pristine_git_object: bebcd5798911bedf845af1fc5bff1c85846f3db7 + last_write_checksum: sha1:22ad15c47e2da2e33595c9807d10f385b5fe44f1 + pristine_git_object: b36b2ad6e8aa736c51a087184219cf687cd2fb33 docs/sdks/credits/README.md: id: 81608135c0ff - last_write_checksum: sha1:4bb44b478c0d1e0423790679428c3b74d25bea07 - pristine_git_object: ee5a6600c153c598b1806cf5c216511d83a0c8d4 + last_write_checksum: sha1:fddf93226f9196a966a592422c07720f5233a8d6 + pristine_git_object: a902be6fa740c256c7a78fc05b891ed610710feb docs/sdks/embeddings/README.md: id: 15b5b04486c1 - last_write_checksum: sha1:d8e5a2c9498b1fa97d75bf4f85592630617cef29 - pristine_git_object: 286acc1a794c34d932712f41a331db5d802828bb + last_write_checksum: sha1:c578c86ccb4c956fda6a316e7eb53f21dd40cf69 + pristine_git_object: 835b2250dfed24734543bed405817b63e4dcd502 docs/sdks/endpoints/README.md: id: 80d3fa9f5f5b - last_write_checksum: sha1:e3ab3615747e2f29ad687ff9e6ac6e11f434556c - pristine_git_object: 6e24546b375d8ec6490dfa420f87a4c264b53f67 + last_write_checksum: sha1:984cf2f683bb6d8c75287d5781476313e1811aa0 + pristine_git_object: a06c00edbc0f6de3927675b6e1fd0d4773a82985 docs/sdks/generations/README.md: id: a7d12ae95fb1 last_write_checksum: sha1:f259bf46cd7ec3b7caf5afcd9bb730e6f73d5c6f pristine_git_object: 0667b0577924b2570ed4a32459c111383170361f docs/sdks/guardrails/README.md: id: f72b38a5a2a7 - last_write_checksum: sha1:7dcf248293db2b4e7b762956aeebc85f8aafd450 - pristine_git_object: e55ef8b0f8783d4d3bb739a0e37e2c19cca0d1c1 + last_write_checksum: sha1:bf7746272192c2e87b662ed0ada2c8b23855737e + pristine_git_object: ad2186834f5f78d12fd111f9791b834312c9d2ab docs/sdks/models/README.md: id: b35bdf4bc7ed - last_write_checksum: sha1:f725c16e8c418ac7cbb0b34f129f1d8c0ff6c042 - pristine_git_object: 2e4d0e645aa9c251cef6c2f028a1c6c3502ffea1 + last_write_checksum: sha1:94e8f139a213755377a14fddaf5fca7b393723a2 + pristine_git_object: c2d128e7e6374e45421720c0b3b74a2cd873c8b8 docs/sdks/oauth/README.md: id: 80ad2c1a7b62 - last_write_checksum: sha1:defbc1d8278d76e99e4eb5473f8acb048d92621b - pristine_git_object: c3e6fb2bd1f6a37436c4077e5b6aab3c2898f648 + last_write_checksum: sha1:9f295a2562c2a3dc980a0e301aac93c4344ba4d7 + pristine_git_object: 7d2b462e40254998a168195906a339198bb809a1 + docs/sdks/organization/README.md: + id: 69e4232b8432 + last_write_checksum: sha1:52adb5056b0cf654a5079dae45853990709380d3 + pristine_git_object: 2dee941019490637ff4698640265e1cec1b6f175 docs/sdks/providers/README.md: id: b02aa45c0093 last_write_checksum: sha1:caca852ec93cf16ff32aef63832948cf43790d74 pristine_git_object: fe849dc37ce12bac9da8cb2c47dd4c6845df0e4d + docs/sdks/rerank/README.md: + id: e2b361cec1dd + last_write_checksum: sha1:87e8d9d81af635440065cf411dfd4f3117666966 + pristine_git_object: 5bf2e278966467a76d46fdbc1e87728f1fb46247 docs/sdks/responses/README.md: id: e717bad14f63 - last_write_checksum: sha1:6c59dea327d1c392e01256d86c0dcd80c291066c - pristine_git_object: 20c266d330da4cfe7f7122afea48ad65751bc2cd + last_write_checksum: sha1:cb305dcdf91f6051d822918f872d381319b3fb81 + pristine_git_object: 7002690cc52491b4677db8ce5aff65d0a75e09ff + docs/sdks/videogeneration/README.md: + id: b6dbf7b0729c + last_write_checksum: sha1:71205a37afffed445af770082c3f50f6bcbfadfa + pristine_git_object: 9a188bb5e0dab9c6de88f671c5ac15b712ae0c4c eslint.config.mjs: id: 461c8d07f6da last_write_checksum: sha1:9398f326377fe47f67af2df6eb6370750c0790b4 @@ -2997,166 +3825,186 @@ trackedFiles: id: 9d0f69d6e677 last_write_checksum: sha1:7020adbfcb166e8efc6f1dc6cc7ba508df522660 pristine_git_object: 3023d20d49edb84df485d98777ec339f33b5ec6b - examples/betaResponsesSend.example.ts: - id: 66896eb477c6 - last_write_checksum: sha1:d700f0c290112977693207cd0cd9cdd51c59eab2 - pristine_git_object: b14adcbe9a0db9cf2919bfe2f7f7fbb02163ee41 + examples/analyticsGetUserActivity.example.ts: + id: 7ccac02a65ba + last_write_checksum: sha1:c8ff6fe2d6003dc09ae2b01005c569d01faa979b + pristine_git_object: 6dffcab2f3bf184426e16da2335cdb1bb9ef1041 examples/package.json: id: c1d7b0ec8e7e last_write_checksum: sha1:ce55578b5e4f5ea8dbe806eff6cf5d6bdd8172ac pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:13daedf71942f557fb3f3357bd8c7e6deaf9995a - pristine_git_object: 701d990fa847f0f1cb240abd13ea48a5c6a753ca + last_write_checksum: sha1:b522d64881528c41103fc6015bf07e7404689ee2 + pristine_git_object: b88f6d3bb76aa6bbb9fc916041efe9cbbd857316 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:614fe676b19f3399c8d3bd9c52bfdc878721ffb4 - pristine_git_object: 84d652e14d239cd467926d8bce5f136ca76c7f6d + last_write_checksum: sha1:76dc58f211dae406400855abce4a40c85da46f70 + pristine_git_object: 27663df636a210b43bd96194eb461f156a046c4a src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 pristine_git_object: 8747345312bcc83a569602bf521f20f0e1559fb1 src/funcs/analyticsGetUserActivity.ts: id: 6525bcc66ab5 - last_write_checksum: sha1:3f896b945b476cb683f50e5d2e3de7aba2c90bcf - pristine_git_object: 3fb172c2b553841d1f7a8995742fd8b9ae1a4ce7 + last_write_checksum: sha1:da1c3677da302018a6ab71dbb37c6053a137bc18 + pristine_git_object: ff4692c7702dbad89c5d782a7af87aa575d495b0 src/funcs/apiKeysCreate.ts: id: 133e2c5f487c - last_write_checksum: sha1:25ca9081e1b2850f55ff27fdd6574f476607d283 - pristine_git_object: 15302b5bf9937f57e9cf6759af7fbd7fefb088c5 + last_write_checksum: sha1:8a38e086638144d39452bfc35b883d381616ef08 + pristine_git_object: b0e0b48876aeaa23ede2b904c8e72fe5e842bb4c src/funcs/apiKeysDelete.ts: id: c151c399f75f - last_write_checksum: sha1:ac55e1028d768167da6208228cfda6000e08b281 - pristine_git_object: 65e8e4d26f228ec04e51c4f3c030ae515449afcb + last_write_checksum: sha1:1fb8f8dc40ec41e51878c6bfd40d5f869b128da3 + pristine_git_object: ce7428d9d0c4bce11ec3edde86589ed962d441ae src/funcs/apiKeysGet.ts: id: 12a5c2abbddd - last_write_checksum: sha1:1522e65bed56299a24d15e2010c7e4a343481e7c - pristine_git_object: 48102f93c1f1e808e21b3dd04131ef5152705b59 + last_write_checksum: sha1:0c883ae1135f0d3dd2e82b0e13af42b81b644991 + pristine_git_object: a8c7fa6c66cd98e4c9ab48a7f97ac402ba276b34 src/funcs/apiKeysGetCurrentKeyMetadata.ts: id: d9449cb31931 - last_write_checksum: sha1:b5033bfa6274202ac8f4d1f97ab4dd9cf65ae9df - pristine_git_object: 56890099630d2449f84275cb90ecca8807532135 + last_write_checksum: sha1:2f7dc5c2ad1e93689cc4c1de43579ced48959cac + pristine_git_object: d953da3187102e4a846100c54da4ad89d872bd00 src/funcs/apiKeysList.ts: id: 2afc8d8f1ce0 - last_write_checksum: sha1:81c624610f4aecf12d1624a5e0eede95739f66a3 - pristine_git_object: 8b2d00b569770a40463899aa1185d996bbd808b3 + last_write_checksum: sha1:a8e01e8253dbe0a3fe35802a889b39044699b2d3 + pristine_git_object: 96a1d04f3d6ef8b88475a99e7f4069b78dae65a4 src/funcs/apiKeysUpdate.ts: id: 05700884934b - last_write_checksum: sha1:c5facdf98bbb575d1c467c0db3c0797a90e0bf0b - pristine_git_object: b971db8b50bf3462b01e10e1fc075271db1cf53d + last_write_checksum: sha1:27e021d0b93532c521e1150f158ab071ef1e797e + pristine_git_object: baba4cd7587f1d856ddc788349137a8dcb5788fb src/funcs/betaResponsesSend.ts: id: c5c4ab0c3f76 - last_write_checksum: sha1:07e3f9a810e08752ff9783d1eb27c729b052fbeb - pristine_git_object: 9bfaa8374c8a95dbe2013bd98db816cd1ea76747 + last_write_checksum: sha1:632348c6f1d1ced6bf4f25c8d553899b4958ba46 + pristine_git_object: 753f20ec379919d03a600757c95d5d1a17a72bb8 src/funcs/chatSend.ts: id: 8c3aa3c963bf - last_write_checksum: sha1:ac2b2d17e2d483dcc5ada6e0fc94bef6b210d1cb - pristine_git_object: e6dc03e8a0bb683c437bc26d4c3d9aae9c8b0766 - src/funcs/creditsCreateCoinbaseCharge.ts: - id: e07ee6831da3 - last_write_checksum: sha1:dcde2b49a608ff1510ea6cc7892d388e4996d6bd - pristine_git_object: 702ad6f5efe10f60f20bf52ebec604af5d4c178b + last_write_checksum: sha1:ff7df1a9799b23950f3f99a36dfdc3cb9343ab25 + pristine_git_object: a77f61ddb4e752f9357261e018e4583548f67fe3 src/funcs/creditsGetCredits.ts: id: 88fdc1315137 - last_write_checksum: sha1:57922a22594546e3aba61884924e4e8a18df10a4 - pristine_git_object: 81708b67c7a394d1952d8bc10ab9cbb9eb502c95 + last_write_checksum: sha1:557d8fd868e6682bd791e072c330b934e79ddc10 + pristine_git_object: fd128513c6c58ebaca7f5ed3db252caf68d53c1d src/funcs/embeddingsGenerate.ts: id: f6455fcfe2c8 - last_write_checksum: sha1:00de3b29f99a6e1128fd63f1b06e09ea7631f80b - pristine_git_object: 0b51ab86c84d486568aa7d58ed22e0f28d107369 + last_write_checksum: sha1:66b3113073262e908bd337986346a0f772053243 + pristine_git_object: 1cf355c9339041b628ed232afc2c30598a71e731 src/funcs/embeddingsListModels.ts: id: dbe9751f8369 - last_write_checksum: sha1:25fc28ea51b53bc91d00289be6eefa6957bdba0a - pristine_git_object: 03ed629fbd3893732d758e66518dabe9af07d977 + last_write_checksum: sha1:b2d41c90306e244373c95e475dfdd083728e2f45 + pristine_git_object: edb75a8deeb59110356896fddc6749e6387ba036 src/funcs/endpointsList.ts: id: ea932ec09987 - last_write_checksum: sha1:58f38e35c60773a48a6aa6de2198bc19b33b7f63 - pristine_git_object: 5934a72621ade6ab3c36c24729e2f02f44c6b2d6 + last_write_checksum: sha1:1df6b7d28acacc6110c7e8bbe251d35af801ff33 + pristine_git_object: 207bee76edc808d43d8d79e0bd4727f174065440 src/funcs/endpointsListZdrEndpoints.ts: id: 4efb7ea3e48f - last_write_checksum: sha1:72d81dacd4f47f7a6e1f57b35dc9de6034abde85 - pristine_git_object: 2b319a71afb974b5d3ef928848e7f77de2432e5d + last_write_checksum: sha1:124415ee1e58f09c7f19f062c62795bf5718926d + pristine_git_object: 8346d4fd80631bafd991bdfd504b9afd1c7daf98 src/funcs/generationsGetGeneration.ts: id: dac2d205a08d - last_write_checksum: sha1:1293a6d874484c413c1f5908394fbb91fea93a27 - pristine_git_object: 8e6648d64ea597cd1830f79e6b001e0041d27673 + last_write_checksum: sha1:5a02119e509a40807fc1cd5d09c0539b02530f4e + pristine_git_object: 88f41e8abedd7bb90c6bc785460100e21f1d663f src/funcs/guardrailsBulkAssignKeys.ts: id: a97261f248c8 - last_write_checksum: sha1:7b52bcc66ff561419df003ea430eeb3e674aa3c4 - pristine_git_object: 7c26b9a8dd8891a21de02cd251e79da0416c2e1f + last_write_checksum: sha1:a5d1d0aace1915176ebeadc0b24ebb0a536a2b13 + pristine_git_object: cc0ef63b3b45881be9307a2ea6296a5f3937ed1e src/funcs/guardrailsBulkAssignMembers.ts: id: a1c1e49b5bfc - last_write_checksum: sha1:dc5ad68b907dc96f3e3a2bfdb2792c6ecaa638ff - pristine_git_object: 9dc855c650a4986aac2b9f21e35d15bc942f6fb3 + last_write_checksum: sha1:e0ab61ce49cdb9391aebf24c7f372aa60f2c5ec3 + pristine_git_object: 74ca93279a113e3d3c346a4747c42bb2b2e81af5 src/funcs/guardrailsBulkUnassignKeys.ts: id: 605482eb28f5 - last_write_checksum: sha1:644d15edf1becdaf4b3f344de5b85abb65fe828c - pristine_git_object: b9fa7e71f3c8400e93f984045832084998b99183 + last_write_checksum: sha1:7af55946a71f66038c232d01f505819586e2a010 + pristine_git_object: 67e7a75fde4cce871d4ac3e266b1bcfe058c66a4 src/funcs/guardrailsBulkUnassignMembers.ts: id: 582edea4287b - last_write_checksum: sha1:ccbd4ac892e87517992c7c31dbf4b0c8117086de - pristine_git_object: 16939d931f3efd93d3d02b5a0e54a6af6e9fbede + last_write_checksum: sha1:dd4fa3211cf5ffb3778354893aa7f877d62413d1 + pristine_git_object: d0ec8d8b90deebfa46ac6b0f2e57584ec50e0860 src/funcs/guardrailsCreate.ts: id: 6d61eb74274f - last_write_checksum: sha1:64076bde775a2edb9f1b830c941cf45a67668331 - pristine_git_object: ec426bd16c28eaa957eeef4ba0bdb05bf7c4e9af + last_write_checksum: sha1:83a86bd6a33e672d5e61c12b3d8c1f271d9e1d3b + pristine_git_object: 57dc9e00a1e8de84ecb2503baf03a46b58f6dcda src/funcs/guardrailsDelete.ts: id: 2ee7e7eaab9a - last_write_checksum: sha1:fd9b64c2a823eb2cd9465b0fdf1d6ea9bb780938 - pristine_git_object: ce2562e86d0458c806075e8424b28634957375c9 + last_write_checksum: sha1:a7554a0252c2859acc00b89635f4f35522958043 + pristine_git_object: 1f983138ddeddca8ab7ae2acf52d74d2d2993256 src/funcs/guardrailsGet.ts: id: 259eaa63a20a - last_write_checksum: sha1:2c5ce8484b649077e0143786d38ce081d7340b58 - pristine_git_object: ff2003a1c001639c7f9a2042c688edbf0047187e + last_write_checksum: sha1:76eee5e38185ab0e53162f9700698f99bf5a3073 + pristine_git_object: bed357f5a0e09b2bebc309a52e3403a3862f313c src/funcs/guardrailsList.ts: id: 5a0c89687e40 - last_write_checksum: sha1:dd97f1aba2c5933babb0521e07392936e5d3cf5b - pristine_git_object: e181e7f4df9d0d69a20e1e678fbe34b40313fd82 + last_write_checksum: sha1:28051816d54904a0c71dba2edd9673a3249d92a8 + pristine_git_object: 78bd226b7de01b07c2371533c5022e422435c88a src/funcs/guardrailsListGuardrailKeyAssignments.ts: id: 524ae2fd5189 - last_write_checksum: sha1:820587ae6a5bed0d3570b3c5583364d4c05af18e - pristine_git_object: 39da0b683f0f86b157aa1e7de88d6210da56b70c + last_write_checksum: sha1:5d6e01336a47ecfb0eb8226225316f5986e8978e + pristine_git_object: 72bf31255d445e4f7b5f3ff03974a60f376ca2eb src/funcs/guardrailsListGuardrailMemberAssignments.ts: id: fc84c185d2b3 - last_write_checksum: sha1:b54682dcf56c19b80aed3fee40717867322d8999 - pristine_git_object: a4d6a85459e7e4911df3526e9c8f6cafaaa9643d + last_write_checksum: sha1:f99035727d9b1308d7491a450812937b27833a70 + pristine_git_object: 88cbd772148febffc6769c2c98f56dca3360531a src/funcs/guardrailsListKeyAssignments.ts: id: f654b4f757b2 - last_write_checksum: sha1:96c6a747b32b2d44c2ae6d94ba1520b943217ccc - pristine_git_object: b1f565043644af3cc66b8d6466c31ecde0bce81b + last_write_checksum: sha1:75d6133b66d7dc05071072d42947123bcd715c69 + pristine_git_object: 2f9ce0e1da09dd13eb390875402213c9bc0b4721 src/funcs/guardrailsListMemberAssignments.ts: id: c2762783a96a - last_write_checksum: sha1:2df10691a59e187a6d8851085d13faf36d4eb136 - pristine_git_object: 44f3e6f2dec79b28670d4a1bad10b73e830f5973 + last_write_checksum: sha1:ea26a11ec907a752cc7f69707fc7afbed2a67c05 + pristine_git_object: 2d1e79ab471b232a7b38c7a9290f8b746295d4f6 src/funcs/guardrailsUpdate.ts: id: f8685ead7098 - last_write_checksum: sha1:c5658e0ace2c7d640ab88d57f571664a8fcc36a1 - pristine_git_object: 47262b78f15ebe8ecda7c86747929aa0deb4eeac + last_write_checksum: sha1:1afa15fcfbf74c68bf3e78ae28aa8a6706fdb5dc + pristine_git_object: 5187613c69e300add9a75e26492bd8661331fecc src/funcs/modelsCount.ts: id: 371adfc67b48 - last_write_checksum: sha1:80609e415a3ce22e85911777aa92719dd2c377fb - pristine_git_object: 37341fe95b4f4e71aac9830ad89ff3c9c21729a9 + last_write_checksum: sha1:94d4e0aa9fe1ae7073acaf999c7cd50490f70366 + pristine_git_object: 0d1f8b2afeb29513fc20f0c32beaae7219afbdd9 src/funcs/modelsList.ts: id: deff050b46c5 - last_write_checksum: sha1:9b6aa77513f2ff523095f0acc9cf6030c6a5c77b - pristine_git_object: fcae3864c7ed9843574673ba5d8cdf8ffaf6f9e1 + last_write_checksum: sha1:b1283151ba65dbf338aa6ced31e8a6573d3563dc + pristine_git_object: 926d79e6a5f96069b07055aac245bb23f3885bb2 src/funcs/modelsListForUser.ts: id: db628dd3c179 - last_write_checksum: sha1:ec1362ef8ddda13d8d30b46858b78a905b78dffe - pristine_git_object: 9b406a7f176919f9c34dac5c60e02f21e967a29f + last_write_checksum: sha1:96b8a9460a3e38295a95224b32166c337f09b841 + pristine_git_object: 55abe51382d0173ee70daf48127e37b86f71ea28 src/funcs/oAuthCreateAuthCode.ts: id: 8a79f27722c0 - last_write_checksum: sha1:a9f2a489e15a7d58b035982877ceaf70061f33b6 - pristine_git_object: deb51c7d9e41e76b94cabfa00a12bfc3743ae47d + last_write_checksum: sha1:8d39aa6e64b0aa4f89d188e6180086805cfb211d + pristine_git_object: 7f7c14a3234055f71e7fde16c3a9368b823ac0fe src/funcs/oAuthExchangeAuthCodeForAPIKey.ts: id: 3386ec12d934 - last_write_checksum: sha1:cf9eb1d87a749960337500633dca8609000a5a99 - pristine_git_object: ba520dedf4ceeebb97264403d6b71d5e3ff96d9f + last_write_checksum: sha1:229e10e92b9925f9dfa58e2707dc9f2fb3f4c32a + pristine_git_object: c4720a20f4cfb378967aa1ab56963c7529f326d5 + src/funcs/organizationListMembers.ts: + id: dc6644106a4d + last_write_checksum: sha1:a50a1e032a02b98d5991cb220524b5bdaf80a165 + pristine_git_object: 4ef0a3fad14c4051d04267c3cc6f11c89f05514d src/funcs/providersList.ts: id: 8ad87e7210ae - last_write_checksum: sha1:0236177ec700bd755ff51802b7af5aefab2131cb - pristine_git_object: f37022cdb99bc280d34449c87342871237462eaa + last_write_checksum: sha1:512df809d0cc7549d3de3b4ccc05a989901e4db1 + pristine_git_object: 503bef3df768ae98e601bdebf032f600912ecb3f + src/funcs/rerankRerank.ts: + id: 915c20e147a4 + last_write_checksum: sha1:40d284f84044cbe2610c1a1c5b5f84dd9e1450cc + pristine_git_object: f39c3bac6a469e777ffcf039e5a1c1e2b3f2d0d9 + src/funcs/videoGenerationGenerate.ts: + id: 6f3650ac9f5e + last_write_checksum: sha1:aa39ddf072ed2ef7e8c0de1ccf90b00b6a45b100 + pristine_git_object: 8022b80ec2694ba213fa383e284b9567f10e424f + src/funcs/videoGenerationGetGeneration.ts: + id: 02c7e430a829 + last_write_checksum: sha1:c2d914ae1ad3d2a3c8ce347598e15264aa0be53c + pristine_git_object: 8d028ce18c341911b79e8febdc3bbc9e4064e87b + src/funcs/videoGenerationGetVideoContent.ts: + id: fcfa9e559784 + last_write_checksum: sha1:b280ff31861462f141cbd1dc1fe5ab054a94be8f + pristine_git_object: 66b533d9d047573cf375268e833b4500bbd17123 + src/funcs/videoGenerationListVideosModels.ts: + id: c46f1fcd7679 + last_write_checksum: sha1:05e522e40b033838a33522b19af4025253f13aff + pristine_git_object: d71becdddf2687bbe24b441c76c1611e64eb7c64 src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:fca8fbb93caa95e04081273240c61985b717bd09 @@ -3179,8 +4027,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:92de57c6b1cb948c5f50f4f0ddb51255e771527a - pristine_git_object: ad74991a5320acfd2758f7c29b44e312020a2744 + last_write_checksum: sha1:87d13ba98832a0eaf232cdaeec6d59e61c868cdf + pristine_git_object: 591743c2024b47070780d0da39e45ad05352dcd0 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -3243,16 +4091,32 @@ trackedFiles: pristine_git_object: e4f870ddddfb3745e52ab6b53c168025243e28c3 src/models/activityitem.ts: id: ee2d86453873 - last_write_checksum: sha1:8e915d323967ad02633368b086192807830a38d5 - pristine_git_object: c13ce72558d6d7e328189266bca17c00b433ab2a + last_write_checksum: sha1:66b69e2be0e6253fe38df6c38ccf7a126ee6b27c + pristine_git_object: df27da3096dd1b3c8466bc084cb9de0ca43e801d + src/models/activityresponse.ts: + id: c535306a4318 + last_write_checksum: sha1:c8c737bab0413512049267743ad03fa9aaa30deb + pristine_git_object: 41223fe450362a089e7de222ab42d025e0cecc9f src/models/annotationaddedevent.ts: id: e5c5f2adf5f6 - last_write_checksum: sha1:7f160140ce05a6efe6140f75ca42a5ef46c3bac6 - pristine_git_object: 5a81c33b7b8b496938275aebb08da8a46f50bba1 + last_write_checksum: sha1:cfdc0bc74649bff392e7c1207c27f8510eb3b177 + pristine_git_object: 42c4ab2abeb2cc6f73bdf49eb012d35b874ebba7 + src/models/anthropiccachecontroldirective.ts: + id: e8b49d71cdd5 + last_write_checksum: sha1:d523c0566195ededbd97a5a2ad2d2393ca186569 + pristine_git_object: 1cf917158fd24007703af356c7ee41b6c815f878 + src/models/anthropiccachecontrolttl.ts: + id: d6c8b6f13cb1 + last_write_checksum: sha1:ce33734180f67ddfe3287e5ee8939ff265c7c1de + pristine_git_object: 1e06de28f0cd122795603a2a2cdbd06875a0c2fa src/models/applypatchservertool.ts: id: ee989280d886 last_write_checksum: sha1:bd583549c537d27a8c1e4da7f6bc06f7b5a3007f pristine_git_object: 24992420a409c3143f19f78c10fc647802586d2f + src/models/autorouterplugin.ts: + id: e3853c83720d + last_write_checksum: sha1:c9d3db7d1083af1e454cfc46aef6f6eeae5e8bfb + pristine_git_object: 113a0e8284cb81441a01af7d9b9698d18afa287b src/models/badgatewayresponseerrordata.ts: id: de317517c298 last_write_checksum: sha1:0c142f4aa9e808430a0caffe3c454146875e7c56 @@ -3263,52 +4127,84 @@ trackedFiles: pristine_git_object: f2adbe93cad88fc26324f6b9651e5bef9b93eb89 src/models/baseinputsunion.ts: id: 7237afe9aafd - last_write_checksum: sha1:75d6df84186917426e23f7e356098f6250e915e8 - pristine_git_object: 36e5c40d812f6c1790da320a55b75a7a68984d59 + last_write_checksum: sha1:b80e1649d355636effd2b2bda8293d0613082519 + pristine_git_object: 852a9de445cb085aa9db10df133afec3d7d2f8be src/models/basereasoningconfig.ts: id: f3138cf23569 - last_write_checksum: sha1:e79df4f394c347b032dd62582d831fa3104fcea6 - pristine_git_object: 2fe05d1b565365c093adcab3c17dac319b677bd7 + last_write_checksum: sha1:91d55dbdf969312a9e68d3b76abd3663e6787e67 + pristine_git_object: 2d487fb5237e2445082b59d75ac7b301b3e52199 + src/models/bulkassignkeysrequest.ts: + id: ad0c5e35d467 + last_write_checksum: sha1:96d89cb7676c0a2ac6af8e13d85b52d1dfcabd32 + pristine_git_object: fa4991335b8e5833acde1f556db8c13f8f863d03 + src/models/bulkassignkeysresponse.ts: + id: c8f692e7b579 + last_write_checksum: sha1:00ca5e21b9bd5eeadb0fe9a936b91813d7f478d0 + pristine_git_object: 24c5ab30e47462f970f39bec6235047a8043e585 + src/models/bulkassignmembersrequest.ts: + id: 502ee2c0e36a + last_write_checksum: sha1:f3fd08d8dc9887c513ba10788399b2a4e7129751 + pristine_git_object: f7710317fc02b8707722ddb01ff670030f19845c + src/models/bulkassignmembersresponse.ts: + id: e54fe72a28b7 + last_write_checksum: sha1:d9f28f542f172175638923802b54859764f9c2e6 + pristine_git_object: 53292cf5bcc74e9df0cd7fbcfa0a68a446a8373a + src/models/bulkunassignkeysrequest.ts: + id: e773f6f68c24 + last_write_checksum: sha1:bbd5ae18e76e369b2b6b7fcd2a933c90ce110bf5 + pristine_git_object: 05516b4e051a737b20d7212a53c5c60e9a582ee9 + src/models/bulkunassignkeysresponse.ts: + id: 5906bcf3a524 + last_write_checksum: sha1:7976e84ac408cebc1b5c68f096bc7ce914c4ef33 + pristine_git_object: dd2278eb9a89c726ce3d2e43bbd28b3e33a2b871 + src/models/bulkunassignmembersrequest.ts: + id: 3443354340f5 + last_write_checksum: sha1:48322499d9e96b01937e795602114c531a807062 + pristine_git_object: e37e75531236f0eb089159c4b3f498fc4cf6635f + src/models/bulkunassignmembersresponse.ts: + id: 4d3857aa5f6c + last_write_checksum: sha1:cbbc5b3ee48c241ab715314e93c53ee3b88f1b97 + pristine_git_object: fbf53dfb6f2bc1aba4ed0b9a600e560824ea7bb2 src/models/chatassistantimages.ts: id: 31fb8a4309f9 last_write_checksum: sha1:6b04f05aba427f76bd7a45345cf1ab055ff45ea9 pristine_git_object: 058e3f29f7ec7fbc3c10b293a82dd7e44a4c7e2c src/models/chatassistantmessage.ts: id: d8ae826b4712 - last_write_checksum: sha1:ff34e90569dfafce5941601ee6be13fb9eb46939 - pristine_git_object: e66292450dd0631f8fb0511a0d9b390f871c08ca + last_write_checksum: sha1:bc5698f78d3411cff8ec121774197945bf610fc7 + pristine_git_object: 306db3ea3e65e013ded4be25b9f2e12ce1b29d74 src/models/chataudiooutput.ts: id: 692ef1eded11 - last_write_checksum: sha1:1a50c27bbd44733ecc47b9c16a53538a723ba323 - pristine_git_object: 848f5f6fe08315f02340686695e55960d0bc42a7 + last_write_checksum: sha1:ae58be46b1a82e1860baf06c23ad33841daee7d7 + pristine_git_object: 68f2fd5b091fd391a1141ee338c3b42ab2e55ea0 src/models/chatchoice.ts: id: cb1eedd5b62e - last_write_checksum: sha1:82c51350abf27e05fd86e098c5bf18db049ca344 - pristine_git_object: 18d99a37427e770879c9230bf33380d033f9fde8 + last_write_checksum: sha1:fee7d21c5e6fe677dad5f20cedd828a56b14eaec + pristine_git_object: 529fe2df3d005b61632bc7dc546767002d2846dd src/models/chatcontentaudio.ts: id: 0f458a760f42 - last_write_checksum: sha1:6b52cf66f20830b86061577477ed0ab8ba24ccb0 - pristine_git_object: 2719c9b97dffb223a0d3f06eeb3021145ff0d121 + last_write_checksum: sha1:efe32f46ae9eeebd9a253acbec7ec3d5f7c00b3c + pristine_git_object: bca814d47d4e2a30828d2690e67ae981b3a32275 src/models/chatcontentcachecontrol.ts: id: 2826e2627ca8 - last_write_checksum: sha1:66c498713f76dd23d474fe081d328ffdcf32b138 - pristine_git_object: 19802719da74d9440f8969e74796124c0ab70833 + last_write_checksum: sha1:c9e643d9054beddac327eb854036470a4a943de2 + pristine_git_object: 9d3332a0f840f73a3455d3521ad438276f7e7cff src/models/chatcontentfile.ts: id: ee5054f5da9f - last_write_checksum: sha1:3005d0df4df4bafa75eefa4bb73788f5e20b5d6b - pristine_git_object: 9011ad27c8934734985001d281af014048ef0eb8 + last_write_checksum: sha1:50a7965bf2c0a745be80818780c1e96677c785dd + pristine_git_object: a1d44bc93cfa1334b3a4f5bb59a8ab67a90bbff7 src/models/chatcontentimage.ts: id: 0903ebf8f7a0 - last_write_checksum: sha1:0709c422ab7b5bf467369053b50213f49a70a591 - pristine_git_object: 88e500bbc36918937e34f1842a0ee4ee4ab60599 + last_write_checksum: sha1:9a08636d7b3db4937445aa03f138b2b6881a5fa7 + pristine_git_object: c48271431257bc39f2ac6748ef99e42d4a17059f src/models/chatcontentitems.ts: id: 3d8c886d8084 - last_write_checksum: sha1:d7a363043dde203e4068306fb3e9e67662e10b46 - pristine_git_object: 94b65745b7c5a798be4dad560e53b4f264978cdf + last_write_checksum: sha1:c1f5e2f5aa321d5e0cf6805e38cbd3a2fe68e9d4 + pristine_git_object: 13114d25594edbdf6574cfe3df8af1bb8c83b2b3 src/models/chatcontenttext.ts: id: 09b5a48d2bab - last_write_checksum: sha1:53646685e1b214fad3eacef7c817f6e76cb1b2ff - pristine_git_object: 4a895ef3273f9d4e5d3284b261c4574b54d28256 + last_write_checksum: sha1:7abddbc5e721427560acf6dce5634364e4f75aa7 + pristine_git_object: f06d6e459f1da6e7c7e789c7397d4fd225340821 src/models/chatcontentvideo.ts: id: 353c68bbb3b2 last_write_checksum: sha1:98233f1d86ed28b3efb2defd93c789b5e6280551 @@ -3323,20 +4219,20 @@ trackedFiles: pristine_git_object: 6a9590a2b15822e409f7ea5df2fb173e372cd908 src/models/chatdevelopermessage.ts: id: 6a179ea58260 - last_write_checksum: sha1:39d78a77ed1ddb6413dd6d023ad13addb798908d - pristine_git_object: 545fb2cc25d904c91aff1c0a5f9285fb30ef6cf3 + last_write_checksum: sha1:6899506e1c6ca82222dac1603385b46c8cda5f24 + pristine_git_object: 3544269f92e62d40f307937eecdba91704c7c97d src/models/chatfinishreasonenum.ts: id: 699f385aa2f8 last_write_checksum: sha1:b411e890f18dccd398489effe2fd9a06baced277 pristine_git_object: 38b22a3ebe5f38fcf0cff10aaa5cb4396ad9c6d0 src/models/chatformatgrammarconfig.ts: id: 95df2fc2c178 - last_write_checksum: sha1:df1a49156a09c9bcf6bdba126436b85d6798ffc1 - pristine_git_object: 29164947a9365f4ecdd4553804471fde99c9d8bd + last_write_checksum: sha1:688c80e0cfc5f2dfc52887317b0a179a20938c4d + pristine_git_object: a514a223f75b11e3417e639d4a332e2a5f62fe3f src/models/chatformatjsonschemaconfig.ts: id: 7e02597be9a9 - last_write_checksum: sha1:cd8b7cf10182543ddb6480f2cbe85b503f6b1e48 - pristine_git_object: 6fa6fa6a6a36caa4b6efb13464fb63414f45de8c + last_write_checksum: sha1:8c5e9c676d9e28e35919215c7fbc1caf721482f0 + pristine_git_object: a469441ae2770b38e7031d8a0debda1169f7afdc src/models/chatformatpythonconfig.ts: id: 7ba831befa19 last_write_checksum: sha1:7403256dbbe07ae7a98ccbb67d3d0eec90c4b882 @@ -3347,148 +4243,160 @@ trackedFiles: pristine_git_object: d082d241abf206468fe635e7c47dca140e3bfd90 src/models/chatfunctiontool.ts: id: 400104319b29 - last_write_checksum: sha1:be96d151b4496670f67f97e6c441e4911253a8bf - pristine_git_object: 01c555d7c8fbfa1f6a85cf62e8d19c05c07dad65 + last_write_checksum: sha1:f530a292267460e5c3d857f12d975b6de03085cf + pristine_git_object: 719fcb5add210f9ef3a382786c0d5062cdcfc124 src/models/chatjsonschemaconfig.ts: id: 1ad0e5d930fb - last_write_checksum: sha1:f4e301877c2895a6db49b68dc0a529c181b3c1bb - pristine_git_object: 6b612242c740b11affb51e49d0aec7948ccfe85b + last_write_checksum: sha1:9af3223f14c0c9d62046de826a737544b86d222e + pristine_git_object: 50dc4ef58f819635969648b92aff790a49bd8948 src/models/chatmessages.ts: id: f21e02796127 - last_write_checksum: sha1:fe33fc520f5b0d607484a799579d4ea3eaaed7de - pristine_git_object: af1e4f1b87aa8d03a367a46080941152e49d90e1 + last_write_checksum: sha1:2444f6ae2848f8e615b267e534e280d6a499c79d + pristine_git_object: e8ac601f6bb44ded1dc828959dd3a13b54bd49a3 src/models/chatnamedtoolchoice.ts: id: bc876a8e64eb - last_write_checksum: sha1:70e1d3dcdb9d68c451220cc548b92caacd74db15 - pristine_git_object: 74cc1e3b1e4aeb0a32f6418f0d0ad7ccf2f4af16 + last_write_checksum: sha1:193631383239cac115f840ca5f6f1f4a56397698 + pristine_git_object: babb55b14e509ff22d7c3fed697218ffe12483cd src/models/chatreasoningsummaryverbosityenum.ts: id: b688b538e122 last_write_checksum: sha1:33771342d9b7639fc313b5fb99e043f2a2447fdc pristine_git_object: 321dcdebd677779915fa4f9a805175997936d368 src/models/chatrequest.ts: id: 5d2646ed8dcf - last_write_checksum: sha1:a9e34704de0930e882064aa88e8bae0516a0b1f0 - pristine_git_object: fd8c3ee3bde658f5bd7e3c3d0bec34275d72db7c + last_write_checksum: sha1:0d8690a5e844b6fdbde0d7bb982ee71e32af34dd + pristine_git_object: 18c632c7ac2fc652ecc92b7d75c3f2653d610626 src/models/chatresult.ts: id: afefd8aadd09 - last_write_checksum: sha1:12f3e84531c1d4647de1627f7c2704e44e6d8278 - pristine_git_object: c5a18849eba013034c0bda120f90d9f4cfa09e3a + last_write_checksum: sha1:9ca27d61ba748d663b37a8fef2ad863ac0ecbe9c + pristine_git_object: c7ba2b22b7776c940c3f6ac82280715fffd02c24 src/models/chatstreamchoice.ts: id: 3747d92a0ba4 - last_write_checksum: sha1:a67c2b4ff1f74d7adb4c8d54a93e78e3fac52ed4 - pristine_git_object: ca617a807b301c93b82d178435cab3b1a04cf318 + last_write_checksum: sha1:550fa3775e020f2dcf8181b3c25fe77ba2259479 + pristine_git_object: a31c5fa956f97bb59c81fa91544208a659d14ef4 src/models/chatstreamchunk.ts: id: 361f940e91e4 - last_write_checksum: sha1:20453a5570a18585b47afb7355df130b4f8e6dd5 - pristine_git_object: f1503f3fc2b32cac79f9baa8b3bff8b74af89ce2 + last_write_checksum: sha1:98e3955f4fc58e70764393ffc54cc0f50e992e0e + pristine_git_object: 97b802eace7481b4cb76981889f9b60d50e8d77a src/models/chatstreamdelta.ts: id: 74a4be948d5f - last_write_checksum: sha1:43069eb37a686da08d5782eff5de1a7a8425a3d3 - pristine_git_object: 5d7ef4cd11dc1058fd9dd73c7ae523bfd0333bea + last_write_checksum: sha1:ae892de5ee0fa7f4a7a8b699d25d5aa37fd97ff7 + pristine_git_object: 42494af7c7710d16b5f5136549b31a0991934a64 src/models/chatstreamoptions.ts: id: 83ba1c3db4bb last_write_checksum: sha1:140bb05ede4b812704e15368a9ace4ccf3fc0a82 pristine_git_object: 41edb3f3d3b0b53241720d885cf78ece2613e3d5 src/models/chatstreamtoolcall.ts: id: bad96c4eeaf7 - last_write_checksum: sha1:ade55f5ca1ab22f63f293c7fe05c82d0a3f7f20d - pristine_git_object: f46ead551c78bba7f29b50e5f24a2fec5e201e68 + last_write_checksum: sha1:05cc783a07eedeb943c9a9e83e01c1db39ec9b38 + pristine_git_object: 619f760cb60b3c65e365c72c3a6c6fb32146ac56 src/models/chatsystemmessage.ts: id: e404d41c140a - last_write_checksum: sha1:8103d612ae47d5e6587bc074b96f10a145f39d2d - pristine_git_object: c053a9a8241f7f5dc138f61ddcc9add90602910b + last_write_checksum: sha1:874a98f2f4da6e343d391f3a3daedffa0a0003bc + pristine_git_object: 1c9eef12fbcd67836ca8a894b3fbf901c010e0ff src/models/chattokenlogprob.ts: id: 267d5cc43c1b - last_write_checksum: sha1:b67a807fc0001a8174afbd6233a7f1b983189fcd - pristine_git_object: c99af343f070a5f54d0b4e3e0fcc246a6ee56312 + last_write_checksum: sha1:fc7fef9d014e768b04fcd87304bcee9facb0cf08 + pristine_git_object: 2f78eaa74ad4728b73538d921fda0423281e9a4f src/models/chattokenlogprobs.ts: id: 9dc7afbf530d last_write_checksum: sha1:7c480d48b938cd709f903994c006c0189468a0c8 pristine_git_object: 7adeff1f0a45aa1f702e4472615f5ea21c37977e src/models/chattoolcall.ts: id: f15fee305732 - last_write_checksum: sha1:4040c104dc35ba2dee725657c51a1cb0ebe49362 - pristine_git_object: 27111a24583b170fa444532ea7eb4bb136639b1e + last_write_checksum: sha1:35d58e81aa0024b4a623de1587246285490d524a + pristine_git_object: 40125411464c42ac277307bb5147b98ab67732c2 src/models/chattoolchoice.ts: id: f553e5b216ba last_write_checksum: sha1:273288632f31c0693db93cdb2a6cba698e503fdb pristine_git_object: d11fb666fc9cbfa2026e9716fdb6698ba1ad120b src/models/chattoolmessage.ts: id: 446b465db30a - last_write_checksum: sha1:b6e311be72bd233e0fda762df7962d07064cb10f - pristine_git_object: 35a6c2e6b02f21e2b47ea4033ccd89720e3e35aa + last_write_checksum: sha1:f10c2e10fc4c35e0fa82d0c7889eff657dfea078 + pristine_git_object: 0ecb42a7c1f2bf45b22bb2a5327a477ddbc92cc3 src/models/chatusage.ts: id: 1e677d1ed4fc - last_write_checksum: sha1:cc8e1baa702e2bd79216a5e27a04c7b82805ab2b - pristine_git_object: 439206d07ec60e8db31ebf5cf4adf8c67c36d1da + last_write_checksum: sha1:b3b958abe1b44faf8b5c561fd96157d442a370c8 + pristine_git_object: 28551b728eef589f23b1bca09b419af17fc89236 src/models/chatusermessage.ts: id: bc892e4ebadf - last_write_checksum: sha1:3c51a645b304abe942a8fc75c5d20186c0c45dc1 - pristine_git_object: 49794171070f32becceb3d64fcddf0a56e589ed1 - src/models/chatwebsearchservertool.ts: - id: ae822f875178 - last_write_checksum: sha1:49694b0ce0c148a248b542638c36a0852ec95abe - pristine_git_object: 34a2183b8bcb5c5c0de7b478845e727720287b9d + last_write_checksum: sha1:800c0c09e0bab3ba4cee106cd19103da41c7696b + pristine_git_object: 682f02b885e2e8d2ef5a8a5c1af8d6b0189d51b1 src/models/chatwebsearchshorthand.ts: id: a67d6bbce478 - last_write_checksum: sha1:41e6fa1d97d5f59beac43fb53b9e43b7e0c36558 - pristine_git_object: 9ba2ce00234a8d48bafe89b15b7df0d1270858b3 + last_write_checksum: sha1:3735d5a3808fe1c7d549df76beaee9e16e6132b0 + pristine_git_object: b91fc96b99827cca613f4de511e416a5aaea0423 src/models/codeinterpreterservertool.ts: id: 493e614d6c34 - last_write_checksum: sha1:f4f5786c99d48ab148114b74c8769df8faf60a92 - pristine_git_object: 3f47f0ea72ab2b3aeb2731ce947b8927ffd51ebc + last_write_checksum: sha1:ef4667458974f89d6366042f640a94a28c5d939a + pristine_git_object: d31b6b73166ff67ac05ded0f9c74fcded281860f src/models/codexlocalshelltool.ts: id: 5cd3cc003b0b last_write_checksum: sha1:f42f3ca022d12ec4db6a74dc858e6d8deda20f0f pristine_git_object: a84a9e6806ff84bb028ce1054ea1c84061ea567d src/models/compoundfilter.ts: id: c2780b9db4ae - last_write_checksum: sha1:a8e7dd662fc48c06ad2ef019435b069f83d56c57 - pristine_git_object: addc6873486dcd84d296da34d9995a456e4121c2 + last_write_checksum: sha1:372927cc49715ec097c4a3262edd8c5d5f2b7e56 + pristine_git_object: e4951477bf579abab86d91080cbe62f2676e9f92 src/models/computeruseservertool.ts: id: e6059da59a69 - last_write_checksum: sha1:994a61ebc74791aea9e9571078db7a17f2964bfc - pristine_git_object: 3af58e15ae9e284b4594def2927e15f43daae4d0 + last_write_checksum: sha1:1910af24c6ed593f38d3e95199ab49f53954fb75 + pristine_git_object: a6b9ce483d486523e84db6f7372cb70a230182fb src/models/conflictresponseerrordata.ts: id: 6c8ea4c00fd1 last_write_checksum: sha1:17324f17b1a106b9a3d528d0240e31534835ea7a pristine_git_object: cc54245c51c84fb281f396b83df2ef2f1bda4880 src/models/contentpartaddedevent.ts: id: 5ba581a076ec - last_write_checksum: sha1:f3771a3ba20515166f9d842abc51d4f487cc74bd - pristine_git_object: 3bad02f670168965dd75f5aebd3f1265bc92d15a + last_write_checksum: sha1:5d1bf02961e8964ec46fccf30f7a30bf7502caad + pristine_git_object: aa47c9af0465053f751ea17d4ef9f83ebfdf54b9 src/models/contentpartdoneevent.ts: id: 943cfab7678a - last_write_checksum: sha1:9e3ff2ce68cb15660ec5b6e5ddb044ac48bb9d5b - pristine_git_object: ced429f9453ac763ee9e6b542ee8aa1943a0fbd1 + last_write_checksum: sha1:517cad2bb9d21a5acccc608e86ac84a05f9ffb04 + pristine_git_object: ab8606009204f4def8f46d0d4f63419028158f22 + src/models/contentpartimage.ts: + id: 6b4d72ed5ae8 + last_write_checksum: sha1:3ad341ac48090f8156517d63b32cfdb4a5c20777 + pristine_git_object: 2b26b4e8a058e0d0ed8a2ce0ac9b39d8fae2f542 src/models/contextcompressionengine.ts: id: c80f6c3a6e09 last_write_checksum: sha1:9f81ff45a5fc42bd3d33271ed308972254ed77c5 pristine_git_object: 425b51d7ee21c067c1b9dfe3092a7f4feab34fb8 - src/models/createchargerequest.ts: - id: c342dc72d1f4 - last_write_checksum: sha1:c57248f3591179c079ee972d6e5fed7ae0cfa50f - pristine_git_object: bd6860c3f634b462352ea4ef1c9df35983435161 + src/models/contextcompressionplugin.ts: + id: e3e073b472a1 + last_write_checksum: sha1:56630cfe43a946988a42ce25e05ae1a207d8d118 + pristine_git_object: a604de27444bedf8b3505567cb633b17ae75d719 + src/models/createguardrailrequest.ts: + id: fbf07f1435fd + last_write_checksum: sha1:12ccfbfd75ad443c5fc3037344eb18d037e40572 + pristine_git_object: 158a64a53f01d0906a23e6a07a857be57b844eff + src/models/createguardrailresponse.ts: + id: f0b6f29656b5 + last_write_checksum: sha1:f97971ea73141b6983b75e600b0df08df5511d0f + pristine_git_object: 2329ce81235843e4ec07d364e5967c5d9ace6a37 src/models/customtool.ts: id: b293ddf87321 - last_write_checksum: sha1:52c7550853c6ba558d1ffe0194c03eb857ade7ec - pristine_git_object: c9dc3b4ff90eb5a709154f37cf2649b05d41543e - src/models/datacollection.ts: - id: fa417e9ad79a - last_write_checksum: sha1:2245458d063c9185e8a0be3cc77fff435750853b - pristine_git_object: e075ba95073bbb9e5e43b32d75dcc1c48a1cf9ce + last_write_checksum: sha1:59f8fa0312a2262eb1decbc8bebde4d577e832de + pristine_git_object: 4733251a1c507bdfdf7a417cf37751fc437b3efe src/models/datetimeservertool.ts: id: a1a7d93b0f75 - last_write_checksum: sha1:eaf901bb872c420ea61fd54afb1f5e4222a867b1 - pristine_git_object: 042c138844200518dff05965de338ffc3c942211 + last_write_checksum: sha1:68ba1f2c7328f90e1c421de8a6c0f3ae5f0baf09 + pristine_git_object: cb2f4c616ff020bac4eb8d29299e0dfbd839f650 + src/models/datetimeservertoolconfig.ts: + id: e0faf7e437d1 + last_write_checksum: sha1:b0320051ebfbc03b25aa488b572c673c6290a23a + pristine_git_object: 058ae695e4059db823c78b1110030ce4030fccef src/models/defaultparameters.ts: id: 8da6fac53cb5 - last_write_checksum: sha1:fd873c8ef3d94449efa3289de5a198f6d50d4c59 - pristine_git_object: b2603a4d34cf43f1eb9995ce5371630d26f3bd10 + last_write_checksum: sha1:47bcc2d870173e23846fba65fbc5c2997d305528 + pristine_git_object: 46dd6cc586235622fa492b3ffea7784f4a60be9d + src/models/deleteguardrailresponse.ts: + id: 1369f013fe1a + last_write_checksum: sha1:565ef523d328e7acec91693559d7544798cfd642 + pristine_git_object: 943415e3ac21d0eb30bd73300b99874fe1cda296 src/models/easyinputmessage.ts: id: 0e3bca037a2a - last_write_checksum: sha1:3326de9be8ea410057fa26840ee3bb4128cd8850 - pristine_git_object: ca1d8315b98904dc7a23525a8254266f0b334a9f + last_write_checksum: sha1:1e3ec10cfba81f6fb645bc8cb5de100d7c5412bf + pristine_git_object: fdad30afdaa1d67868fc44e17f5455da33928d82 src/models/edgenetworktimeoutresponseerrordata.ts: id: d86e84250105 last_write_checksum: sha1:97f1a32869159e48b331c2bcd5fcb220e6895dc8 @@ -3499,8 +4407,8 @@ trackedFiles: pristine_git_object: afd9fedd3b5285d3929fb4c6f3069b7423412d10 src/models/errorevent.ts: id: a4e22766585b - last_write_checksum: sha1:590e4cb3705009cd35a71f11fe030743edd64f67 - pristine_git_object: 13b3a6a9da534dcd10582b16c47110de4e36bd00 + last_write_checksum: sha1:b4b6405d0a10949a531a578f3bc4168703b96b4b + pristine_git_object: 24ba741fa45117bd51d0823480ad60f4373384a5 src/models/errors/badgatewayresponseerror.ts: id: 6264bb9f01d6 last_write_checksum: sha1:32c26e4f3668a52b04dba2400c7d0fb31f460a57 @@ -3587,16 +4495,20 @@ trackedFiles: pristine_git_object: 4ece53ed4524690d931bc6e093745191778ad965 src/models/filecitation.ts: id: 0e609723dbc8 - last_write_checksum: sha1:b823780174bbb546e312d6b149d47bb00e0d8318 - pristine_git_object: 665445c5db6cb969c75fdbb7063462e6bd33e43a + last_write_checksum: sha1:5311a64d9704440578486a029ca16d32e58d954b + pristine_git_object: 147db2198f7b1a28beec00ab7248e25916d1596a + src/models/fileparserplugin.ts: + id: 04e61b333ea7 + last_write_checksum: sha1:e7e907c2e295ff1819d80a50e009d76de46d57a6 + pristine_git_object: 6a0d5f3d7c71fe49e50995e01b5b1652ada22df8 src/models/filepath.ts: id: 0f8d4008ed8e - last_write_checksum: sha1:e1f7983eec9a1c7c19fd9e704ccd7546c77e117d - pristine_git_object: 90ff601bb8ca46eaba0d038c745163a5c8493d6c + last_write_checksum: sha1:8f718e4e08f4a70f1ea7cdd817e726c6f6fe83e4 + pristine_git_object: 119405e300508de2adc0e4fe5ce54645b1cf7ac7 src/models/filesearchservertool.ts: id: e9b1dc2a101e - last_write_checksum: sha1:a7c64ef2ff4ba9b869ba16230b8b9a7b3c10bacd - pristine_git_object: 885c0437f9187cfadab5e8d8b318f3d48069e35b + last_write_checksum: sha1:6c9a5fac7b1953ad4574b5842751082c885ee3ce + pristine_git_object: 8c553603f0ca946dde239ca557142741bc2393f1 src/models/forbiddenresponseerrordata.ts: id: cc3fdc45a2fd last_write_checksum: sha1:81bef9546eb570e81c3bf3c6fa65175361411860 @@ -3607,52 +4519,68 @@ trackedFiles: pristine_git_object: 989058091c64897799cfa8ad17d023b5bbe86d84 src/models/formatjsonschemaconfig.ts: id: dbec4c78c132 - last_write_checksum: sha1:685ec783420cf789015c0806e2a158663f42748b - pristine_git_object: d45eb5a6281d335fccfbf48d361896628bf39cbf + last_write_checksum: sha1:85fbbee5bdb42593601bcdeb6f0f5e3ca0117b83 + pristine_git_object: 3a7a06a14bb7a690457db734eaffb3ab3b6c674d src/models/formats.ts: id: 6e4608e1920c - last_write_checksum: sha1:f761afe7752dfaf97c47c69b7b7c9e62af6b1cd8 - pristine_git_object: 3dbb19055ea48f9f3d46f22e3f12716b9bc4a293 + last_write_checksum: sha1:22f5e515f8631c4301fd7c0a90955916f9c67cfb + pristine_git_object: 7f9ca8e7b65e665f800ef4e6304e931cdc650ca0 src/models/formattextconfig.ts: id: 06c312c9c674 last_write_checksum: sha1:e1a46d14d6ec6b93c1777b51541d2c88ee36b41f pristine_git_object: cab970c91a636c1e19fde288af84663f9abb1838 + src/models/frameimage.ts: + id: 97fccf1b68ca + last_write_checksum: sha1:b858771f58504bd17b801fa2019639667a860295 + pristine_git_object: a6ca7877018bd091510684e542b6b34b9cff3c53 src/models/functioncallargsdeltaevent.ts: id: 2f23b040fdad - last_write_checksum: sha1:de646289835c35c509ce1a7d59f94e66f49ed9e3 - pristine_git_object: f170a417a4bfae434e965e0d41e31cd301ce8cd6 + last_write_checksum: sha1:90f176e0c8d4eccde487822f41945736a6e87298 + pristine_git_object: 77ea9d8e7a5d72ddfedaccdd9879d88316a99b9b src/models/functioncallargsdoneevent.ts: id: b2142af551f4 - last_write_checksum: sha1:43b9cdc1ca5bd80c64f04b30d51965c70bb4eef3 - pristine_git_object: 6db82e3ca4addd2e334a17956688cb37ca6314ac + last_write_checksum: sha1:f9fa0b0b1a3bddf4cde1a4a027da5ae67a80b808 + pristine_git_object: fa8a75b45e36d1d65c5208e8b2195eadbecf4cd9 src/models/functioncallitem.ts: id: 7e96e10e664b - last_write_checksum: sha1:dbd9b4f114c2f638480babf9a0ef193372e11f79 - pristine_git_object: 95e4b01f16e307ea30bd2ddae641f019e994c9b1 + last_write_checksum: sha1:feead3758d1157b6b5f6b06f034170dbfa786e8e + pristine_git_object: 125fc786516bb17239267cf394af11d440991e74 src/models/functioncalloutputitem.ts: id: 279b91cadffe - last_write_checksum: sha1:574abdac1bf5af0f8b56e614a25a620ae1af6619 - pristine_git_object: 9507b1da8f2ccb8d77c3b9a31c220dad5766b015 + last_write_checksum: sha1:239d7e7358a1f76af4556394c7429afcb99c2d48 + pristine_git_object: 0dd5e3dc68d980ac7dd8c5ee9190243f8b5a6f51 + src/models/getguardrailresponse.ts: + id: 3103b978871a + last_write_checksum: sha1:5ddb4118f2be61504caa75a7c83e3af7f0725b91 + pristine_git_object: bf3d99d78c065c87f9c3c9df4e2f57d18648f1e8 + src/models/guardrail.ts: + id: 240a4b8d7a7d + last_write_checksum: sha1:ef1d291ca96fd41d12efa2cb1db26a47c429e426 + pristine_git_object: 3cc5d9a33536b6db61600c09d86b547198f507d4 + src/models/guardrailinterval.ts: + id: a8a819c013c0 + last_write_checksum: sha1:cb34225d4273d17f772df6f403e22380155ba002 + pristine_git_object: 381964d94a7eb6a0badacba10db0785e3a359638 src/models/imagegencallcompletedevent.ts: id: fe8d977c7dca - last_write_checksum: sha1:fab23f1f5b73887ff9874182992b5c0d3457d118 - pristine_git_object: b581483d52d81b256f78a2028fd64b7e35c08385 + last_write_checksum: sha1:882d2d4e20c2de3b628f492be48b96753344d507 + pristine_git_object: c3a93a1504cdb4d46f20b637728fe3645ca70546 src/models/imagegencallgeneratingevent.ts: id: f2806bd9c69c - last_write_checksum: sha1:526e36e5f326b08427769d5c080ca5b42c2ae5dd - pristine_git_object: ae0ae8f4a10f4830e2ceeb8584dbeee2e6553925 + last_write_checksum: sha1:fdb068793b09d4add603cdc22a5169a5b41a79dd + pristine_git_object: b44d96c3c50b2a217f700225b80c39fa14c9140a src/models/imagegencallinprogressevent.ts: id: f9385ea6a417 - last_write_checksum: sha1:f17f7994fc230308103cb971c28748964a7a304b - pristine_git_object: 78a23a98fe52fe68518de2a076830c62df66838a + last_write_checksum: sha1:f18f4413618eaddd02c829270238d4736f3d6a0e + pristine_git_object: 9a39821a96f035c6ffe9f678db4c10f11f57e49e src/models/imagegencallpartialimageevent.ts: id: db1f02788378 - last_write_checksum: sha1:6501c0e1441738dfe3ec4e158d2ddc23a881a506 - pristine_git_object: 2fc2883cee400250738b18b98e687e84ec1a7ff1 + last_write_checksum: sha1:5245f35607bf92b5c41078b8624b73662dd83624 + pristine_git_object: b1924280722662202c5bf1d71ee29e13ee9c244f src/models/imagegenerationservertool.ts: id: 1efbad50f534 - last_write_checksum: sha1:2271bc75a3ca736619805c9b3817b6716138d82f - pristine_git_object: a740f320ee9815b279eff3bab75ad9fd5e016701 + last_write_checksum: sha1:e998970323aa058948c15395a7f9b7b70b05ae4b + pristine_git_object: 9f01df09f5430987fc81dc429ec5add2e202e30b src/models/imagegenerationstatus.ts: id: 2a72a5923e5a last_write_checksum: sha1:54850900dd3ae1504340efdc87f6435f4dc4e21e @@ -3663,36 +4591,36 @@ trackedFiles: pristine_git_object: 8e109bedfdcf2c4808e49323dda861e3c6069d51 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:ecf3e7a657f528d27010d842e8a486f9ac523543 - pristine_git_object: 393ef6818a52c44279cb5123cb1483b418e55b72 + last_write_checksum: sha1:6aeab82f7ee222755b4ec44c4ee069393d81abb9 + pristine_git_object: ac0c78a9e451601887086923d3da02b6020cbfdf src/models/inputaudio.ts: id: 9bdc14c7565f - last_write_checksum: sha1:b8c008e3a20193da45c859507438e3d1d32b5177 - pristine_git_object: 7c21e4a072e07935e5c6542ec625e6f60864efe3 + last_write_checksum: sha1:2f8dc4c1d6a9c2927d9eb186e0ecedf7b81838e6 + pristine_git_object: ac0dcba364afe51b7c878197209049273cd69002 src/models/inputfile.ts: id: 21319fb604ac - last_write_checksum: sha1:dda7fadce9739873a8814cf5c8c0afb83e8f8ad4 - pristine_git_object: fcf295a5f397681d2473a4ea58beeae0769e283f + last_write_checksum: sha1:d926e56a7e4742ee261f00d8350e036e7d6ab9e0 + pristine_git_object: 8bfb862401cce5b8bb1388d150318dff108b0384 src/models/inputimage.ts: id: 7a718177a217 - last_write_checksum: sha1:dc4e54a3201ad94cb2c4c31536d69af8f7f09d07 - pristine_git_object: d45064d8d839b107d207e039cfa54c38262decac + last_write_checksum: sha1:2ac12c3074d2d6b7150fc507944b6ec15f9f091f + pristine_git_object: a91cf7401f3cd6cd8c7576a98ab375aa535a33fc src/models/inputmessageitem.ts: id: 78f212025019 - last_write_checksum: sha1:190671cf0d2440c4976f993ff132ca100be7394b - pristine_git_object: 96f1a0d13fe44e8e7110229c060a00f5db0321de + last_write_checksum: sha1:5f6c40c7c228a2653fe2bf5e922a28d128773d9b + pristine_git_object: f33e7c32813bfb8a1638dafa4a1719e86de436d9 src/models/inputmodality.ts: id: 771d5d4c91ec last_write_checksum: sha1:7f742bf5a1e6b7953ea96df4c4cef29c602accad pristine_git_object: a92bcc401c21e9213243e53629ccd4e673a94c12 src/models/inputsunion.ts: id: 3aff2165a17d - last_write_checksum: sha1:fd72830038759326b378b734152af10259ed878a - pristine_git_object: 0a4daef9260c152e16cf07dbfe110e391a4a1e64 + last_write_checksum: sha1:8d90aa5ea2241c462a27e6849c67a7a0c252130d + pristine_git_object: ebb73f69046918db39d6f479c3d8997de3b6d05b src/models/inputtext.ts: id: 8d6c10a240ae - last_write_checksum: sha1:f002b0435baa4b14023477c76e494f3360d75359 - pristine_git_object: 0618f268ebb4b3675284ae0f3f316c009494d91b + last_write_checksum: sha1:368790d7e5c0a376ec8d09c9a6fa8008e48228be + pristine_git_object: 71890524e5f16f0870c250719e46f80c56062b41 src/models/inputvideo.ts: id: 231a86887e78 last_write_checksum: sha1:ff6991efdaf3b405cf2773c096da7397c6c74316 @@ -3705,190 +4633,250 @@ trackedFiles: id: 48c17eec376a last_write_checksum: sha1:dd8ef69e1787fe3a496c4142a1c47cf38cf62ffc pristine_git_object: 1676c40a5b6dc5646acad69089007f2e43a1bd61 + src/models/keyassignment.ts: + id: 0daee4bf9653 + last_write_checksum: sha1:c288ceccf14f08e9b272dd7570c274f1ee802304 + pristine_git_object: caef08fcaac32bba1e4595c3cd7b85a964870bbc src/models/legacychatcontentvideo.ts: id: baf6fcb0034a last_write_checksum: sha1:95bf2572307790ff941d086f56dc067ea1f778be pristine_git_object: a5bba6cbdc9500a118bc58bd9b3c52910b8b9412 src/models/legacywebsearchservertool.ts: id: 1a9c64204177 - last_write_checksum: sha1:e42c1dbc9072107e8506b7998acb5f68471e5296 - pristine_git_object: 14b3583c28bbeae3e7e871b02ce2889deb5e5713 + last_write_checksum: sha1:72e17c4673379095cd6b7ffcf69037efa9a709f4 + pristine_git_object: ac26d94c30bb60690922ad65630c3e8071cb9e7c src/models/listendpointsresponse.ts: id: 5178e92a44ba - last_write_checksum: sha1:f14d4f1bb0115f6de83613d6d946bd75ec47322a - pristine_git_object: b6d6af839a15e92f869817c5cb03cab07a8461bd + last_write_checksum: sha1:d980e854c9343b1340d19c954ea67e6e9e4cd476 + pristine_git_object: 78a27fc4b7da47cdd85e6550519ac3860d6eae34 + src/models/listguardrailsresponse.ts: + id: 281c3f73d27b + last_write_checksum: sha1:c13d7812479837df8f29f6a6fa50cf2c338cb49b + pristine_git_object: 1600636fa1f26f5ea2edd278e1d8556e92d3988c + src/models/listkeyassignmentsresponse.ts: + id: 6c14372c6290 + last_write_checksum: sha1:34a2e9c84b2087a76dc48aac275cfb297371bc57 + pristine_git_object: e7f6f8be1fc7f645cbe09d10c1d99cac6cab523e + src/models/listmemberassignmentsresponse.ts: + id: bbd89d5e9f3f + last_write_checksum: sha1:28a5b3f627953900912fa9a132c1cd86d0541745 + pristine_git_object: c6211224826dc33fa66518f6d5bfe6c93f75651b src/models/mcpservertool.ts: id: 5e5a26b93ed7 - last_write_checksum: sha1:b544805d4218bd56e100e3a1f947d8c015ac09e7 - pristine_git_object: 65d6222950a0145cef6083f3f6e912a30b169a6f + last_write_checksum: sha1:ff2f8dcaf2e319acd6251498aa38735863fcfd3d + pristine_git_object: d5bd640a8fe1c6bb937975dd77b4c74d83130ae3 + src/models/memberassignment.ts: + id: 5e100b48823e + last_write_checksum: sha1:c2524c4a2a76cf297117db1e47785d76d5d62a15 + pristine_git_object: 5b4e0986b0643959d63c608aabcc0de66c251c05 src/models/model.ts: id: b99d4c14e794 - last_write_checksum: sha1:80681fec4a203e33c2c22de53112cf7091863724 - pristine_git_object: 35c99ed0fc553894595f1b1da145000542dcc53a + last_write_checksum: sha1:1a504c0cc972b71a4735116da7d2474c9d5a6e98 + pristine_git_object: 2bc4d25809f3ed866bfc8c729f4133606729331d src/models/modelarchitecture.ts: id: 57607576095f - last_write_checksum: sha1:bb77b74a29ec13ae559b909ba2d03b5bbd4bdb42 - pristine_git_object: 7b404df1aaaf83c01d4d02e47a63539d56cb65bc + last_write_checksum: sha1:4c15d83f2f3c4f3af7c14185d039d1fec8cf9b06 + pristine_git_object: 9afd6042cf43f984f80c5a9f78e03f7979072b2c src/models/modelgroup.ts: id: b65482ec4223 - last_write_checksum: sha1:71c1363901abacdf5016cdc23c6642825e3b7818 - pristine_git_object: 9c40d281d50644248ff88cc05e7f63514b519504 + last_write_checksum: sha1:0ee8662687f1c146ee4eada78da058949c970c97 + pristine_git_object: c34631d385472d015d0f285112fc489d8abf62e2 + src/models/modellinks.ts: + id: 965b10bc40c4 + last_write_checksum: sha1:0dced5177ae5c305c73e3a1d35294698ea634cc9 + pristine_git_object: dd5fb55709969dd04f6f1f562bf3057b680c95fd src/models/modelscountresponse.ts: id: cf41f6279453 - last_write_checksum: sha1:128db8cacfb273fe25d15a99356a5fa40f2e8180 - pristine_git_object: 950a3f9216780e6a00895a6dcd743d411377fb52 + last_write_checksum: sha1:38d61592af2815035645b01797a7c49b1bbb373a + pristine_git_object: c511ac5b277fa19ae034b0d31570c815143b39b6 src/models/modelslistresponse.ts: id: ea0e62a13d8d last_write_checksum: sha1:0beae3a59e783ff5e4a4b444b16e6227a5024f1a pristine_git_object: f3fae481c3a9a4c1461521e18e9693de9c291846 + src/models/moderationplugin.ts: + id: 309bb6cfc394 + last_write_checksum: sha1:da7750a3d97ce6cdcd87f4002b289e95743fa8f6 + pristine_git_object: 276357bd069a57e77f901210d081716cddbeb1f5 src/models/notfoundresponseerrordata.ts: id: 6c2943dd4f02 last_write_checksum: sha1:cd0ce3ea1fc6a309f88347c58a6d62cf9814f354 pristine_git_object: aa237f7f6b89ed4a65adbff5d1fc12514cfa11b2 + src/models/openairesponsefunctiontoolcall.ts: + id: d27a63e0fb93 + last_write_checksum: sha1:f97f50f822aa41453d6992177385ec2067691528 + pristine_git_object: 05e928b8f0d32a9ce2d5770a4b33c4658eb354db + src/models/openairesponsefunctiontoolcalloutput.ts: + id: 78c25d89c63e + last_write_checksum: sha1:d03da25289572d4e258d96d109a74692805e169c + pristine_git_object: 3854902d5ede37826c9a872f963c9c56b5afbf92 + src/models/openairesponseinputmessageitem.ts: + id: 67004da2ad5c + last_write_checksum: sha1:55c5cef8a3baeed6c0f7191cde0301823a9c5e19 + pristine_git_object: 96abd109875930db391a9b08e5fb7990a0c0a9b8 src/models/openairesponsesannotation.ts: id: 5828fa2314e3 - last_write_checksum: sha1:98d25d1c2d24ac1734d757ddae32f5cee7354589 - pristine_git_object: c402006e91b690092d1597532b555f8656de100c + last_write_checksum: sha1:750f70f96b907aee491f2c7320788e8e76ab4fc8 + pristine_git_object: d213ed21f4fcef620f7d1df68409f6f2d374d3e6 src/models/openairesponsesrefusalcontent.ts: id: 5445ae4a5385 - last_write_checksum: sha1:b72f18c622cecdddcef3151129be6c253c87ba8a - pristine_git_object: 2252e00a46bf9fe84addb125cf30c4b23a536028 + last_write_checksum: sha1:0817ca2d08a85997306a843b350c5e4310c48c3d + pristine_git_object: 033073af32807ae66975ed73dba22dedebc6b9bc src/models/openairesponsesresponsestatus.ts: id: b721d7085e40 last_write_checksum: sha1:7c43c337905b898b35a2b379a9a2eb5af6effc12 pristine_git_object: aea8bf92ec7d91eb7439ded4155f8d82ba244974 src/models/openairesponsestoolchoiceunion.ts: id: 73d80db9cd46 - last_write_checksum: sha1:cd842307394659cb6c333d534ee3e589a5c6b826 - pristine_git_object: f35263df3e3a8492a0ddcdbfa786ecab3b4464cd + last_write_checksum: sha1:a00e5abca524336ebc93f2cc654c0e4993db7b39 + pristine_git_object: 5fbbc3374bb11c879fd8324a5f7f58d78891a572 src/models/openairesponsestruncation.ts: id: 03de9ac74888 last_write_checksum: sha1:736467314cc6ffb42dc5098719a301a5e4d84b12 pristine_git_object: 54f771f9d0c2610b989c9f1567549873fcdda4c4 + src/models/openresponsescreatedevent.ts: + id: e65287120d25 + last_write_checksum: sha1:0ba1d706531212fdfe2618b8dc354967b530765e + pristine_git_object: 0d20b6431150beed875a0d47eb325e7cd905e622 + src/models/openresponsesinprogressevent.ts: + id: 44b1a23df5d5 + last_write_checksum: sha1:d7b33579eb72a7d036d90be24fca51898e57f3d5 + pristine_git_object: 364907411826c3fa6e2b65c7d5bbdc569d4ea08b src/models/openresponsesresult.ts: id: 95391b93fcbf - last_write_checksum: sha1:5bbb261dcbc187ee1138dc6f46b0e9e8347c467f - pristine_git_object: f7a44e0952c4c42ed77ff0fc44b0191f7785ce0b + last_write_checksum: sha1:47cc1132d2b5802d31c8b99502cb29afd0c33abf + pristine_git_object: e2e48a9aa67065c1d6474274c0d628a13ce6ed8f + src/models/openrouterwebsearchservertool.ts: + id: 4d50f36832ad + last_write_checksum: sha1:ed710b20f8c4200dddf713871475c22590faa63a + pristine_git_object: 8be325a42cbadbf7b6180d5fe24d0e047ec11b23 src/models/operations/bulkassignkeystoguardrail.ts: id: 643ef16e0881 - last_write_checksum: sha1:ad3b95dce9bb01dad606f1f91db9a3c72f814694 - pristine_git_object: 30cd72ca87a14875aeab69b731b3a794e2bb86dd + last_write_checksum: sha1:16f1d89f7c83dff29ca08549aea584f3a1d2d237 + pristine_git_object: 7175498fd9f1f03b62e7dd9f7d867364087c88c5 src/models/operations/bulkassignmemberstoguardrail.ts: id: 5a5257c83899 - last_write_checksum: sha1:1610e53d4b0d0bd020d0c92aa4f57cfa4e1243df - pristine_git_object: f79a061b45c80aeeb2034a35b5f9f9dbd442c4a1 + last_write_checksum: sha1:ec0c106ca39be59620ff3c813f940ac9c65e55c9 + pristine_git_object: 0dfdfa26a1fb2423964529addf6c8852edf4be3e src/models/operations/bulkunassignkeysfromguardrail.ts: id: 7793ffc670a0 - last_write_checksum: sha1:b2dcce5b0c51f8d151ce9369405ec283b5aa89da - pristine_git_object: ff7e659b8b36c8c790dfd72bbed1aae0eacf2e3c + last_write_checksum: sha1:5d0793f0a87b9040375cfbdc5c0200c306efb860 + pristine_git_object: c591218b1142a39ad852b8c054e8fc79333918d6 src/models/operations/bulkunassignmembersfromguardrail.ts: id: ea6be9164914 - last_write_checksum: sha1:2238d0c87df88dcfeaa6aa30c8db2129e5477fcf - pristine_git_object: 4533c1ff5b83b562d27bc2a040723527f1eca48b + last_write_checksum: sha1:3b793ac917cf10a070530105294dca60f94e4251 + pristine_git_object: de9f7c710114cfd263def5b6b7541dadf4ba6244 src/models/operations/createauthkeyscode.ts: id: 1443f6afbf40 - last_write_checksum: sha1:13f1d47c7810dc005d1fcc6c7b730c368f0c59a8 - pristine_git_object: 86a24a47038af242f1f1e8377d22bd8e4ae1d064 - src/models/operations/createcoinbasecharge.ts: - id: 1e75ac2debf2 - last_write_checksum: sha1:63699b92eca119687bdb7d7e62baad5195533c30 - pristine_git_object: a2a9035f4eb9ed2f6b017f6c1aa5e1f1dcdc0ec8 + last_write_checksum: sha1:b40eede4e74cea13ccf6b4fe9e938a17599e20a1 + pristine_git_object: cc5964c47258d09aa2aaa230e2d851b953bbba8a src/models/operations/createembeddings.ts: id: 7c210337fdff - last_write_checksum: sha1:afbd670d14735cad9d27256b895a0cefa1c2637c - pristine_git_object: 6664d9fe1c3091988da09ab03d4a14e7eee0b8a1 + last_write_checksum: sha1:76c23562418be1af0ef01478227b9289dcc87ccd + pristine_git_object: 5c36e3bc794c3ea5529ae49b3343e691ea923d11 src/models/operations/createguardrail.ts: id: 36e5a2696dfd - last_write_checksum: sha1:7ad2f519c4771b18702d5e119f74a71d5fd1228c - pristine_git_object: 43a7341153eeabe7d7caf749a8a9d5ceeaf0c238 + last_write_checksum: sha1:4c668c93e119266cfdc1c46da678151673696fdf + pristine_git_object: 2a17016216d1c5f2a3eb6ea3f286bee91f40a3a8 src/models/operations/createkeys.ts: id: e7a250c8b7bb - last_write_checksum: sha1:e067d01c3f1390c8adc06edb2bc238229c2c3671 - pristine_git_object: c9a39606199b209404eb3a8dea672b6f8ae6c0c7 + last_write_checksum: sha1:f16091194047ffdf368b2f47a6b551c87d1028af + pristine_git_object: d8a4da0d8dd3e80a855a1ff40d65d2e35adff47a + src/models/operations/creatererank.ts: + id: e1de55b94363 + last_write_checksum: sha1:46e366f0f734276a874faba765434cea0bce01a6 + pristine_git_object: cd4425ecdcb6d6fc3f1ceaadc3962c561b055c78 src/models/operations/createresponses.ts: id: 7ad611b27e9d last_write_checksum: sha1:9381e8cb9b2f83d1b32de49cde3180d5c22f5d98 pristine_git_object: 2e36482223e3a0954e7357a557ca36b7d675954a + src/models/operations/createvideos.ts: + id: 06dc92996e18 + last_write_checksum: sha1:debbfb49bdfed99a57248da4ed95dc06be8c1e43 + pristine_git_object: 46a53311dd6dc2f8d61cf47ad6eb46ae23434b20 src/models/operations/deleteguardrail.ts: id: 767137f1b80b - last_write_checksum: sha1:43d43f0b9edad6c7eab85267ee725b0e983373b8 - pristine_git_object: 8bd9516712fe4a7233bad70f4b478f0e1ac1309e + last_write_checksum: sha1:34eda028509a37d515950793ef314624b9dde507 + pristine_git_object: 9f9996b3729c03bc6f64457f2cb9507348519276 src/models/operations/deletekeys.ts: id: efa22339a3d6 last_write_checksum: sha1:b378797761e4c19909fc8889a01dce2d230c55af pristine_git_object: 59097d42b5e61405630bd2b12b018807f7ab676e src/models/operations/exchangeauthcodeforapikey.ts: id: 440595fac2ad - last_write_checksum: sha1:7771522ffd8c2fa707bfef64b819530b64f6b29c - pristine_git_object: 44356ffc1b282574365c1700ce0ae89729dc0840 + last_write_checksum: sha1:7ebe26079a39df4ed8b3b8357d1b44b91bdc1454 + pristine_git_object: 118b7a12302d34ae0b854ee66c17ca70e2d2801b src/models/operations/getcredits.ts: id: 0e5a438307ae last_write_checksum: sha1:605d3f9711e13f1eeeec2cc1e56567e01d5a0751 pristine_git_object: 582583b06840936f57378e254912c100f7082cf8 src/models/operations/getcurrentkey.ts: id: ddb4fa558414 - last_write_checksum: sha1:8e5e646bfa98164f5112c8f87f3928352600dd6c - pristine_git_object: 6a491a29aaff051cf8dc88baaab9a21894cba621 + last_write_checksum: sha1:b2ad51b5115edc09e4eca6ba402a2cd3aba8d315 + pristine_git_object: c94627a232460aba53bddcfc5559ca52b4e5d331 src/models/operations/getgeneration.ts: id: 5cdb2959d2a5 - last_write_checksum: sha1:cb27ab1561ea4952d7f6482433b495a3850f9228 - pristine_git_object: 3e8e368449091f00a066c8b57e182181ce5f86b2 + last_write_checksum: sha1:5d66d0329d9dd3612c63f745ed41861c7537d1e0 + pristine_git_object: 8d1c2aaa8a961b8ae75eed6d775a7bd6097b9bb2 src/models/operations/getguardrail.ts: id: 11c366ebdade - last_write_checksum: sha1:049a7b3e697632b01bcc408ef50d91f38d8863c7 - pristine_git_object: 78ba0d03d866d64a7d5ac105c83f9da0698f404c + last_write_checksum: sha1:10483864cbd03e519b3311ed617a32239f1a4a3e + pristine_git_object: 77bda268bebcc372bc07bb0c53ce6e3b7f434850 src/models/operations/getkey.ts: id: 27d0f86c087f - last_write_checksum: sha1:826ffa2b00d350654f78c75b3e3b431acd996d88 - pristine_git_object: 70043ed0cad75e83123b9e65ef4b2eeff0168f24 + last_write_checksum: sha1:cadfededb22eaa9734e44ffa860e27f556fa8267 + pristine_git_object: a56315d0c58c91ee3ad7e51cb50f783220809067 src/models/operations/getmodels.ts: id: f1343fbaaed5 - last_write_checksum: sha1:4f193155c4daa79ac557ce7ecb109552170b8c33 - pristine_git_object: e69ff4724376fa35c82fe44ff31700f5a583cbd9 + last_write_checksum: sha1:2f571c7bec3bb560c6b79d75699db9e2556d944b + pristine_git_object: 623a0b4650bec8c1ce524fb10823292957968930 src/models/operations/getuseractivity.ts: id: 19535b4511a4 - last_write_checksum: sha1:8e27430a1680e4a9b8eaf380ef6354b9a4a3f9a1 - pristine_git_object: 801fc3396b11ba2cc8ece8d315737cc5eaf058e2 + last_write_checksum: sha1:e1c9efdef2f64906b749d122e274238982c80944 + pristine_git_object: 8566d1dc24ae206e77b5168fa18adc5d90e8b0b4 + src/models/operations/getvideos.ts: + id: ac332053ddd0 + last_write_checksum: sha1:d72fc474ea872e08706c74070b93d076416ce22a + pristine_git_object: 460effc486bd0ef382c492e1138a63f4f7ebd138 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:aebe69f14d17a59a12331923dc5a56eb0112dd3b - pristine_git_object: 58437e2f5a079c1eb526aa570e47d4a0ced98a55 + last_write_checksum: sha1:f0de2d22848373c01b0b241575247c0f9a04af78 + pristine_git_object: 6a64932698fda2d211577a533f63d6d35e4fd257 src/models/operations/list.ts: id: ce11386ad30f - last_write_checksum: sha1:76470b82826f1c35920e9ea849b12982a7c7f4cf - pristine_git_object: c1af76dba77ada4f2c7d69335596e28ad5717bd1 + last_write_checksum: sha1:da305a97ea561f52f8118e116587e087237f667d + pristine_git_object: 40a1a33b24c82a10e989d22d1d685d7a5bb2b5e9 src/models/operations/listembeddingsmodels.ts: id: 568d609eb99c last_write_checksum: sha1:3e201ad1798214c57a18f46b0791b658d369a840 pristine_git_object: 6755fab61e2a7eab563fa5a06e6d3bcdc5bb40fa src/models/operations/listendpoints.ts: id: 253a81bc10af - last_write_checksum: sha1:632b2f4445e7c55a7fa93ee851c0e39290833bb1 - pristine_git_object: 26e84519be168bcd5cfc6c2f60eeda863e389aaa + last_write_checksum: sha1:87ccd26c87d3eab2fa9f077d9a122e1f5a275a44 + pristine_git_object: f5cfb8be25fb1d43d1ba5d91bf1a64c129a125de src/models/operations/listendpointszdr.ts: id: d52e6aeefb5e last_write_checksum: sha1:cc3ac1f58f408404223743f0d9119d12c8d8f942 pristine_git_object: caa00bb10e50850762f9446f2674c7e71e3f3f58 src/models/operations/listguardrailkeyassignments.ts: id: 6e6e1963f3ec - last_write_checksum: sha1:27b158cb1499727411f1d1f80903de4a97f23267 - pristine_git_object: e5ae4cf2e332bac7498ed7bf4f273d2b06c1e6ef + last_write_checksum: sha1:a9e1879d3858ea3a84e3a89fed70667aed77f6ff + pristine_git_object: 4b2664a19ce1014a412d7ef988eb268d1ad3d6c9 src/models/operations/listguardrailmemberassignments.ts: id: f92502de471d - last_write_checksum: sha1:c9e610eb959d2d574241a58f856d46e353f08810 - pristine_git_object: a99c37c30a8fb06086b75ab7ab2abe9bd566726e + last_write_checksum: sha1:225c7aecb87bdcc2161f0566b0cd0aad91536470 + pristine_git_object: 0f4110ee7f729d784f68c176d69dab75992b726d src/models/operations/listguardrails.ts: id: 71455e4e600e - last_write_checksum: sha1:e99fe624e5e37299685d03f5a2748a8dd451f0e6 - pristine_git_object: 64618e3598bc6796aa7d04577af39dd26f66582b + last_write_checksum: sha1:54bfd8a03cc03b748a031e9bd47e0f4925e86d33 + pristine_git_object: 873a94f7bd1c19ec0ef5e1793132024d832c971e src/models/operations/listkeyassignments.ts: id: cf0d2f290052 - last_write_checksum: sha1:419579a8ac662bec00b1a6c45c43d0fc936b84b5 - pristine_git_object: 800c8962b4cae0a4da31f6384ec66676482149c6 + last_write_checksum: sha1:c2046342bf1c2ff0428ec8a087c2b450f568d159 + pristine_git_object: dd5b016db4c3304e5e36ac9b383dff46f0537fe4 src/models/operations/listmemberassignments.ts: id: 64c40f6dc5d8 - last_write_checksum: sha1:0b9e9ec197d4bff0c1303af665d024b42b344a14 - pristine_git_object: 5472421e5f9af93f80f790d0bc1636e32161a8c6 + last_write_checksum: sha1:43c6101de20a975f0412177d31650cfc01eaa446 + pristine_git_object: d5f5733470f27228f12b1ee66f485092e0e9d933 src/models/operations/listmodelscount.ts: id: 7705f49b31c9 last_write_checksum: sha1:a10ed6ed107e2cb0556f1d26145009d0847b3372 @@ -3897,78 +4885,142 @@ trackedFiles: id: 0846aac6be02 last_write_checksum: sha1:2217777fde0eff610e2bbf41fb71e2de1f27d1bc pristine_git_object: f9728e0eb32d03dd07449c4f9b306e2234724f77 + src/models/operations/listorganizationmembers.ts: + id: cc21259f09b8 + last_write_checksum: sha1:42d5130e05f5a526a945a63a1aa7e051ad965d8d + pristine_git_object: 975f7de9059d5e203ef0897354e37ec09b6131b6 src/models/operations/listproviders.ts: id: 76a35169de06 - last_write_checksum: sha1:da9ed71021a67f048ecc01bbca0cba5410adb0d0 - pristine_git_object: 3b976f951c455119c54b50c65f72e6fa8394bb7e + last_write_checksum: sha1:503279e69e79eb16b187320616c248aa9973567e + pristine_git_object: 055f5fcfc4ae0306608c66841752f96721b3a52c + src/models/operations/listvideoscontent.ts: + id: 6d6644a39a85 + last_write_checksum: sha1:4778aa6aeeac6908c1b2abbc5f83eb11ff70e3ac + pristine_git_object: 459374b01401d4aff799dfcbbd0fd50fe5ff8b65 + src/models/operations/listvideosmodels.ts: + id: 3c3814660d7c + last_write_checksum: sha1:ba68189feb9da59eb9e513b1eeb530878cb1e242 + pristine_git_object: 109571232e773ce4866edc3f18d137a7593d7396 src/models/operations/sendchatcompletionrequest.ts: id: 52a55a780d2d last_write_checksum: sha1:04d1f99f1d53d12b39325dea7e35811565d3e82a pristine_git_object: ad06e9df4beec78d6ca5bf732d1b9468615fdbef src/models/operations/updateguardrail.ts: id: f9780f5d66dd - last_write_checksum: sha1:8572313721f26bf58ad0dbf8a6ee69e876d6bc96 - pristine_git_object: 0cc62a6cb4cb2322873b0a125f382f7c46850036 + last_write_checksum: sha1:db1008af35055ff6679ab053c9b5c375bfb0b303 + pristine_git_object: 7c5dc47c0d7062c8dcb77f1dd796479fa2755c6e src/models/operations/updatekeys.ts: id: 30a0942aa2b9 - last_write_checksum: sha1:df7720fb29941d1c612ad15c113bf57b783a6839 - pristine_git_object: 668b738ba6ec3f4ebad9e81df5c66209b02108b9 + last_write_checksum: sha1:79b7d89c390aa6da818fbefeca96cbae13fe7b29 + pristine_git_object: 629e4251d314e0ff55d0384a7a631ac157d7cd57 + src/models/outputapplypatchservertoolitem.ts: + id: "761046712899" + last_write_checksum: sha1:cbfb5018f1efdd5ac95517a06dfddf7beee9ca09 + pristine_git_object: 78c82a6417dcd490599e8765ab8a74567ac4d4a9 + src/models/outputbashservertoolitem.ts: + id: 8eeee25f4818 + last_write_checksum: sha1:367d30dd01ff18673cbe5c4241fa788726cc2986 + pristine_git_object: 321efdaccdb0ac9ffad478860bc1241af07a4589 + src/models/outputbrowseruseservertoolitem.ts: + id: 5ad5586d0533 + last_write_checksum: sha1:851ffbdc43ce41328690038e9bf520ca288fa66f + pristine_git_object: 7528c6ac85c0b24e53e62f921f4d627aea9967d1 + src/models/outputcodeinterpretercallitem.ts: + id: ee080e2eccae + last_write_checksum: sha1:d66da226998b9796842f677a7b0a0c2711b3078d + pristine_git_object: 0d62c987d574941ea5a25c8a7cb44c09ebefa1f8 + src/models/outputcodeinterpreterservertoolitem.ts: + id: 16f87f6046c4 + last_write_checksum: sha1:eb5f79f2c1da140f96b1d740096c93ce681de3e9 + pristine_git_object: 26cce532250f523d5dd7d9538bf15382a671ba9d + src/models/outputcomputercallitem.ts: + id: fd4439fdf358 + last_write_checksum: sha1:e3b6fd5e5e83b1cdf63b2b9636a5c4055ede8e57 + pristine_git_object: 7116d303e2221060f73b9a501d32230c062c29c0 src/models/outputdatetimeitem.ts: id: 0c1828e72f98 - last_write_checksum: sha1:2945c7e09d041bea238d1381fe4a9ea41c510591 - pristine_git_object: 37302b544f12e97f5ea06c84abf120c664f18fcb + last_write_checksum: sha1:86f98e5eb24990beb4283eba0d2ff0a12c7048b8 + pristine_git_object: d40212a2d56ac4d9f30a0b63e85e46fea4a2e1ff src/models/outputfilesearchcallitem.ts: id: eafceec94b81 - last_write_checksum: sha1:3d232cb12b3dab8a87e10a092c7cdf3f3b4d8806 - pristine_git_object: 76d723feb1b56be232e4e415b7e449815364166a + last_write_checksum: sha1:ab5785481d5aa3100ab8dfd149e6a91cd077106b + pristine_git_object: 94f27e36c0566c6701724862bfe86003da60b5de + src/models/outputfilesearchservertoolitem.ts: + id: 3e5afbd64572 + last_write_checksum: sha1:93a957a8b709ef297507490c8f4b7f56c3452525 + pristine_git_object: 8c26b44e0a20c349681289d2ea7641f147527425 src/models/outputfunctioncallitem.ts: id: 9c462e9ff54b - last_write_checksum: sha1:f8f0a7758919eab9e87ff85c8a2635a6cce58cd2 - pristine_git_object: 1669c2dcf32b7f8be6882071bd4058087d3a7e20 + last_write_checksum: sha1:6ad8504c7d7d5053e90a047c81965c1b5d8cbf25 + pristine_git_object: 4a89919818a502b701b9443d4e8de710aaddb2c1 src/models/outputimagegenerationcallitem.ts: id: 618bac10713d - last_write_checksum: sha1:07b53bbdb2409b23caad04fe02d85fad126e942a - pristine_git_object: be54e17311c054a86fa256e7cd83f787c997fe1a + last_write_checksum: sha1:f695d6cc4909d90e0c0c0a4b88916f1f4b70eb40 + pristine_git_object: 2585593597d447cca0e080c517bc6808cc4dfb86 + src/models/outputimagegenerationservertoolitem.ts: + id: 1ea34f16eb56 + last_write_checksum: sha1:3db76b9cbed5bdf3ce95908440cbc4b837824485 + pristine_git_object: 6aaaa94f52e4755181ca1afcd7fcef6156ec7a57 src/models/outputitemimagegenerationcall.ts: id: 9c3ac6a7a9ad - last_write_checksum: sha1:70477f8472cc02a0e13ca4f1ce5d64a87c7d49c6 - pristine_git_object: 1a292f676d050c8cc0937eb3245d36af5cb47d1a + last_write_checksum: sha1:a8471974e8e53999ae94955b7a3227423d637389 + pristine_git_object: a13c08e43b6203a68e0a4678aa397ba2c2c7be6b src/models/outputitems.ts: id: 0d7161b3403e - last_write_checksum: sha1:f3b1e10790bec662c2cd0e265889f15f2b6e103e - pristine_git_object: d085ed55f12340ff878f7b7641c581859f27575f + last_write_checksum: sha1:db067f48acb968ab3545dfa8040e3755fa9dc04b + pristine_git_object: 7447986a676e331bc8cc21c204dbd5a282c6c951 + src/models/outputmcpservertoolitem.ts: + id: dd859086c9c7 + last_write_checksum: sha1:e7c601b7fb0ea41583e56fcb283c748021ca1e17 + pristine_git_object: 8d098a691f603a002b16177f6cf063a03f9d9b27 + src/models/outputmemoryservertoolitem.ts: + id: 2fb051c8b4e9 + last_write_checksum: sha1:8077a749646f1827e86f672ae3026a9a6f686fa6 + pristine_git_object: 84bed06d7ce673b00cf952d04c65d4c59acc324e src/models/outputmessage.ts: id: fa128cf87d51 - last_write_checksum: sha1:84f6d4513ab061449fa96053822825b8395c6778 - pristine_git_object: fed678820bafe7a9b216badbc7f229d6fd129505 + last_write_checksum: sha1:9b1ef41364b1c06967c778d1e3dfb02c457aa849 + pristine_git_object: f1b3428e1467a29e0290b06f7f306254fc5e0e2d src/models/outputmessageitem.ts: id: 7eb39195329c - last_write_checksum: sha1:5bd5b4751fdbba2929a6d9c27b471fb1d63f712e - pristine_git_object: 8b41e657b76943819f9b4920e5af3adb0b3c62c2 + last_write_checksum: sha1:fd6a61f47690b57016d51a7f30bb20e183a6db55 + pristine_git_object: 0f35445364c8804ad227ad7a8cf3054ed538d80c src/models/outputmodality.ts: id: 6b2d2af692c7 - last_write_checksum: sha1:b16a042afff3cb76f26f14d1a3cdcd27881a39b6 - pristine_git_object: 143ff54c4ce0a9108daea0a7ac2d45f8d188925a + last_write_checksum: sha1:751836c130c4271e82b1fbc946d1d341374b4ccc + pristine_git_object: 73f67ca733f117cabf82ce6e67b695229d1c412a src/models/outputmodalityenum.ts: id: 732188d6b8fa last_write_checksum: sha1:c60a8eb3c5d5b0c30efb1316c937834461517bc9 pristine_git_object: 0c35bf9729544fdcf9a988916e7162e7843d8f96 src/models/outputreasoningitem.ts: id: 4ea30f8ad34c - last_write_checksum: sha1:bfc1cf36cb1c7b61e783e14c871e39d307da3d69 - pristine_git_object: 4c1277530fb0cd7a1e89a7920fad11c17136d522 - src/models/outputservertoolitem.ts: - id: ca93d8ce3ebb - last_write_checksum: sha1:b6e3ea9da8dbb30d0d4bec2965d162d56f5076e1 - pristine_git_object: 889e2de5da5da898db81301c6e45fb71aef536e2 + last_write_checksum: sha1:64293a6cf55eb1e33611e3cf35698307bf2efdfb + pristine_git_object: 17360bd197c4aa7e13c5c49f71b6de8d70bc12b2 + src/models/outputtexteditorservertoolitem.ts: + id: 6c55837a703d + last_write_checksum: sha1:a3653ceec6678f92048e0e2aecba8a8e4c9d7339 + pristine_git_object: 76ea68e64985c5e8374d82fbe3b2b679180d0513 + src/models/outputtoolsearchservertoolitem.ts: + id: 54b4dacceeab + last_write_checksum: sha1:1d2e42e32e85fff8e8c15613c48de143763e7be3 + pristine_git_object: b4b97495d5c2634dcda5cd5cae863eacec8f75c3 + src/models/outputwebfetchservertoolitem.ts: + id: a28b106c9b49 + last_write_checksum: sha1:f8382ddf951ef5d1fe1856afbae31cec21c2775d + pristine_git_object: d93936e84d52921b3ad593318aab5bf8bd2fd9a5 src/models/outputwebsearchcallitem.ts: id: b4585d176186 - last_write_checksum: sha1:bd345d1ec2dbbe6e543b107c7083844828ae73ce - pristine_git_object: c671368bf6948fad2661fd4c1c378a9ebd80728e + last_write_checksum: sha1:5e08681051cbaf2ff67aa56926a2d848fddad8e8 + pristine_git_object: 70bb5941375c6cea3d67a9e4f6bbe5c78bc38806 + src/models/outputwebsearchservertoolitem.ts: + id: 92114d9bad95 + last_write_checksum: sha1:76264bb3bc850d19c1cfa9c3619b7bd8e5c5a6c0 + pristine_git_object: 9f622e607c5860413dbf55f129e97df911a6215a src/models/parameter.ts: id: 066287ded212 - last_write_checksum: sha1:7cb843fedcaccbbabc94189d512da6192cbf835d - pristine_git_object: df6c3118905a0b50965ed54cd64ad8f543bdfc68 + last_write_checksum: sha1:162a10220bc6f6719f4551535a32e94d64ea1cc5 + pristine_git_object: 62e727dc3ec2756b7245b3952ead1d1bbc10a124 src/models/payloadtoolargeresponseerrordata.ts: id: 59c2c424ea9b last_write_checksum: sha1:e2e645fdd2310f5725c6651411a7ba1ffb829cf6 @@ -3987,20 +5039,20 @@ trackedFiles: pristine_git_object: dd0cc0e98d2ed1291fdb09172826da0f5af85c6a src/models/percentilelatencycutoffs.ts: id: 92e053096488 - last_write_checksum: sha1:dd5b3d55d449f6f5074572c359bdca828aea081e - pristine_git_object: aea49c29fe5fa2917845f802780ac181d3573722 + last_write_checksum: sha1:11c5451708cfdf136f3b02f483dffba308bb90cd + pristine_git_object: 7c77bcc574688579ec1c0919a5c0818997a775e0 src/models/percentilestats.ts: id: 9a6b504d3964 last_write_checksum: sha1:be5654d2818969037deb62d4b1277439e97ae0ff pristine_git_object: 9dfb13ad741f08c1d0456b01d01cb5f5047dc514 src/models/percentilethroughputcutoffs.ts: id: 847aba8ff633 - last_write_checksum: sha1:6b12d3bcc625d01a7741d60878db1dd2426b65c1 - pristine_git_object: 64350cb96504a94daf1cfb8af7facf5b479c4cf3 + last_write_checksum: sha1:0cb3dd15ad9e67da10a3b44ef318bd7f7c32901b + pristine_git_object: 35149cce1af5f6182a284389b45dc74079656f2e src/models/perrequestlimits.ts: id: 2b2b6cf6a019 - last_write_checksum: sha1:b301eb57f0a4eef19f3fa62e6a3e54e44dfa3913 - pristine_git_object: a5bfb5dc6be9438a7b61dcab0944f70377916862 + last_write_checksum: sha1:178d0719c00f964544f1ba7799453af7d0039bea + pristine_git_object: 34e6bd83de5b77f1b3f3c8719d86de609515d286 src/models/preferredmaxlatency.ts: id: e03f33269427 last_write_checksum: sha1:6f468fd441cde7624381267c13f26348a6255bdf @@ -4011,16 +5063,16 @@ trackedFiles: pristine_git_object: d2180d165594e1e5a5cd373ad9b0e03b13acce61 src/models/preview20250311websearchservertool.ts: id: c171c186ccac - last_write_checksum: sha1:4f516aa62e3a8a99d4838cafadf380d066a3e17a - pristine_git_object: fe5f5d908eaed4de6a621c59bc98ee34896eccfc + last_write_checksum: sha1:77b102032711ab336f3783ebc13ce7a7ea24707a + pristine_git_object: 99bdc45be586c6e9ff7108a73631cb3bc1144d41 src/models/previewwebsearchservertool.ts: id: 6b7147491ff2 - last_write_checksum: sha1:2575d91ab8c0f0de6abbded8b07bdca68f1c8e27 - pristine_git_object: d760913ac564c4ebab018f4b84b442f3a1f9998f + last_write_checksum: sha1:966267afd5eeff2a61fbe08d425394692399c751 + pristine_git_object: 15b2dbd5a830e557f336409c4224a33d8098da0d src/models/previewwebsearchuserlocation.ts: id: 64db0edfc37d - last_write_checksum: sha1:d087b553302d4b9ad5c4c90ceadfcddbc7fcbf7b - pristine_git_object: e17b2d2d1836d5af5597e6f1939af216ece4f6b3 + last_write_checksum: sha1:1b9c4865d5245c791658f3e56df5ee257274d55a + pristine_git_object: 789ab79f12eb208766f43c93c285d7ee49e08cac src/models/providername.ts: id: 89e536fb023a last_write_checksum: sha1:99bd9dc6bc73d3b722bd59f48ab3b3135ba2a126 @@ -4031,8 +5083,12 @@ trackedFiles: pristine_git_object: a42994698e17df9b87b470212766b7d9a5c0ddb8 src/models/providerpreferences.ts: id: 3a47295d7b91 - last_write_checksum: sha1:0a429e4f51b40e15bb8e17d823c57ec5e118ca34 - pristine_git_object: d06fa3ea2774792231a78fd4b5130b7f17ab673f + last_write_checksum: sha1:4f4d292df1f8e07c95f1199f5a9af58e92b0812f + pristine_git_object: bf002879b3743ebeb20c0fa43df369757de9d068 + src/models/providerresponse.ts: + id: 7427d17a27bc + last_write_checksum: sha1:fbbc2ccac697f81aa0116a9f090c7070bdfc6852 + pristine_git_object: a520f49fc9218b4452ce5d4b6a37376d691ea780 src/models/providersort.ts: id: 7d1e919d1ec3 last_write_checksum: sha1:4c871e5fc8af6042ca41d12c54ba8640706c0863 @@ -4043,112 +5099,124 @@ trackedFiles: pristine_git_object: fc796682165e0c6c8f0787ee2cb37c79671557f9 src/models/publicendpoint.ts: id: 396ce3186017 - last_write_checksum: sha1:b209b95d49d745546712cd8b42a5c34f9945d6c2 - pristine_git_object: 01ca674ac2af8f36e70b115e27b5bb2bffdfc5d7 + last_write_checksum: sha1:492ce3fa1e0d212314f32d871319fd02176630aa + pristine_git_object: 5912315f8a70317590cedd6aff9dbd194d39e5d9 src/models/publicpricing.ts: id: 0a44a1c3bab5 - last_write_checksum: sha1:192331811f6afeda7eed73dd3b21be5ad61b7761 - pristine_git_object: f3a1a80165d339dd051097cfffee08a316b17b53 + last_write_checksum: sha1:be229fcaddeb02f8fe76948836a39a1c6fc68395 + pristine_git_object: 58037756f32c2ac58abca00e09d493aad868088c src/models/quantization.ts: id: b28328f1822c last_write_checksum: sha1:4d10d34237fddb881f2c49c3e27342487e5fca47 pristine_git_object: 55082b7e886b01408398431244ebcf4ecef0f605 src/models/reasoningconfig.ts: id: "809170859136" - last_write_checksum: sha1:b7a44a1349140ed1d5996fd2cb6630f2d9b9467f - pristine_git_object: d471de6d3cf19f48d4efe189e1f2bf1f369fa262 + last_write_checksum: sha1:53028d133c016ada5d4b2b4ebd39cb3a8fa294ec + pristine_git_object: caa10c60c2f889fb6bb918b8eaac3d13808355c5 src/models/reasoningdeltaevent.ts: id: 0e129c34b701 - last_write_checksum: sha1:f72d23a436b5f6959acc261ee905bf5d2ebb9d5e - pristine_git_object: 8091842fd0625637738e6bd1d1727dd8239bddcc + last_write_checksum: sha1:e2229e49beca747041b6671a6852c725a11ce82b + pristine_git_object: cc635d9b47a5028f68247b92073f5ed626ded830 src/models/reasoningdetailencrypted.ts: id: 6172b093f9ae - last_write_checksum: sha1:0f219cd7ba17f128a79037deee0d277bc35337e7 - pristine_git_object: 8f8217ed91e379bc1740b6ee7704bb2ff200e8bb + last_write_checksum: sha1:90a36fa41f0ebff8b34ac3052b7c426adcb548d3 + pristine_git_object: 1bd75c9c4a3b0f2c2984bc61c67d0a148dfeabae src/models/reasoningdetailsummary.ts: id: ecc7ceb880a1 - last_write_checksum: sha1:df1a40e39c171b2410303f817256c083267ba1af - pristine_git_object: 4370c07ced3247792c34c7d25c67e0d5f01400a7 + last_write_checksum: sha1:2d6cace7dfd46c302191a2d0129ff8a8527b54e6 + pristine_git_object: b572e7345aa2e33009feccb27c6070313f4e4897 src/models/reasoningdetailtext.ts: id: 0f126d8c4950 - last_write_checksum: sha1:48ba33c3de6b350714d8e070864562b5a89c5a9e - pristine_git_object: 4735b8824cf4f59bc1f4ffdf11f4d69d378142ef + last_write_checksum: sha1:994fde3c91a12c8db20be8b29c740cb7f8256f63 + pristine_git_object: 3dab7e04029efd69e6d84c768aafa97ec00a485f src/models/reasoningdetailunion.ts: id: 688738e07ecb - last_write_checksum: sha1:1bfd2cf95a930e0670fb3cc1ba1fa39226dcf467 - pristine_git_object: 08cb14ea2d94a964554164b751fa8fd248a552b8 + last_write_checksum: sha1:ab26877983b2870f0efd86778e509aab09fb6f29 + pristine_git_object: 3a0b240ac45003c2849f19e26cfe3f7fe4816263 src/models/reasoningdoneevent.ts: id: 3af93f83e103 - last_write_checksum: sha1:6d5a217b607ffe8ae6744145b4ba768bd3bd7033 - pristine_git_object: 2f44cfa09d3e57a895b4e2d3edd2e175c949a676 - src/models/reasoningeffortenum.ts: - id: 9559eb443bab - last_write_checksum: sha1:24a2af459ddf92caf22c9b20b1e7b9a249af889b - pristine_git_object: 931b6ef96f348e69a8a36e7212bab38e14354b94 + last_write_checksum: sha1:78bd7c4847d677780a377dec201315b8e108bed1 + pristine_git_object: 440711e147f0de84b650ff99117d64564bf4de78 + src/models/reasoningeffort.ts: + id: dd747014f9d3 + last_write_checksum: sha1:593d1493673d94ff08828b62dbd88afe4ac9dc11 + pristine_git_object: 2804617c189acf4c4571cbc5d10d9178065ff537 + src/models/reasoningformat.ts: + id: b523cf757168 + last_write_checksum: sha1:6c79374859b23c316ee6595995d1bfcb767cbc8e + pristine_git_object: 4e550e5c0d780a52de16687592e354d1a8835685 src/models/reasoningitem.ts: id: 347a000c48b1 - last_write_checksum: sha1:c7f60dae767ba9e8529fbe5c7af2d4b090132df2 - pristine_git_object: 0c680d0f7ef96b3aee6b95b450878ae606755221 + last_write_checksum: sha1:be603acb4aad1efd30c4ade22ef80c10c835b17b + pristine_git_object: 02743fed8539ee24a8abc97508a44f7aaa991958 src/models/reasoningsummarypartaddedevent.ts: id: aca3bffec6c2 - last_write_checksum: sha1:7ebd5799f0e8cb90b4960d307874d3754513bc3f - pristine_git_object: 1cda44b26467b24141f7a83dcd8b2b136a7cb8bc + last_write_checksum: sha1:2b8f38b1a89fa59354b56d87602a903873ed2082 + pristine_git_object: fac6ff091142587b072e0c492ccab0d51c9d4c6c src/models/reasoningsummarypartdoneevent.ts: id: 5917fb728157 - last_write_checksum: sha1:9b7b1bf8efd2c63a2f62d1a95537ba32785b06f1 - pristine_git_object: 851b09e981cce9419895d2f32ef52b7eff2b61f1 + last_write_checksum: sha1:11d1d6125e960ed04b6b88993c1ba6808e19d0e6 + pristine_git_object: 0a5bd9af13ecc15553b4b81b9132489d3301dd79 src/models/reasoningsummarytext.ts: id: 9c06c18de6d6 - last_write_checksum: sha1:a4cad2def2f1c17142fb524927190f0d3e571037 - pristine_git_object: b9720f5172dfa1efaf77e3c0adb991bbf994c989 + last_write_checksum: sha1:f42a204abbdcb87ebb2256e9fdb6d55dce26c5b8 + pristine_git_object: c1d37da82f4bf25439055dd83127f89d48dbbd2e src/models/reasoningsummarytextdeltaevent.ts: id: 888dc7b3074b - last_write_checksum: sha1:2b5eaeab864cfefc6111b408f17eb08c8b68cc5e - pristine_git_object: b93846ca93b6fad2658bdc70a8d28dde71bdbc71 + last_write_checksum: sha1:db06026fec0be771265ecf6e04f291eeab0bd0e9 + pristine_git_object: eec19504778d4eeeaa6ea2d79b060e6bef56807f src/models/reasoningsummarytextdoneevent.ts: id: 4945c757d284 - last_write_checksum: sha1:b18d0b03fa05edc580bbd901b22f2dee70d26890 - pristine_git_object: 61d4c4f14b1cfadf24a77ea0388377608278a649 - src/models/reasoningsummaryverbosityenum.ts: - id: 2d2055f25ddc - last_write_checksum: sha1:1421658276689c45fe815ece0d5676f799442195 - pristine_git_object: d24150d510eb10872fabcd8878999aef3a05d9e8 + last_write_checksum: sha1:cd84feb5f6087d4effcef071a2ca63208d404f96 + pristine_git_object: 052357a16d8e132a4b1b73c1ac3665ac6f40c3d6 + src/models/reasoningsummaryverbosity.ts: + id: a51c85f04729 + last_write_checksum: sha1:70be5cfadcb8aa43583833971df69cfe5906cf00 + pristine_git_object: 58291795f0be63e21552ef0e336261f55bb838d5 src/models/reasoningtextcontent.ts: id: e5520210e3cb - last_write_checksum: sha1:5e2ef062b80ea5cc465273c9869b3b311a42ba15 - pristine_git_object: 10912a9034bd83a2a205dbf4a1ccb1a87f2ec857 + last_write_checksum: sha1:621a87e48422f029ac4fcea2a60d0693f5c8dd94 + pristine_git_object: fe015c15c7c5b909819d9ce44f666249d42aa54f src/models/refusaldeltaevent.ts: id: 31c52296d4c7 - last_write_checksum: sha1:3ee4819122883d0767e546fc19fa39fe447ddd93 - pristine_git_object: 72b72f161debde088d03f6d4e09ec24ff76dc843 + last_write_checksum: sha1:69dbb47854a2e9f41b4138cc7959197bb61a3d42 + pristine_git_object: 3f2392eb9f918c9ba8f5ece0f0464851b7bc4eb7 src/models/refusaldoneevent.ts: id: cd0c3a7b56ac - last_write_checksum: sha1:51652504b0b6794810e2c7bf2439355bc7bae43a - pristine_git_object: 16621be53530726fa299b6f48a45469d69f883c3 + last_write_checksum: sha1:be98c72d7f85f5a6f3c0628fa1d60c47df75d8f2 + pristine_git_object: 6a00e55bce33b0d3f6eb5f88a7610eb1f5725d1c src/models/requesttimeoutresponseerrordata.ts: id: a08eeff8786c last_write_checksum: sha1:5429dbc4ea062c63e6dc613d74c3ece63f218903 pristine_git_object: c9eac87a0c41f81c8ab40f4634f943a0a896ae59 + src/models/responsehealingplugin.ts: + id: 622c12ba88e2 + last_write_checksum: sha1:675134561fff74a80c0bdc574614bc229efede62 + pristine_git_object: 9e40ea7f707b2bc1a1bf5b70b4e2ddc4e888ca5b src/models/responseincludesenum.ts: id: 49a048777535 last_write_checksum: sha1:1154aedcb4b10ba7a8d4b16b45bedb972722d73c pristine_git_object: 33d47e19f0200a85706d11076402b5e2f59979c6 src/models/responseoutputtext.ts: id: 2d5e61e53c46 - last_write_checksum: sha1:6794eb8e5293078f7089b91d9d5eea31a1a4e7e0 - pristine_git_object: d97cb1151c0000e18226f0bc7a217e1d74972751 + last_write_checksum: sha1:568fb2f0dee03b6633bf4b2a925dc232538aa19c + pristine_git_object: 9e0f74740007f9a0041481f2aab78f8f69544add src/models/responseserrorfield.ts: id: 830ea3d3b590 last_write_checksum: sha1:c297c3d3db7622fc157822291aeba52308394941 pristine_git_object: 584f66cd23f2e112b14f8d0b23aea1cd4532c412 src/models/responsesrequest.ts: id: 39799702f982 - last_write_checksum: sha1:8023395d72aa2897d7f1e1b734b82cb5124f6b83 - pristine_git_object: 0b44340df6adbd6f7bcf9ba9be39e09a9bd5a751 + last_write_checksum: sha1:e2526e2cad5f7dd226ab34e5e0764d0ea4e546ff + pristine_git_object: c181304086329c324734411e1390dcb176296a58 src/models/searchcontextsizeenum.ts: id: d76263d711fe last_write_checksum: sha1:84b915e8d44e263ab6436d727663d69caa799149 pristine_git_object: 59040b90a79f43fd75d693a44b2911a6fbaf63ff + src/models/searchqualitylevel.ts: + id: 3f28e436c1e6 + last_write_checksum: sha1:efbd3397588aeb3e563cdc8ccc4b3b72c6519ba1 + pristine_git_object: 4a8a3b533176cca3ba1c7676b96960270e7a0eed src/models/security.ts: id: d90c6c784ca5 last_write_checksum: sha1:90d7a8903f46cd2ea5428527343a003511fc78c9 @@ -4167,40 +5235,76 @@ trackedFiles: pristine_git_object: 9b47a83e44ed6bdfaf6ba88030021fe7a1f6a5ad src/models/streamevents.ts: id: 4aa1487f961f - last_write_checksum: sha1:f92f34b44f76e4fab102d5d942823547806a96aa - pristine_git_object: a6ae14458583d0b69a7794196097df93897613a6 + last_write_checksum: sha1:3b824803f1af06cefbc0db4c548dc9f14d83e13c + pristine_git_object: 424aed0c4b336c8f4067202aaded4ca318972f65 + src/models/streameventsresponsecompleted.ts: + id: f7fe07ad1c47 + last_write_checksum: sha1:b6f66af07ebde97a9138e4c072f236a67abb0d21 + pristine_git_object: 4834dabe808194d64155e4423f7e9cc2095c1f7e + src/models/streameventsresponsefailed.ts: + id: 63748aa9f88e + last_write_checksum: sha1:1e19581ae17067ec6730f7e47d07a8fa8ec0b689 + pristine_git_object: bc87ec6b8b6011ba830aff2b8e28cf88a2903bc6 + src/models/streameventsresponseincomplete.ts: + id: 56f3a5c4a544 + last_write_checksum: sha1:0ca3d01793c61d58be6dd5535cb9835a7d599f0f + pristine_git_object: 006e47c29aec60af3ff2f862adeda193f58fc7e2 + src/models/streameventsresponseoutputitemadded.ts: + id: 16cdc9efe2b8 + last_write_checksum: sha1:71ec0bbcc144dff4dfb059d30a2f85ffd9234c1b + pristine_git_object: e0afbfb266909505c316fd59f5390dfbbc1f832e + src/models/streameventsresponseoutputitemdone.ts: + id: cef4030a60c2 + last_write_checksum: sha1:8068ef5ec2889a57ac116bd163ae3935a6d40e35 + pristine_git_object: a848a45458f2b5e6415085da817f719a04465aa1 + src/models/streamlogprob.ts: + id: 3d401204f1ef + last_write_checksum: sha1:567ede025b7df505603fc11856d46a7158101c98 + pristine_git_object: 9a9dcc052531ac5fefe472ad3ffb5653f862cdcb + src/models/streamlogprobtoplogprob.ts: + id: 3b88c304514b + last_write_checksum: sha1:c4f9e0dd9deb1f175853307a6f42d9f51293169a + pristine_git_object: c0a93469bdcf62d6e39ab4d4811befc965aa460c src/models/textconfig.ts: id: 1a4d7bc40860 last_write_checksum: sha1:59d2f46170638f47bf89ff0e94fb358bfd2ff8e0 pristine_git_object: 566b894a88c07c7d7f790fc56cd7fc2a76e5175a src/models/textdeltaevent.ts: id: 920ea48e0f90 - last_write_checksum: sha1:c13c3154d5f92f0cdbd7a67048c0db8d43f5894e - pristine_git_object: d8de434cfb83d1b5cc40dfb7cfb829f1f0cb21df + last_write_checksum: sha1:d38831d2e6e72a4d44e380f59a346d39042485f4 + pristine_git_object: 360dc58aef56660750f26a623116c035b2d726e8 src/models/textdoneevent.ts: id: 006e3645c287 - last_write_checksum: sha1:548245eef1a0493aafd7ea14138a708fa3439370 - pristine_git_object: c18cadab0335ee909e99aba52d8b2b7b265fbf04 + last_write_checksum: sha1:04e7dccda97988d23a117d4bc5cb8df2f20c0a50 + pristine_git_object: 06aef1393fe31e19abd8526d6db8451341f5bc29 src/models/textextendedconfig.ts: id: e264e7981200 last_write_checksum: sha1:1145008ffa386acff5fcc8912460e1ff1af807f2 pristine_git_object: dc6dfb6e5dc8b661749353870fd2bc11f9685fe3 - src/models/toolcallstatusenum.ts: - id: bbb08fcb13ab - last_write_checksum: sha1:ab818b9f6b6366511cc83ca4d358575a3cf0eafe - pristine_git_object: 8e2fd64df28db96fff31caad799f1c863bb568c0 + src/models/toolcallstatus.ts: + id: 54eb9c06bedb + last_write_checksum: sha1:28d8c73463fd784616838c285a0cf5a6b83b7b4c + pristine_git_object: 1585e3f90f3f774a0b955cb671e7745c5b95473b + src/models/toolchoiceallowed.ts: + id: 82ee236509d6 + last_write_checksum: sha1:7934b0cafa4e3b36b3e1d6ce0cdff216e50a4e6b + pristine_git_object: 627dcdee301602a27918c2693d9a2dae22f2b07f src/models/toomanyrequestsresponseerrordata.ts: id: ff9492357bd9 last_write_checksum: sha1:0ec65f87b4b129d107d23eab65206c26f7f80435 pristine_git_object: 5b47d7723fc7f54b5f961411306204d8424e080d src/models/topproviderinfo.ts: id: 7439c7b1a9c6 - last_write_checksum: sha1:ffdff42721b0cfc90d8fc96c63044624dad078bb - pristine_git_object: c95a2f1288611c754ac2958146966badc90c5c6e - src/models/truncationenum.ts: - id: 2e68448c1324 - last_write_checksum: sha1:97c17927c32eb81231d693f5882bdc7d38631be2 - pristine_git_object: 8e78e3725915400f511b3a94d677b2f57122ece8 + last_write_checksum: sha1:330766437b24438d85cffe245e7e9b6d1f7c50e1 + pristine_git_object: fde06d54a8777c2ec950df0f8966aaf176fa6453 + src/models/traceconfig.ts: + id: 50ce6e8a7bcd + last_write_checksum: sha1:05c85884823eeeaf49f695eb6177f4fe3e73e823 + pristine_git_object: 94ec277c055f94b328c4dc3c739b7a6f2ea856e8 + src/models/truncation.ts: + id: 8aa9a16a7a40 + last_write_checksum: sha1:66ad3376d9c0bc83987301af9b72eb6b68a598c9 + pristine_git_object: 26483639719d22695028d8bc8db5643386bf9eab src/models/unauthorizedresponseerrordata.ts: id: d335c48e0c3e last_write_checksum: sha1:0aeb2103469f3dad0c04196c8470d851d7e09142 @@ -4209,54 +5313,106 @@ trackedFiles: id: "557063315301" last_write_checksum: sha1:77a2c2515bda14c3d700340277b8762cb0067688 pristine_git_object: 0c68c6962a0dde28d6804dadfb3385c965f10c96 + src/models/updateguardrailrequest.ts: + id: 8ae5b029f2d5 + last_write_checksum: sha1:ee4b63011723fcc840495f4610fddcda404a02bb + pristine_git_object: 529bd510ae06f0fa0f9eacaf862287d4976eca51 + src/models/updateguardrailresponse.ts: + id: a1debd60e96d + last_write_checksum: sha1:818ca8d0fdd11a7a768a396708b84b5e171d73c1 + pristine_git_object: 62e472e9b880f14ff6a0433cd58068fead471355 src/models/urlcitation.ts: id: ccd6ecd62c64 - last_write_checksum: sha1:3b6e62096e04ba3049c1cf2ee72ec591f45dfbaa - pristine_git_object: 4d03e2fd769dbe3f2c6bde3ac3f642a1343ebafd + last_write_checksum: sha1:54686e07b6139b8816e964c98a1ce1124489be83 + pristine_git_object: 23807611b958f6d5fe8e2e04163a4903eeae4dd6 src/models/usage.ts: id: 7d556ab96faf - last_write_checksum: sha1:5a6970fd7f65151d318bc4ec981faefa361bc63e - pristine_git_object: 8ca3e5ee28e8a4fadf412c8e9f6c696b503a453e + last_write_checksum: sha1:84cb5dcf3b5c0735bd17d474a8702a45ab4af175 + pristine_git_object: 04d39d4a51cbd87b52ee2f6db5ec0397af8eaa0d + src/models/videogenerationrequest.ts: + id: e72ea2e4c5b3 + last_write_checksum: sha1:9ffa290274caf6766a7ebcfafd7a1a34d6c29763 + pristine_git_object: 54f47c30c6115a3bf5fe4fc090d50001f69d6f6f + src/models/videogenerationresponse.ts: + id: 0a96c6ee9eea + last_write_checksum: sha1:73c631114adc4f4076585919439c06126aa6d55f + pristine_git_object: 381fec4843fc67930e93744875cfaf7f94f88ed2 + src/models/videogenerationusage.ts: + id: 9a49f28f7c9c + last_write_checksum: sha1:deb005271cfffd92190465c91633c855e4f5be4d + pristine_git_object: c5a62e9e6ffbdeb347b1f540de83d6b323a9b2ce + src/models/videomodel.ts: + id: 3761c095ec55 + last_write_checksum: sha1:ffa141d979503dcf088dbb35297b48dc95a2adec + pristine_git_object: c601a359a255a714ada84d763a72bb60f3dbf318 + src/models/videomodelslistresponse.ts: + id: 3ddde944c8c8 + last_write_checksum: sha1:74c107d5bb0d3221dd465bfab762fecb88d815e3 + pristine_git_object: 675a77fef9d7c24c48a9d2dba3bf6d07f0443e29 src/models/websearchcallcompletedevent.ts: id: 5137f6f83524 - last_write_checksum: sha1:92dda5436088e9b8f4dee93f10af8f6b13bf3eae - pristine_git_object: 0a723e66919f312123b63e590b1d2bba8e71bbc7 + last_write_checksum: sha1:77899f32f5b2e288b0cb92521c266ce3657f4edc + pristine_git_object: fbd7470e8707406ed1fccb5e60809d9a6232040b src/models/websearchcallinprogressevent.ts: id: faa6555bfcd9 - last_write_checksum: sha1:00fdd33dd080dfc05865a9f47ea37bd52a1209c9 - pristine_git_object: 4bd03e619a44af567fec7009e873bc5ba67ffece + last_write_checksum: sha1:be8cd904a40c050088956b4865bb8b8df4e3162b + pristine_git_object: 92b5dde5ca96edbbf69db27ba8416c0f0be88cdb src/models/websearchcallsearchingevent.ts: id: 337a384e39d8 - last_write_checksum: sha1:3cf520837aec229a32bcbf3515aff546c585a631 - pristine_git_object: 38991ae479317a6589d10ffce553280c0bccd62a + last_write_checksum: sha1:89ca53594e0b9a8d8fc47e146de31af96be49691 + pristine_git_object: c620f8dd35522b19afdd35eaa36d032803d33e81 + src/models/websearchconfig.ts: + id: d43f37b9a707 + last_write_checksum: sha1:8f62f9ef19d78d3356ddc41448f2e5afcab46534 + pristine_git_object: 43cbd57c46529aa7e30914868db61dbf7790dccc + src/models/websearchdomainfilter.ts: + id: 827204408f55 + last_write_checksum: sha1:40de66ff4e761250806be0246ec0489047df7e3e + pristine_git_object: 709be924e0fcec6af68d3cb34d510b82015b3680 src/models/websearchengine.ts: id: 49b0152fd59a last_write_checksum: sha1:8166273041939c547eedf9139646a9eabfd6d963 pristine_git_object: bda19371ea861d782af3c093e476c97d62a6fc20 + src/models/websearchengineenum.ts: + id: 273c8df02654 + last_write_checksum: sha1:d0bb4b1871045106bddfd371a93f3bfe9641259b + pristine_git_object: 309d906f5b5808e3f8dfb750c1ea4aa0d5690d8d + src/models/websearchplugin.ts: + id: fa32581277e2 + last_write_checksum: sha1:c24a303d978f2b89f9f146435ac686ffebd1a67b + pristine_git_object: 6eb326b49727530bd09676f09266992ddfa57348 src/models/websearchservertool.ts: id: 3f6589dedf90 - last_write_checksum: sha1:ae01b9a661d07d2bc187a89a4ce1e48805a6e1f3 - pristine_git_object: cd9a854fa704f81a52085d3032bc35828538320d + last_write_checksum: sha1:a4922b8d0a528ab6be2464a8a628f1dd77de135b + pristine_git_object: e748880b639b16dc06bf294ccbdb0fb137f984ad src/models/websearchservertoolopenrouter.ts: id: 99dffefc1c11 - last_write_checksum: sha1:32f5fd30ac64fa83d6829f832640909e9c82ec95 - pristine_git_object: 4b851e48203cea7abcea2a23e986b2d486b2dd85 + last_write_checksum: sha1:eee91ad966d052bc1a4e597cf11ca05414cbf400 + pristine_git_object: 9fa129a7a4b0b46f688075df9b5e372842c909b2 + src/models/websearchsource.ts: + id: 2a64353a399c + last_write_checksum: sha1:756ce4b7c63064c3d03e6e20cc563e03c3d00036 + pristine_git_object: d37ecd977175551b72728a31daf2726b6f595fa7 src/models/websearchstatus.ts: id: 55795920a937 last_write_checksum: sha1:cf0c6874146a4be7c3d9cc08e2ae7eb22a0d5691 pristine_git_object: 3243a6ae8b530c7944cfda29a0ef1d0eafd88ca1 src/models/websearchuserlocation.ts: id: cc946a3064e3 - last_write_checksum: sha1:2e1c67212e9e3a10710ad47b807d47ebf05f6ac7 - pristine_git_object: 8c7959788158956d9d3b925f5d57d9ec88c6ae53 + last_write_checksum: sha1:5c97354044953fb1332473b2ca29172fc6841748 + pristine_git_object: 0a3c2ea8f4f5633bbb5d90d1181513dfef878973 + src/models/websearchuserlocationservertool.ts: + id: d1b6cb4026ad + last_write_checksum: sha1:56d6b967ac468e040c1720cda570e81079b6fc3d + pristine_git_object: 083fd5620b151609ce5bc61705d8aa7456506981 src/sdk/analytics.ts: id: 411d91261be3 - last_write_checksum: sha1:f38f7f057f9b0f1a6dd2be2a2c6a78a3f36305bf - pristine_git_object: 9e2e17881caf43605e8b2614ca74a110d8427d34 + last_write_checksum: sha1:338921c07b58f6f719072a86a0aead6e734cac38 + pristine_git_object: 353e5a5896f3dff83490742b4d78da51d6ffc992 src/sdk/apikeys.ts: id: 5dda931501e1 - last_write_checksum: sha1:d86e3cdd6b29b45749007e9603e6bab7f3d58981 - pristine_git_object: 341780d8f40077db7ee4e80ca90d37a8598de11d + last_write_checksum: sha1:5487c45ff4293655f4bbbd4b23042acd1c23c96b + pristine_git_object: 19b6c7c2a7f2a35969d68472c70ea83e31959fcf src/sdk/beta.ts: id: afeac65e28f8 last_write_checksum: sha1:a8a8fe18d0fe7dcf8a7ecb6cc56bd9c9af800ad5 @@ -4267,48 +5423,60 @@ trackedFiles: pristine_git_object: be2dd27c7af4e9c73097fc2daf24627e7db9936c src/sdk/credits.ts: id: c72074b5f165 - last_write_checksum: sha1:3b225301fa5aa4892bab943123f1c3a4d9db2adf - pristine_git_object: 0241639405af35aa2227d354134864e039d72544 + last_write_checksum: sha1:09ba049248259aa5bd8916df45ec4faf7967152e + pristine_git_object: 02d1a2d408eca05a63439bdb65dfda8821f141fd src/sdk/embeddings.ts: id: 70cbb18bedaf last_write_checksum: sha1:e62ce45c27f12941ae5ec7e458b87952db3cedba pristine_git_object: 88eff432962bfe2656bd8ee4df5d8c4f28e6b998 src/sdk/endpoints.ts: id: f159be23d878 - last_write_checksum: sha1:7a454804f8b463ef711de0a4533098fc2f84d8fd - pristine_git_object: a9eb906852c1c490baed30f160f141a5e4594d35 + last_write_checksum: sha1:b7c40ff8c2398c5cbb61f6bc2df25410177feaf6 + pristine_git_object: 38d8efb3aecac60c7725f3472d87064630f58c8e src/sdk/generations.ts: id: e28b205da063 last_write_checksum: sha1:c012b7fd729854f87471da5eed0712fb7e30fea6 pristine_git_object: ebd85c57507e8982774ccd26c3d9efe4a727bb90 src/sdk/guardrails.ts: id: 30ab0b1cc8db - last_write_checksum: sha1:779db9249603fdf3f3cf0bdeaa6926853fd5b3c0 - pristine_git_object: 3ea2dbba5bf84c767a653728e918ca485246f42c + last_write_checksum: sha1:6e7a1d7b5be146cb3ac55353714c279eebac17ef + pristine_git_object: d216397b76a62a3d994f151d3f2d892476f82a0d src/sdk/index.ts: id: a857902a703f last_write_checksum: sha1:54cdd8319bfbee269b54b8c56988fc0a678f2ec3 pristine_git_object: 5c82fe389f888827f98aa52788b850ef43422e07 src/sdk/models.ts: id: 8c761ab180fd - last_write_checksum: sha1:cc139ecfd1381824d1f2649e8264afa0dc706a73 - pristine_git_object: 38e9602d1dc2ceb9a4e40dbccb9f4e63e6065730 + last_write_checksum: sha1:01e5d2365f4206b1308c194fb28b112e458fd5b7 + pristine_git_object: 2be770bc7b6008f9cb979bbe8fda9ffd4867def5 src/sdk/oauth.ts: id: 37b7f9b2970b last_write_checksum: sha1:9066fa7baf0b904ca1aa96b654fbc79b3d6c3236 pristine_git_object: 12f35868fad83b3b6ce20fa340d2d9f8df7bbbd1 + src/sdk/organization.ts: + id: 976de6f449fe + last_write_checksum: sha1:f199f99888476f495050eee5fbc18808226350b1 + pristine_git_object: b64a11106ed376ea785395121eb7c011ea22f906 src/sdk/providers.ts: id: fb8faa7013d0 last_write_checksum: sha1:80c337cdcdfb182fcaa124dd2e1c62947faf74cf pristine_git_object: e08f75b3c721372a101b55d897fe6faff003deec + src/sdk/rerank.ts: + id: 0d5a42c2eac3 + last_write_checksum: sha1:06331346ae4668adf5852b57804354b99a0ffcf7 + pristine_git_object: 9cedd8f2ef4318c8e5d75e7a563b6732f4dabfee src/sdk/responses.ts: id: fc4b535757c5 last_write_checksum: sha1:66e90f739309d9df418df0a157059b0f9de2a228 pristine_git_object: 143b7b9e6a282d3c16648723c59648b335491972 src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:db09fd807941a64443978892e374392e670e4adb - pristine_git_object: c838f2bd4341e9fc0e3dd7bef95e7630ae65185e + last_write_checksum: sha1:d308a2926644ff67c928a2aa2900fd4149ed0107 + pristine_git_object: cc38a6819a105d86249ec90f92fa8a7235780a7f + src/sdk/videogeneration.ts: + id: db34eab5bd5b + last_write_checksum: sha1:0e8a13f8ca379037c57417f0ebe9a9fe35dc3bea + pristine_git_object: 1e832bb72bd987649300a5443f591582761e7b07 src/types/async.ts: id: fac8da972f86 last_write_checksum: sha1:e2a7c53b428567587741f38e6da489f596de6227 @@ -4361,10 +5529,10 @@ 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": 2510.63, "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": [{"content": [{"text": "Hello! How can I help you today?", "type": "output_text"}], "id": "msg-abc123", "role": "assistant", "type": "message"}], "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": @@ -4395,7 +5563,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": @@ -4404,13 +5572,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": @@ -4466,10 +5636,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"}} @@ -4495,7 +5665,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": @@ -4507,7 +5677,7 @@ examples: id: "" 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": @@ -4537,7 +5707,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": @@ -4546,7 +5716,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": @@ -4561,7 +5731,7 @@ examples: slug: "" 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": @@ -4570,21 +5740,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": @@ -4597,7 +5767,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": @@ -4615,7 +5785,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": @@ -4649,7 +5819,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": @@ -4662,7 +5832,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": @@ -4671,7 +5841,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": @@ -4682,7 +5852,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": @@ -4696,7 +5866,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": @@ -4712,7 +5882,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": @@ -4739,7 +5909,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": @@ -4748,7 +5918,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": @@ -4760,7 +5930,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": @@ -4792,7 +5962,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": @@ -4872,7 +6042,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": @@ -4881,4 +6051,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_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: "## Typescript SDK Changes:\n* `openrouter.apiKeys.list()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.data[]` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.get()`: `response.data.limitUsd` **Changed** (Breaking ⚠️)\n* `openrouter.oAuth.createAuthCode()`: `response.data.appId` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.bulkUnassignMembers()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.unassignedCount` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.bulkUnassignKeys()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.unassignedCount` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.bulkAssignMembers()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.assignedCount` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.listGuardrailMemberAssignments()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.totalCount` **Changed** (Breaking ⚠️)\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.analytics.getUserActivity()`: \n * `request` **Changed**\n * `response.data[]` **Changed** (Breaking ⚠️)\n * `error.status[404]` **Added**\n* `openrouter.chat.send()`: \n * `request.chatRequest` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.embeddings.generate()`: \n * `request.requestBody.provider` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.embeddings.listModels()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `openrouter.generations.getGeneration()`: `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.models.count()`: `response.data.count` **Changed** (Breaking ⚠️)\n* `openrouter.models.list()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `openrouter.models.listForUser()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `openrouter.endpoints.listZdrEndpoints()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.bulkAssignKeys()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.assignedCount` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.listMemberAssignments()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.totalCount` **Changed** (Breaking ⚠️)\n* `openrouter.apiKeys.create()`: \n * `request.requestBody` **Changed** (Breaking ⚠️)\n * `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.apiKeys.update()`: \n * `request.requestBody.limit` **Changed** (Breaking ⚠️)\n * `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.apiKeys.get()`: `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.apiKeys.getCurrentKeyMetadata()`: `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.list()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.create()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.data.limitUsd` **Changed** (Breaking ⚠️)\n* `openrouter.endpoints.list()`: `response.data` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.update()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.data.limitUsd` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.listKeyAssignments()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.totalCount` **Changed** (Breaking ⚠️)\n* `openrouter.guardrails.listGuardrailKeyAssignments()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.totalCount` **Changed** (Breaking ⚠️)\n* `openrouter.organization.listMembers()`: **Added**\n* `openrouter.rerank.rerank()`: **Added**\n* `openrouter.credits.createCoinbaseCharge()`: **Removed** (Breaking ⚠️)\n* `openrouter.videoGeneration.listVideosModels()`: **Added**\n* `openrouter.videoGeneration.getVideoContent()`: **Added**\n* `openrouter.videoGeneration.getGeneration()`: **Added**\n* `openrouter.videoGeneration.generate()`: **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e3cca687..59af368b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true typescript: - version: 0.11.2 + version: 0.12.0 acceptHeaderEnum: false additionalDependencies: dependencies: @@ -95,7 +95,7 @@ typescript: flatteningOrder: parameters-first formStringArrayEncodeMode: encoded-string forwardCompatibleEnumsByDefault: false - forwardCompatibleUnionsByDefault: "tagged-only" + forwardCompatibleUnionsByDefault: tagged-only generateExamples: true imports: option: openapi diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 14989249..f3ccf50f 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -1,3029 +1,2961 @@ -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 + x-speakeasy-name-override: appTitle + 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 + x-speakeasy-name-override: appCategories + 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 - enum: - - file_citation - file_id: + endpoint_id: + description: Unique identifier for the endpoint + example: 550e8400-e29b-41d4-a716-446655440000 type: string - filename: + model: + description: Model slug (e.g., "openai/gpt-4.1") + example: openai/gpt-4.1 type: string - index: + 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: - - type - - file_id - - filename - - index + - date + - model + - model_permaslug + - endpoint_id + - provider_name + - usage + - byok_usage_inference + - requests + - prompt_tokens + - completion_tokens + - reasoning_tokens + type: object + ActivityResponse: example: - type: file_citation - file_id: file-abc123 - filename: research_paper.pdf - index: 0 - URLCitation: + 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: + - 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: - - url_citation - url: + - application/pdf type: string - title: + type: + enum: + - base64 type: string - start_index: - type: number - end_index: - type: number required: - type - - url - - title - - start_index - - end_index + - media_type + - data + type: object + AnthropicBaseUsageIteration: example: - type: url_citation - start_index: 0 - end_index: 42 - title: OpenRouter Documentation - url: https://openrouter.ai/docs - FilePath: + 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: - type: + file_id: type: string + type: enum: - - file_path - file_id: + - bash_code_execution_output type: string - index: - type: number required: - - type - file_id - - index + - type + type: object + AnthropicBashCodeExecutionResult: example: - type: file_path - file_id: file-xyz789 - index: 0 - OpenAIResponsesAnnotation: - anyOf: - - $ref: '#/components/schemas/FileCitation' - - $ref: '#/components/schemas/URLCitation' - - $ref: '#/components/schemas/FilePath' - ResponseOutputText: + 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: - - output_text - text: + - 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 - 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: + - error_code - type - - text - 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 + AnthropicCacheControlDirective: + example: + type: ephemeral properties: + ttl: + $ref: '#/components/schemas/AnthropicCacheControlTtl' type: - type: string enum: - - refusal - refusal: + - ephemeral type: string required: - type - - refusal + type: object + AnthropicCacheControlTtl: + enum: + - 5m + - 1h + example: 5m + type: string + x-speakeasy-unknown-values: allow + AnthropicCacheCreation: example: - type: refusal - refusal: I'm sorry, I cannot assist with that request - OutputMessage: + 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: - id: + cited_text: type: string - role: + document_index: + type: integer + document_title: + nullable: true type: string - enum: - - assistant - type: + end_char_index: + type: integer + file_id: + nullable: true type: string + start_char_index: + type: integer + type: 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. + - char_location + 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: + - 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: - type: + 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: - - reasoning_text - text: + - char_location type: string required: - type - - text - example: - type: reasoning_text - text: Let me think step by step about this problem... - ReasoningSummaryText: + - 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: - type: + 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: - - summary_text - text: + - content_block_location type: string required: - type - - text - example: - type: summary_text - text: Analyzed the problem using first principles - OutputItemReasoning: + - 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: - type: + cited_text: type: string - enum: - - reasoning - id: + document_index: + type: integer + document_title: + nullable: true type: string - content: - type: array - items: - $ref: '#/components/schemas/ReasoningTextContent' - summary: - type: array - items: - $ref: '#/components/schemas/ReasoningSummaryText' - encrypted_content: + end_block_index: + type: integer + start_block_index: + type: integer + type: + enum: + - content_block_location type: string - nullable: true - status: - anyOf: - - type: string - enum: - - completed - - type: string - enum: - - incomplete - - type: string - enum: - - in_progress required: - type - - id - - summary - 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: - 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: + - 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: - type: - type: string - enum: - - function_call - id: + cited_text: type: string - name: + document_index: + type: integer + document_title: + nullable: true type: string - arguments: + end_page_number: + type: integer + file_id: + nullable: true type: string - call_id: + start_page_number: + type: integer + type: + enum: + - page_location 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: + - 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: - type: + 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: - - web_search_call - id: + - page_location 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: {} + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + type: object + AnthropicCitationsConfig: example: - type: web_search_call - id: search-abc123 - action: - type: search - query: OpenAI API - status: completed - OutputItemFileSearchCall: + 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: - type: + 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: - - file_search_call - id: + - search_result_location 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: + - 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: - type: + cited_text: + type: string + encrypted_index: + type: string + title: + nullable: true type: string + type: enum: - - image_generation_call - id: + - web_search_result_location type: string - result: + url: type: string - nullable: true - default: null - status: - $ref: '#/components/schemas/ImageGenerationStatus' required: - type - - id - - status + - cited_text + - encrypted_index + - title + - url + type: object + AnthropicCodeExecution20250825Caller: example: - type: image_generation_call - id: imagegen-abc123 - result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== - status: completed - OutputImageGenerationCallItem: - allOf: - - $ref: '#/components/schemas/OutputItemImageGenerationCall' - - type: object - properties: {} + 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: - type: image_generation_call - id: imagegen-abc123 - result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== - status: completed - OutputServerToolItem: + 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 - pattern: '^openrouter:' - description: Server tool type (e.g. openrouter:datetime, openrouter:web_search) - id: + 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 - status: + stdout: type: string + type: enum: - - completed - - in_progress - - incomplete - x-speakeasy-unknown-values: allow + - code_execution_result + type: string required: + - content + - return_code + - stderr + - stdout - 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 + type: object + AnthropicCodeExecutionToolResult: example: - id: msg-abc123 - role: assistant - type: message - status: completed content: - - type: output_text - text: Hello! How can I help you today? - ResponsesErrorField: - type: object - nullable: true + content: [] + return_code: 0 + stderr: '' + stdout: Hello + type: code_execution_result + tool_use_id: srvtoolu_01abc + type: code_execution_tool_result properties: - code: + content: + $ref: '#/components/schemas/AnthropicCodeExecutionContent' + tool_use_id: 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 - message: + - code_execution_tool_result type: string required: - - code - - message - description: Error information returned from the API + - type + - content + - tool_use_id + type: object + AnthropicCodeExecutionToolResultError: example: - code: rate_limit_exceeded - message: Rate limit exceeded. Please try again later. - IncompleteDetails: + 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 - nullable: true + AnthropicCompactionBlock: + example: + content: Compacted summary of conversation. + type: compaction properties: - reason: + content: + nullable: true type: string + type: enum: - - max_output_tokens - - content_filter - x-speakeasy-unknown-values: allow - OpenAIResponsesUsage: + - compaction + type: string + required: + - type + - content type: object - properties: - input_tokens: - type: number - input_tokens_details: - type: object - properties: - cached_tokens: - type: number + AnthropicCompactionUsageIteration: + allOf: + - $ref: '#/components/schemas/AnthropicBaseUsageIteration' + - properties: + type: + enum: + - compaction + type: string required: - - cached_tokens - output_tokens: - type: number - output_tokens_details: + - type 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 - 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 + cache_creation: null + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 50 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: 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: - type: + file_id: type: string + type: enum: - - input_text - text: + - container_upload type: string required: - type - - text - description: Text input content item - example: - type: input_text - text: Hello, how can I help you? - InputImage: + - file_id type: object + AnthropicDirectCaller: + example: + type: direct properties: type: - type: string - enum: - - input_image - detail: - type: string enum: - - auto - - high - - low - x-speakeasy-unknown-values: allow - image_url: + - direct type: string - 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 + AnthropicDocumentBlock: + example: + citations: null + source: + data: Hello, world! + media_type: text/plain + type: text + title: null + type: document properties: - type: + citations: + $ref: '#/components/schemas/AnthropicCitationsConfig' + source: + anyOf: + - $ref: '#/components/schemas/AnthropicBase64PdfSource' + - $ref: '#/components/schemas/AnthropicPlainTextSource' + title: + nullable: true type: string + type: enum: - - input_file - file_id: + - 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 - file_data: type: string - filename: + 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 - file_url: + type: + enum: + - document type: string required: - type - description: File input content item - example: - type: input_file - file_id: file-abc123 - filename: document.pdf - InputAudio: + - source type: object + AnthropicEncryptedCodeExecutionResult: + example: + content: [] + encrypted_stdout: enc_stdout + return_code: 0 + stderr: '' + type: encrypted_code_execution_result properties: - type: + content: + items: + $ref: '#/components/schemas/AnthropicCodeExecutionOutput' + type: array + encrypted_stdout: + type: string + return_code: + type: integer + stderr: type: string + 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 + - encrypted_code_execution_result + type: string required: + - content + - encrypted_stdout + - return_code + - stderr - type - - input_audio - description: Audio input content item - 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 - BaseInputs: - anyOf: - - type: string - - type: array - 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 - content: - anyOf: - - 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 - phase: - anyOf: - - type: string - enum: - - commentary - - type: string - enum: - - final_answer - - nullable: true - required: - - role - - content - - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - anyOf: - - type: string - enum: - - user - - type: string - enum: - - system - - 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' - 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 - - $ref: '#/components/schemas/OutputItemImageGenerationCall' - - $ref: '#/components/schemas/OutputMessage' - - 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. + AnthropicImageBlockParam: example: - user_id: '123' - session_id: abc-def-ghi - FunctionTool: - type: object + 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: - type: string enum: - - function - name: - type: string - description: + - image 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 - 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 + - source + type: object + AnthropicImageMimeType: enum: - - low - - medium - - high - description: Size of the search context for web search tools - example: medium + - image/jpeg + - image/png + - image/gif + - image/webp + example: image/jpeg + type: string x-speakeasy-unknown-values: allow - Preview_WebSearchUserLocation: - type: object + AnthropicInputTokensClearAtLeast: + example: + type: input_tokens + value: 50000 nullable: true properties: type: - type: string enum: - - approximate - city: - type: string - nullable: true - country: - type: string - nullable: true - region: - type: string - nullable: true - timezone: + - input_tokens type: string - nullable: true + value: + type: integer required: - type - Preview_WebSearchServerTool: + - value type: object + AnthropicInputTokensTrigger: + example: + type: input_tokens + value: 100000 properties: type: - type: string enum: - - web_search_preview - search_context_size: - $ref: '#/components/schemas/SearchContextSizeEnum' - user_location: - $ref: '#/components/schemas/Preview_WebSearchUserLocation' - engine: + - input_tokens 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 + value: + type: integer required: - type - description: Web search preview tool configuration - example: - type: web_search_preview - Preview_20250311_WebSearchServerTool: + - value type: object + AnthropicIterationCacheCreation: + default: null + example: + ephemeral_1h_input_tokens: 0 + ephemeral_5m_input_tokens: 0 + nullable: true 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: + 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: - - 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 + - text/plain + type: string + type: + enum: + - text + type: string required: - type - description: Web search preview tool configuration (2025-03-11 version) - example: - type: web_search_preview_2025_03_11 - WebSearchUserLocation: + - media_type + - data type: object - nullable: true + AnthropicRedactedThinkingBlock: + example: + data: cmVkYWN0ZWQ= + type: redacted_thinking properties: - type: + data: type: string + type: enum: - - approximate - city: + - 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 - country: type: string + x-speakeasy-unknown-values: allow + explanation: nullable: true - region: type: string - nullable: true - timezone: + type: + enum: + - refusal 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: + required: + - type + - category + - explanation type: object + AnthropicSearchResultBlockParam: + example: + content: + - text: Result content + type: text + source: example_source + title: Example Result + type: search_result properties: - type: - type: string - enum: - - web_search - filters: - type: object - nullable: true + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' + citations: 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: + enabled: + type: boolean + type: object + content: + items: + $ref: '#/components/schemas/AnthropicTextBlockParam' + type: array + source: type: string + title: + type: string + type: 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 + - search_result + type: string required: - type - description: Web search tool configuration + - 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: - type: web_search - engine: auto - filters: - allowed_domains: - - example.com - WebSearchServerTool: + 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: - type: + caller: + $ref: '#/components/schemas/AnthropicCaller' + id: type: string - enum: - - web_search_2025_08_26 - filters: - type: object + input: 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 + name: + $ref: '#/components/schemas/AnthropicServerToolName' + type: 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 + - server_tool_use + type: string 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: + - 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: - type: + citations: + items: + $ref: '#/components/schemas/AnthropicTextCitation' + nullable: true + type: array + text: type: string + type: enum: - - and - - or - x-speakeasy-unknown-values: allow - filters: - type: array - items: - type: object - additionalProperties: - nullable: true + - text + type: string required: - type - - filters - description: A compound filter that combines multiple comparison or compound filters - FileSearchServerTool: + - text + - citations type: object + AnthropicTextBlockParam: + example: + text: Hello, world! + type: text properties: - type: + 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: - - 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 + - text + type: string required: - type - - vector_store_ids - description: File search tool configuration - example: - type: file_search - vector_store_ids: - - vs_abc123 - ComputerUseServerTool: + - 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: - type: string enum: - - computer_use_preview - display_height: - type: number - display_width: - type: number - environment: + - text_editor_code_execution_create_result type: string - enum: - - windows - - mac - - linux - - ubuntu - - browser - x-speakeasy-unknown-values: allow required: + - is_file_update - 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 + 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: - 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 + - text_editor_code_execution_str_replace_result + type: string required: + - lines + - new_lines + - new_start + - old_lines + - old_start - type - - container - description: Code interpreter tool configuration - example: - type: code_interpreter - container: auto - McpServerTool: 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: - type: + content: + $ref: '#/components/schemas/AnthropicTextEditorCodeExecutionContent' + tool_use_id: type: string + type: 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: + - 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: - - connector_dropbox - - connector_gmail - - connector_googlecalendar - - connector_googledrive - - connector_microsoftteams - - connector_outlookcalendar - - connector_outlookemail - - connector_sharepoint + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + type: string x-speakeasy-unknown-values: allow - headers: - type: object + error_message: 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: + enum: + - text_editor_code_execution_tool_result_error type: string required: + - error_code + - error_message - 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 + 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: - type: + content: type: string + file_type: enum: - - image_generation - background: + - text + - image + - pdf type: string - enum: - - transparent - - opaque - - auto x-speakeasy-unknown-values: allow - input_fidelity: - type: string - nullable: true + num_lines: + type: integer + start_line: + type: integer + total_lines: + type: integer + type: enum: - - high - - low - x-speakeasy-unknown-values: allow - input_image_mask: - type: object - properties: - image_url: - type: string - file_id: - type: string - model: + - text_editor_code_execution_view_result type: string - enum: - - gpt-image-1 - - gpt-image-1-mini - x-speakeasy-unknown-values: allow - moderation: + 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 - enum: - - auto - - low - x-speakeasy-unknown-values: allow - output_compression: - type: number - output_format: + thinking: type: string + type: 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: + - thinking 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: + - thinking + - signature type: object + AnthropicThinkingTurns: + example: + type: thinking_turns + value: 3 properties: type: - type: string enum: - - local_shell + - thinking_turns + type: string + value: + type: integer required: - type - description: Local shell tool configuration - example: - type: local_shell - ShellServerTool: + - value type: object + AnthropicToolReference: + example: + tool_name: my_tool + type: tool_reference properties: - type: + tool_name: type: string + type: enum: - - shell + - tool_reference + type: string required: + - tool_name - type - description: Shell tool configuration - example: - type: shell - ApplyPatchServerTool: 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: - type: string enum: - - apply_patch + - tool_search_tool_search_result + type: string required: + - tool_references - type - description: Apply patch tool configuration - example: - type: apply_patch - CustomTool: type: object + AnthropicToolSearchResultError: + example: + error_code: unavailable + error_message: null + type: tool_search_tool_result_error properties: - type: + error_code: + $ref: '#/components/schemas/AnthropicServerToolErrorCode' + error_message: + nullable: true type: string + type: enum: - - custom - name: - type: string - description: + - tool_search_tool_result_error 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: + - error_code + - error_message - type - - name - description: Custom tool configuration + type: object + AnthropicToolSearchToolResult: example: - type: custom - name: my_tool - OpenAIResponsesToolChoice: - anyOf: - - type: string - enum: - - auto - - type: string - enum: - - none - - type: string + 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: - - 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: + - tool_search_tool_result + type: string + required: + - type + - content + - tool_use_id type: object - nullable: true + 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 - variables: - type: object + input: nullable: true - additionalProperties: - anyOf: - - type: string - - $ref: '#/components/schemas/InputText' - - $ref: '#/components/schemas/InputImage' - - $ref: '#/components/schemas/InputFile' + name: + type: string + type: + enum: + - tool_use + type: string required: + - type - 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: + - caller + - name type: object - nullable: true + AnthropicToolUsesKeep: + example: + type: tool_uses + value: 5 properties: - effort: - $ref: '#/components/schemas/ReasoningEffortEnum' - summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosityEnum' - TruncationEnum: - type: string - nullable: true - enum: - - auto - - disabled - x-speakeasy-unknown-values: allow - FormatTextConfig: + type: + enum: + - tool_uses + type: string + value: + type: integer + required: + - type + - value type: object + AnthropicToolUsesTrigger: + example: + type: tool_uses + value: 10 properties: type: - type: string enum: - - text + - tool_uses + type: string + value: + type: integer required: - type - description: Plain text response format - example: - type: text - FormatJsonObjectConfig: + - 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: - type: string enum: - - json_object + - url + type: string + url: + type: string required: - type - description: JSON object response format - example: - type: json_object - FormatJsonSchemaConfig: + - url type: object + AnthropicUrlPdfSource: + example: + type: url + url: https://example.com/document.pdf properties: type: - type: string enum: - - json_schema - name: + - url type: string - description: + url: type: string - strict: - type: boolean - nullable: true - schema: - type: object - additionalProperties: - nullable: true required: - type - - name - - schema - description: JSON schema constrained response format + - url + type: object + AnthropicUsage: 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 + 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/AnthropicCompactionUsageIteration' + - $ref: '#/components/schemas/AnthropicMessageUsageIteration' + - $ref: '#/components/schemas/AnthropicUnknownUsageIteration' example: - type: text - TextConfig: + cache_creation: null + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 100 + output_tokens: 50 + type: message + AnthropicWebFetchBlock: + 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 + properties: + content: + $ref: '#/components/schemas/AnthropicDocumentBlock' + retrieved_at: + nullable: true + type: string + type: + enum: + - web_fetch_result + type: string + url: + type: string + required: + - content + - 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: - format: - $ref: '#/components/schemas/Formats' - verbosity: + caller: + $ref: '#/components/schemas/AnthropicCaller' + content: + $ref: '#/components/schemas/AnthropicWebFetchContent' + tool_use_id: type: string - nullable: true + type: enum: - - high - - low - - medium - x-speakeasy-unknown-values: allow - description: Text output configuration including format and verbosity + - web_fetch_tool_result + type: string + required: + - type + - caller + - content + - tool_use_id + type: object + AnthropicWebFetchToolResultError: example: - format: - type: text - verbosity: medium - ServiceTierEnum: - type: string - nullable: true - enum: - - auto - - default - - flex - - priority - - scale - x-speakeasy-unknown-values: allow - BaseResponsesResult: + error_code: unavailable + type: web_fetch_tool_result_error + properties: + error_code: + enum: + - 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 + - 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: - id: + encrypted_content: type: string - object: + page_age: + nullable: true type: string + title: + type: string + type: enum: - - response - created_at: - type: number - model: + - web_search_result type: string - status: - $ref: '#/components/schemas/OpenAIResponsesResponseStatus' - completed_at: - type: number + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + type: object + AnthropicWebSearchResultBlockParam: + example: + 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 - output: - type: array - items: - 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' - user: 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 + - $ref: '#/components/schemas/AnthropicWebSearchToolResultError' + tool_use_id: + type: string + type: + enum: + - web_search_tool_result + type: string + required: + - type + - caller + - tool_use_id + - content + type: object + AnthropicWebSearchToolResultError: + example: + error_code: unavailable + type: web_search_tool_result_error + properties: + error_code: + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + type: string + x-speakeasy-unknown-values: allow + type: + enum: + - web_search_tool_result_error + type: string + required: + - type + - error_code + type: object + AnthropicWebSearchToolUserLocation: + example: + city: San Francisco + country: US + region: California + timezone: America/Los_Angeles + type: approximate + nullable: true + properties: + city: nullable: true - output_text: type: string - prompt_cache_key: + country: + nullable: true type: string + region: nullable: true - safety_identifier: type: string + timezone: nullable: true + type: string + type: + enum: + - 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: - $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 + code: 502 + message: Provider returned error + properties: + error: + $ref: '#/components/schemas/BadGatewayResponseErrorData' + user_id: nullable: true - temperature: - type: number + 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 - top_p: - type: number - nullable: true - presence_penalty: - type: number - nullable: true - frequency_penalty: - type: number - nullable: true - instructions: - $ref: '#/components/schemas/BaseInputs' - metadata: - $ref: '#/components/schemas/RequestMetadata' - tools: - type: array - items: - oneOf: - - allOf: - - $ref: '#/components/schemas/FunctionTool' - - type: object - properties: {} - description: Function tool definition - 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 - - $ref: '#/components/schemas/Preview_WebSearchServerTool' - - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' - - $ref: '#/components/schemas/Legacy_WebSearchServerTool' - - $ref: '#/components/schemas/WebSearchServerTool' - - $ref: '#/components/schemas/FileSearchServerTool' - - $ref: '#/components/schemas/ComputerUseServerTool' - - $ref: '#/components/schemas/CodeInterpreterServerTool' - - $ref: '#/components/schemas/McpServerTool' - - $ref: '#/components/schemas/ImageGenerationServerTool' - - $ref: '#/components/schemas/CodexLocalShellTool' - - $ref: '#/components/schemas/ShellServerTool' - - $ref: '#/components/schemas/ApplyPatchServerTool' - - $ref: '#/components/schemas/CustomTool' - tool_choice: - $ref: '#/components/schemas/OpenAIResponsesToolChoice' - parallel_tool_calls: - type: boolean - prompt: - $ref: '#/components/schemas/StoredPromptTemplate' - background: - type: boolean + type: object + required: + - code + - message + 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 - previous_response_id: type: string - nullable: true - reasoning: - $ref: '#/components/schemas/BaseReasoningConfig' - service_tier: - $ref: '#/components/schemas/ServiceTierEnum' - store: - type: boolean - truncation: - $ref: '#/components/schemas/TruncationEnum' - text: - $ref: '#/components/schemas/TextConfig' required: - - id - - object - - created_at - - model - - status - - completed_at - - output - error - - incomplete_details - - temperature - - top_p - - presence_penalty - - frequency_penalty - - instructions - - metadata - - 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 + BadRequestResponseErrorData: + description: Error data for BadRequestResponse + example: + code: 400 + message: Invalid request parameters properties: - type: + code: + type: integer + message: type: string - enum: - - response.created - response: - $ref: '#/components/schemas/BaseResponsesResult' - sequence_number: - type: number + metadata: + additionalProperties: + nullable: true + nullable: true + type: object required: - - type - - response - - sequence_number - 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 - InProgressEvent: + - 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: - type: + annotation: + $ref: '#/components/schemas/OpenAIResponsesAnnotation' + annotation_index: + type: integer + content_index: + type: integer + item_id: type: string - enum: - - response.in_progress - response: - $ref: '#/components/schemas/BaseResponsesResult' + output_index: + type: integer sequence_number: - type: number + type: integer + type: + enum: + - response.output_text.annotation.added + type: string required: - type - - response + - output_index + - item_id + - content_index - 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: + - 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: - type: + content_index: + type: integer + item_id: type: string - enum: - - response.completed - response: - $ref: '#/components/schemas/BaseResponsesResult' + output_index: + type: integer + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' 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: integer type: - type: string enum: - - response.incomplete - response: - $ref: '#/components/schemas/BaseResponsesResult' - sequence_number: - type: number + - response.content_part.added + type: string required: - type - - response + - output_index + - item_id + - content_index + - part - 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 + 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: - type: + content_index: + type: integer + item_id: type: string - enum: - - response.failed - response: - $ref: '#/components/schemas/BaseResponsesResult' + output_index: + type: integer + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' sequence_number: - type: number + type: integer + type: + enum: + - response.content_part.done + type: string required: - type - - response + - output_index + - item_id + - content_index + - part - 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 + BaseErrorEvent: + description: Event emitted when an error occurs during streaming + example: + code: rate_limit_exceeded + message: Rate limit exceeded. Please try again later. + param: null + sequence_number: 2 + type: error properties: - type: - type: string - enum: - - error code: - type: string nullable: true + type: string message: type: string param: - type: string nullable: true + type: string sequence_number: - type: number + type: integer + type: + enum: + - error + type: string 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 + 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 - 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' + type: integer sequence_number: - type: number + type: integer + type: + enum: + - response.function_call_arguments.delta + type: string required: - type + - item_id - output_index - - item + - delta - sequence_number - description: Event emitted when a new output item is added to the response + type: object + BaseFunctionCallArgsDoneEvent: + description: Event emitted when function call arguments streaming is complete example: - type: response.output_item.added + arguments: '{"city": "San Francisco", "units": "celsius"}' + item_id: item-1 + name: get_weather output_index: 0 - item: - id: item-1 - type: message - status: in_progress - role: assistant - content: [] - sequence_number: 2 - OutputItemDoneEvent: - type: object + sequence_number: 6 + type: response.function_call_arguments.done properties: - type: + arguments: + type: string + item_id: + type: string + name: 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' + type: integer sequence_number: - type: number + type: integer + type: + enum: + - response.function_call_arguments.done + type: string required: - type + - item_id - output_index - - item + - name + - arguments - 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 + BaseInputs: + anyOf: + - type: string + - items: + anyOf: + - properties: + content: + anyOf: + - 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 + - type: string + phase: + anyOf: + - enum: + - commentary + type: string + - enum: + - final_answer + type: string + - nullable: true + role: + anyOf: + - enum: + - user + type: string + - enum: + - system + type: string + - enum: + - assistant + type: string + - enum: + - developer + type: string + type: + enum: + - message + type: string + required: + - role + - content + 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 + example: + - content: What is the weather today? + role: user + BaseMessagesResult: + description: Base Anthropic Messages API response before OpenRouter extensions + example: + 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: + container: + $ref: '#/components/schemas/AnthropicContainer' + content: + items: + $ref: '#/components/schemas/ORAnthropicContentBlock' + type: array + id: + type: string + model: type: string + role: enum: - - response.content_part.added - output_index: - type: number - item_id: + - assistant + type: string + stop_details: + $ref: '#/components/schemas/AnthropicRefusalStopDetails' + stop_reason: + $ref: '#/components/schemas/ORAnthropicStopReason' + stop_sequence: + nullable: true + 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 + - 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/ReasoningEffort' + summary: + $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: content_index: - type: number - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + type: integer + delta: + type: string + item_id: + type: string + output_index: + type: integer sequence_number: - type: number + type: integer + type: + enum: + - response.reasoning_text.delta + type: string required: - type - output_index - item_id - content_index - - part + - delta - sequence_number - description: Event emitted when a new content part is added to an output item + type: object + BaseReasoningDoneEvent: + description: Event emitted when reasoning text streaming is complete 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 - ContentPartAddedEvent: - allOf: - - $ref: '#/components/schemas/BaseContentPartAddedEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - 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 - part: - type: output_text - text: '' - annotations: [] - sequence_number: 3 - BaseContentPartDoneEvent: - type: object + 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: - type: string - enum: - - response.content_part.done - output_index: - type: number + content_index: + type: integer item_id: type: string - content_index: - type: number - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + output_index: + type: integer sequence_number: - type: number + type: integer + text: + type: string + type: + enum: + - response.reasoning_text.done + type: string required: - type - output_index - item_id - content_index - - part + - text - 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 - ContentPartDoneEvent: - allOf: - - $ref: '#/components/schemas/BaseContentPartDoneEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - description: Event emitted when a content part is complete + type: object + BaseReasoningSummaryPartAddedEvent: + description: Event emitted when a reasoning summary part is added example: - type: response.content_part.done - output_index: 0 item_id: item-1 - content_index: 0 + output_index: 0 part: - type: output_text - text: Hello! How can I help you? - annotations: [] - sequence_number: 7 - OpenResponsesTopLogprobs: - type: object + text: '' + type: summary_text + sequence_number: 3 + summary_index: 0 + type: response.reasoning_summary_part.added properties: - token: + item_id: type: string - logprob: - type: number - bytes: - type: array - items: - type: number - description: Alternative token with its log probability - example: - token: hello - logprob: -0.5 - OpenResponsesLogProbs: - type: object - properties: - logprob: - type: number - token: + output_index: + type: integer + part: + $ref: '#/components/schemas/ReasoningSummaryText' + sequence_number: + type: integer + summary_index: + type: integer + type: + enum: + - response.reasoning_summary_part.added 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 + - output_index + - item_id + - summary_index + - part + - sequence_number type: object + BaseReasoningSummaryPartDoneEvent: + 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 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 + output_index: + type: integer + part: + $ref: '#/components/schemas/ReasoningSummaryText' sequence_number: - type: number + type: integer + summary_index: + type: integer + type: + enum: + - response.reasoning_summary_part.done + type: string required: - type - - logprobs - output_index - item_id - - content_index - - delta + - summary_index + - part - sequence_number - description: Event emitted when a text delta is streamed + type: object + BaseReasoningSummaryTextDeltaEvent: + description: Event emitted when reasoning summary text delta is streamed example: - type: response.output_text.delta - logprobs: [] - output_index: 0 + delta: Analyzing item_id: item-1 - content_index: 0 - delta: Hello - sequence_number: 4 - TextDeltaEvent: - allOf: - - $ref: '#/components/schemas/BaseTextDeltaEvent' - - 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 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 + summary_index: 0 + type: response.reasoning_summary_text.delta properties: - type: + delta: type: string - enum: - - response.output_text.done - output_index: - type: number item_id: type: string - content_index: - type: number - text: - type: string + output_index: + type: integer sequence_number: - type: number - logprobs: - type: array - items: - $ref: '#/components/schemas/OpenResponsesLogProbs' + type: integer + summary_index: + type: integer + type: + enum: + - response.reasoning_summary_text.delta + type: string required: - type - - output_index - item_id - - content_index - - text + - output_index + - summary_index + - delta - sequence_number - - logprobs - description: Event emitted when text streaming is complete + type: object + BaseReasoningSummaryTextDoneEvent: + description: Event emitted when reasoning summary 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 + summary_index: 0 + text: Analyzing the problem step by step to find the optimal solution. + type: response.reasoning_summary_text.done properties: - type: + item_id: type: string - enum: - - response.refusal.delta output_index: - type: number - item_id: + type: integer + sequence_number: + type: integer + summary_index: + type: integer + text: type: string - content_index: - type: number - delta: + type: + enum: + - response.reasoning_summary_text.done type: string - sequence_number: - type: number required: - type - - output_index - item_id - - content_index - - delta + - output_index + - summary_index + - text - sequence_number + type: object + BaseRefusalDeltaEvent: 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 + item_id: item-1 + output_index: 0 sequence_number: 4 - BaseRefusalDoneEvent: - type: object + type: response.refusal.delta properties: - type: + content_index: + type: integer + delta: type: string - enum: - - response.refusal.done - output_index: - type: number item_id: type: string - content_index: - type: number - refusal: - type: string + output_index: + type: integer sequence_number: - type: number + type: integer + type: + enum: + - response.refusal.delta + type: string required: - type - output_index - item_id - content_index - - refusal + - delta - sequence_number + type: object + BaseRefusalDoneEvent: 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 + output_index: 0 refusal: I'm sorry, but I can't assist with that request. sequence_number: 6 - BaseAnnotationAddedEvent: - type: object + type: response.refusal.done properties: - type: + content_index: + type: integer + item_id: type: string - enum: - - response.output_text.annotation.added output_index: - type: number - item_id: + type: integer + refusal: type: string - content_index: - type: number sequence_number: - type: number - annotation_index: - type: number - annotation: - $ref: '#/components/schemas/OpenAIResponsesAnnotation' + type: integer + type: + enum: + - response.refusal.done + type: string required: - type - output_index - item_id - content_index + - refusal - 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 + BaseResponsesResult: + 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: - type: - type: string - enum: - - response.function_call_arguments.delta - item_id: - type: string - output_index: + background: + nullable: true + type: boolean + completed_at: + type: integer + created_at: + type: integer + error: + $ref: '#/components/schemas/ResponsesErrorField' + frequency_penalty: + format: double type: number - delta: + id: 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: + 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 + object: enum: - - response.function_call_arguments.done - item_id: + - response type: string - output_index: + output: + 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' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + type: array + output_text: + type: string + parallel_tool_calls: + type: boolean + presence_penalty: + format: double type: number - name: + previous_response_id: + nullable: true type: string - arguments: + prompt: + $ref: '#/components/schemas/StoredPromptTemplate' + prompt_cache_key: + nullable: true type: string - sequence_number: + 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 - 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 + text: + $ref: '#/components/schemas/TextConfig' + tool_choice: + $ref: '#/components/schemas/OpenAIResponsesToolChoice' + tools: + items: + oneOf: + - allOf: + - $ref: '#/components/schemas/FunctionTool' + - properties: {} + type: object + description: Function tool definition + example: + description: Get the current weather in a location + name: get_weather + parameters: + properties: + location: + description: The city and state + type: string + unit: + enum: + - celsius + - fahrenheit + type: string + x-speakeasy-unknown-values: allow + required: + - location + type: object + type: function + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' + type: array + top_logprobs: + type: integer + top_p: + format: double + type: number + truncation: + $ref: '#/components/schemas/Truncation' + usage: + $ref: '#/components/schemas/OpenAIResponsesUsage' + user: + nullable: true + type: string + required: + - id + - object + - created_at + - model + - status + - completed_at + - output + - error + - incomplete_details + - temperature + - top_p + - presence_penalty + - frequency_penalty + - instructions + - metadata + - tools + - tool_choice + - parallel_tool_calls + type: object + BaseTextDeltaEvent: + description: Event emitted when a text delta is streamed example: - type: response.function_call_arguments.done + content_index: 0 + delta: Hello item_id: item-1 + logprobs: [] output_index: 0 - name: get_weather - arguments: '{"city": "San Francisco", "units": "celsius"}' - sequence_number: 6 - BaseReasoningDeltaEvent: - type: object + sequence_number: 4 + type: response.output_text.delta properties: - type: - type: string - enum: - - response.reasoning_text.delta - output_index: - type: number - item_id: - type: string content_index: - type: number + type: integer delta: type: string + item_id: + type: string + 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 - description: Event emitted when reasoning text delta is streamed + type: object + BaseTextDoneEvent: + description: Event emitted when text streaming is complete 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: - type: object + logprobs: [] + output_index: 0 + sequence_number: 6 + text: Hello! How can I help you? + type: response.output_text.done properties: - type: - type: string - enum: - - response.reasoning_text.done - output_index: - type: number + content_index: + type: integer item_id: type: string - content_index: - type: number + logprobs: + items: + $ref: '#/components/schemas/OpenResponsesLogProbs' + type: array + output_index: + type: integer + sequence_number: + type: integer text: type: string - sequence_number: - type: number + type: + enum: + - response.output_text.done + type: string required: - type - output_index @@ -3031,13624 +2963,13327 @@ components: - 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 + - logprobs + type: object + BigNumberUnion: + description: Price per million prompt tokens + example: 1000 + type: string + BulkAssignKeysRequest: 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: + 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: - type: - type: string - enum: - - response.reasoning_summary_part.added - output_index: - type: number - item_id: - type: string - summary_index: - type: number - part: - $ref: '#/components/schemas/ReasoningSummaryText' - sequence_number: - type: number + assigned_count: + description: Number of keys successfully assigned + example: 3 + type: integer required: - - type - - output_index - - item_id - - summary_index - - part - - sequence_number - description: Event emitted when a reasoning summary part is added + - assigned_count + type: object + BulkAssignMembersRequest: 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 + 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: - 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: + 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: - 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 + 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: - - 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: + - key_hashes type: object + BulkUnassignKeysResponse: + example: + unassigned_count: 3 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 + unassigned_count: + description: Number of keys successfully unassigned + example: 3 + type: integer 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 + - unassigned_count + type: object + BulkUnassignMembersRequest: example: - type: response.reasoning_summary_text.delta - item_id: item-1 - output_index: 0 - summary_index: 0 - delta: Analyzing - sequence_number: 4 - BaseReasoningSummaryTextDoneEvent: + 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: - 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 + unassigned_count: + description: Number of members successfully unassigned + example: 2 + type: integer required: - - type - - item_id - - output_index - - summary_index - - text - - sequence_number - description: Event emitted when reasoning summary text streaming is complete + - unassigned_count + type: object + ChatAssistantImages: + description: Generated images from image generation models 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 + - 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: - 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 + content: The capital of France is Paris. + role: assistant properties: - type: + 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 - enum: - - response.image_generation_call.in_progress - item_id: + reasoning: + description: Reasoning output + nullable: true 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: + reasoning_details: + $ref: '#/components/schemas/ChatReasoningDetails' + refusal: + description: Refusal message if content was refused + nullable: true type: string + role: enum: - - response.image_generation_call.generating - item_id: + - assistant type: string - output_index: - type: number - sequence_number: - type: number + tool_calls: + description: Tool calls made by the assistant + items: + $ref: '#/components/schemas/ChatToolCall' + type: array 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: + - 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: - type: - type: string - enum: - - response.image_generation_call.partial_image - item_id: + data: + description: Base64 encoded audio data type: string - output_index: - type: number - sequence_number: - type: number - partial_image_b64: + expires_at: + description: Audio expiration timestamp + type: integer + id: + description: Audio output identifier 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 + transcript: + description: Audio transcript + type: string + type: object + ChatChoice: + description: Chat completion choice 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: + 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: - type: string enum: - - response.image_generation_call.completed - item_id: + - input_audio type: string - output_index: - type: number - sequence_number: - type: number required: - type - - item_id - - output_index - - sequence_number - ImageGenCallCompletedEvent: + - input_audio + type: object + ChatContentCacheControl: allOf: - - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' - - type: object - properties: {} - description: Image generation call completed + - $ref: '#/components/schemas/AnthropicCacheControlDirective' + - properties: {} + type: object + description: Cache control for the content part example: - type: response.image_generation_call.completed - output_index: 0 - sequence_number: 4 - item_id: call-123 - OpenAIResponsesWebSearchCallInProgress: - type: object + 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: - type: string enum: - - response.web_search_call.in_progress - item_id: + - file 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: + - 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: - type: string enum: - - response.web_search_call.searching - item_id: + - image_url 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: + - 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: - - response.web_search_call.completed - item_id: + - video_url type: string - output_index: - type: number - sequence_number: - type: number + video_url: + $ref: '#/components/schemas/ChatContentVideoInput' required: - type - - item_id - - output_index - - sequence_number - WebSearchCallCompletedEvent: - allOf: - - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' - - type: object - properties: {} - description: Web search call completed + - video_url + type: object + ChatContentVideoInput: + description: Video input object 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 + url: https://example.com/video.mp4 properties: - code: - type: integer - message: + url: + description: 'URL of the video (data: URLs supported)' type: string - metadata: - type: object - nullable: true - additionalProperties: - nullable: true required: - - code - - message - description: Error data for BadRequestResponse + - url + type: object + ChatDebugOptions: + description: Debug options for inspecting request transformations (streaming only) example: - code: 400 - message: Invalid request parameters - BadRequestResponse: + 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: - error: - $ref: '#/components/schemas/BadRequestResponseErrorData' - user_id: + 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 - nullable: true required: + - role + - content + type: object + ChatFinishReasonEnum: + enum: + - tool_calls + - stop + - length + - content_filter - error - description: Bad Request - Invalid request parameters or malformed input + - null + example: stop + nullable: true + type: string + x-speakeasy-unknown-values: allow + ChatFormatGrammarConfig: + description: Custom grammar response format example: - error: - code: 400 - message: Invalid request parameters - UnauthorizedResponseErrorData: - type: object + grammar: root ::= "yes" | "no" + type: grammar properties: - code: - type: integer - message: + grammar: + description: Custom grammar for text generation + example: root ::= "yes" | "no" 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: + enum: + - grammar type: string - nullable: true required: - - error - description: Unauthorized - Authentication required or invalid credentials - example: - error: - code: 401 - message: Missing Authentication header - PaymentRequiredResponseErrorData: + - 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: - code: - type: integer - message: + json_schema: + $ref: '#/components/schemas/ChatJsonSchemaConfig' + type: + enum: + - json_schema 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 + - json_schema type: object + ChatFormatPythonConfig: + description: Python code response format + example: + type: python properties: - error: - $ref: '#/components/schemas/PaymentRequiredResponseErrorData' - user_id: + type: + enum: + - python 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 type: object + ChatFormatTextConfig: + description: Default text response format + example: + type: text properties: - code: - type: integer - message: + type: + enum: + - text 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 type: object - properties: - code: - type: integer - message: - type: string - metadata: + 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 - nullable: true - additionalProperties: - nullable: true - required: - - code - - message - description: Error data for RequestTimeoutResponse + - $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: - 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 + 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: - error: - code: 408 - message: Operation timed out. Please try again later. - PayloadTooLargeResponseErrorData: - type: object - properties: - code: - type: integer - message: - type: string - metadata: + description: A mathematical response + name: math_response + schema: + properties: + answer: + type: number + required: + - answer 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 + strict: true properties: - error: - $ref: '#/components/schemas/PayloadTooLargeResponseErrorData' - user_id: + description: + description: Schema description for the model + example: A mathematical response 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: + name: + description: Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: math_response + maxLength: 64 type: string - metadata: - type: object - nullable: true + schema: 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: + 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 - additionalProperties: - nullable: true + type: boolean required: - - code - - message - description: Error data for TooManyRequestsResponse - example: - code: 429 - message: Rate limit exceeded - TooManyRequestsResponse: + - name type: object - properties: - error: - $ref: '#/components/schemas/TooManyRequestsResponseErrorData' - user_id: - type: string - nullable: true - required: - - error - description: Too Many Requests - Rate limit exceeded + 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: - 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 + 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: - 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 + - 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: - error: - code: 500 - message: Internal Server Error - BadGatewayResponseErrorData: - type: object + function: + name: get_weather + type: function properties: - code: - type: integer - message: - type: string - metadata: + function: + properties: + name: + description: Function name to call + example: get_weather + type: string + required: + - name 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: + enum: + - function type: string - nullable: true required: - - error - description: Bad Gateway - Provider/upstream API failure - example: - error: - code: 502 - message: Provider returned error - ServiceUnavailableResponseErrorData: + - type + - function 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 + ChatReasoningDetails: + description: Reasoning details for extended thinking models 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 + - 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: - error: - code: 503 - message: Service temporarily unavailable - EdgeNetworkTimeoutResponseErrorData: - type: object + 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: - code: - type: integer - message: - type: string - metadata: + 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 - nullable: true + logit_bias: 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 + format: double + type: number + description: Token logit bias adjustments + example: + '50256': -100 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: - type: object - properties: - code: + 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 - message: - type: string + 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 - additionalProperties: - nullable: true - 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: - allOf: - - $ref: '#/components/schemas/OutputItemReasoning' - - type: object + 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: - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/ReasoningTextContent' - signature: - type: string + effort: + description: Constrains effort on reasoning for reasoning models + enum: + - xhigh + - high + - medium + - low + - minimal + - none + - null + example: medium 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 - 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 - properties: - type: - type: string + 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: - - input_video - video_url: + - auto + - default + - flex + - priority + - scale + - null + example: auto + nullable: true 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 - example: - type: input_video - video_url: https://example.com/video.mp4 - EasyInputMessage: - type: object - properties: - type: + 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 - 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: + stop: anyOf: - type: string - enum: - - commentary - - type: string - enum: - - final_answer + - items: + type: string + maxItems: 4 + type: array - 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 + 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: - - role - InputMessageItem: + - 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 - type: + model: + description: Model used for completion + example: openai/gpt-4 type: string + object: enum: - - message - role: - anyOf: - - type: string - enum: - - user - - type: string - enum: - - system - - type: string - enum: - - developer - content: - type: array + - chat.completion + type: string + service_tier: + description: The service tier used by the upstream provider for this request + example: default nullable: true - 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 + system_fingerprint: + description: System fingerprint + example: fp_44709d6fcb + nullable: true + type: string + usage: + $ref: '#/components/schemas/ChatUsage' required: - - role - FunctionCallItem: + - 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: - type: + 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 - enum: - - function_call - call_id: + model: + description: Model used for completion + example: openai/gpt-4 type: string - name: + object: + enum: + - chat.completion.chunk type: string - arguments: + service_tier: + description: The service tier used by the upstream provider for this request + example: default + nullable: true type: string - id: + system_fingerprint: + description: System fingerprint + example: fp_44709d6fcb type: string - status: - $ref: '#/components/schemas/ToolCallStatusEnum' + usage: + $ref: '#/components/schemas/ChatUsage' 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: + - choices + - created + - model + - object type: object + x-speakeasy-entity: ChatStreamChunk + ChatStreamDelta: + description: Delta changes in streaming response + example: + content: Hello + role: assistant properties: - type: + audio: + allOf: + - $ref: '#/components/schemas/ChatAudioOutput' + - description: Audio output data + content: + description: Message content delta + example: Hello + nullable: true type: string - enum: - - function_call_output - id: + 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 - 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 + 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: - type: function_call_output - id: output-abc123 - call_id: call-abc123 - output: '{"temperature":72,"conditions":"sunny"}' - status: completed - OutputDatetimeItem: + 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: - type: - type: string - enum: - - openrouter:datetime + 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 - status: - type: string + index: + description: Tool call index in the array + example: 0 + type: integer + type: + description: Tool call type enum: - - completed - - in_progress - - incomplete - x-speakeasy-unknown-values: allow - datetime: - type: string - description: ISO 8601 datetime string - timezone: + - function + example: function 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 - Inputs: - anyOf: - - type: string - - type: array - items: - anyOf: - - $ref: '#/components/schemas/ReasoningItem' - - $ref: '#/components/schemas/EasyInputMessage' - - $ref: '#/components/schemas/InputMessageItem' - - $ref: '#/components/schemas/FunctionCallItem' - - $ref: '#/components/schemas/FunctionCallOutputItem' - - allOf: - - $ref: '#/components/schemas/OutputMessageItem' - - type: object - properties: - content: - anyOf: - - type: array - items: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - - type: string - - nullable: true - 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 - - allOf: - - $ref: '#/components/schemas/OutputReasoningItem' - - type: object - properties: - summary: - type: array - nullable: true - items: - $ref: '#/components/schemas/ReasoningSummaryText' - 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 - - $ref: '#/components/schemas/OutputFunctionCallItem' - - $ref: '#/components/schemas/OutputWebSearchCallItem' - - $ref: '#/components/schemas/OutputFileSearchCallItem' - - $ref: '#/components/schemas/OutputImageGenerationCallItem' - - $ref: '#/components/schemas/OutputDatetimeItem' - - $ref: '#/components/schemas/OutputServerToolItem' - description: Input for a response request - can be a string or array of items - example: - - role: user - content: What is the weather today? - DatetimeServerTool: + - index type: object + ChatSystemMessage: + description: System message for setting behavior + example: + content: You are a helpful assistant. + name: Assistant Config + role: system properties: - type: + 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: - - openrouter:datetime - parameters: - type: object - properties: - timezone: - type: string - description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC. - example: America/New_York + - system + type: string required: - - type - description: 'OpenRouter built-in server tool: returns the current date and time' + - role + - content + type: object + ChatTokenLogprob: + description: Token log probability information example: - type: openrouter:datetime - parameters: - timezone: America/New_York - WebSearchServerTool_OpenRouter: + 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: - type: + 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: - - 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 + - function + type: string required: + - id - type - description: 'OpenRouter built-in server tool: searches the web for current information' + - 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: - 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 + 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: - format: - type: text - verbosity: medium - ReasoningConfig: - allOf: - - $ref: '#/components/schemas/BaseReasoningConfig' - - type: object + 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: - max_tokens: - type: number - nullable: true - enabled: - type: boolean - nullable: true - description: Configuration for reasoning mode in the response - example: - summary: auto - enabled: true - OutputModalityEnum: - type: string - enum: - - text - - image - x-speakeasy-unknown-values: allow - ResponseIncludesEnum: - 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 - OpenAIResponsesTruncation: - type: string - nullable: true - enum: - - auto - - disabled - 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 - enum: - - 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 - example: OpenAI - x-speakeasy-unknown-values: allow - Quantization: - type: string - enum: - - int4 - - int8 - - fp4 - - fp6 - - fp8 - - fp16 - - bf16 - - 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: + 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: - by: + 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 - nullable: true + role: enum: - - price - - throughput - - latency - - exacto - description: The provider sorting strategy (price, throughput, latency) - example: price - x-speakeasy-unknown-values: allow - partition: + - user 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: + 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: - 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' - - 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. - 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 - properties: - engine: - $ref: '#/components/schemas/PDFParserEngine' - description: Options for PDF parsing. - ContextCompressionEngine: - type: string - enum: - - middle-out - description: The compression engine to use. Defaults to "middle-out". - ResponsesRequest: - type: object - properties: - input: - $ref: '#/components/schemas/Inputs' - instructions: - type: string - nullable: true - metadata: - $ref: '#/components/schemas/RequestMetadata' - tools: - type: array + 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: - anyOf: - - allOf: - - $ref: '#/components/schemas/FunctionTool' - - type: object - properties: {} - description: Function tool definition - 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 - - $ref: '#/components/schemas/Preview_WebSearchServerTool' - - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' - - $ref: '#/components/schemas/Legacy_WebSearchServerTool' - - $ref: '#/components/schemas/WebSearchServerTool' - - $ref: '#/components/schemas/FileSearchServerTool' - - $ref: '#/components/schemas/ComputerUseServerTool' - - $ref: '#/components/schemas/CodeInterpreterServerTool' - - $ref: '#/components/schemas/McpServerTool' - - $ref: '#/components/schemas/ImageGenerationServerTool' - - $ref: '#/components/schemas/CodexLocalShellTool' - - $ref: '#/components/schemas/ShellServerTool' - - $ref: '#/components/schemas/ApplyPatchServerTool' - - $ref: '#/components/schemas/CustomTool' - - $ref: '#/components/schemas/DatetimeServerTool' - - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' - tool_choice: - $ref: '#/components/schemas/OpenAIResponsesToolChoice' - parallel_tool_calls: - type: boolean - nullable: true - model: - type: string - models: + 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 - 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_logprobs: - type: integer - nullable: true - minimum: 0 - maximum: 20 - max_tool_calls: + 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 - nullable: true - presence_penalty: - 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 + max_total_results: 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: + 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 - 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: + container_id: type: string - nullable: true - store: - type: boolean - const: false - default: false - service_tier: + 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: - - auto - - default - - flex - - priority - - scale - default: auto - x-speakeasy-unknown-values: allow - 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: + - code_interpreter_call 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 + required: + - type + - id + - code + - outputs + - status + - container_id + type: object + CodeInterpreterServerTool: + description: Code interpreter tool configuration 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: + 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 - BaseMessagesResult: + 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: - id: - type: string 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: - - message - role: + - 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: - - assistant - container: - type: object - nullable: true + - 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' + - 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: + content_index: 0 + item_id: item-1 + output_index: 0 + part: + annotations: [] + text: '' + type: output_text + sequence_number: 3 + type: response.content_part.added + ContentPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseContentPartDoneEvent' + - 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: + 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 + ContentPartImage: + example: + image_url: + url: https://example.com/image.png + type: image_url + properties: + image_url: properties: - id: - type: string - expires_at: + url: type: string required: - - id - - expires_at - content: + - url + type: object + type: + enum: + - image_url + type: string + 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: 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_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: + type: string + minItems: 1 + nullable: true type: array + allowed_providers: + description: List of allowed provider IDs + example: + - openai + - anthropic + - deepseek 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 - 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 - properties: - code: - type: integer - message: - type: string - metadata: - type: object - nullable: true - additionalProperties: - nullable: true - 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 - 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 - properties: - type: - type: string - enum: - - ephemeral - ttl: - 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 - 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 - 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 - additionalProperties: - nullable: true - description: JSON Schema object - example: - type: object - properties: - answer: - type: number - required: - - answer - strict: - type: boolean - 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: - 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 - 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: - 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 - 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: - 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: - engine: auto - max_results: 5 - ChatWebSearchShorthand: - type: object - 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 - 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. - 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: 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: - 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) - example: - echo_upstream_body: true - ChatRequest: - type: object - properties: - 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 - 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 - 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 - CreateChargeRequest: - type: object - properties: - amount: - type: number - sender: - type: string - chain_id: - type: integer - enum: - - 1 - - 137 - - 8453 - x-speakeasy-unknown-values: allow - required: - - amount - - sender - - chain_id - description: Create a Coinbase charge for crypto payment - example: - amount: 100 - sender: '0x1234567890123456789012345678901234567890' - chain_id: 1 - ProviderPreferences: - 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 - 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: - 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: - type: object - properties: - id: - type: string - description: Unique identifier for the model - example: openai/gpt-4 - canonical_slug: - type: string - 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 - 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 - 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 - items: - $ref: '#/components/schemas/Parameter' - description: List of supported parameters for this model - default_parameters: - $ref: '#/components/schemas/DefaultParameters' - knowledge_cutoff: - type: string - 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 - 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' - 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: - type: object - properties: - data: - $ref: '#/components/schemas/ModelsListResponseData' - 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: - 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 - example: - data: - count: 150 - InstructType: - 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 - 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 - 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 - 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 - items: - $ref: '#/components/schemas/PublicEndpoint' - description: List of available endpoints for this model - 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 - properties: - code: - type: integer - message: - type: string - metadata: - type: object - nullable: true - additionalProperties: - nullable: true - required: - - code - - message - description: Error data for ConflictResponse - example: - code: 409 - message: Resource conflict. Please try again later. - ConflictResponse: - type: object - properties: - error: - $ref: '#/components/schemas/ConflictResponseErrorData' - user_id: - type: string - nullable: true - required: - - error - description: Conflict - Resource conflict or concurrent modification - 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 - x-speakeasy-name-override: appTitle - 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 - x-speakeasy-name-override: appCategories - schema: - type: string - description: | - Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - securitySchemes: - apiKey: - type: http - scheme: bearer - description: API key as bearer token in Authorization header - bearer: - type: http - scheme: bearer - description: API key as bearer token in Authorization header -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. - parameters: - - schema: - type: string - 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 - in: query - responses: - '200': - description: Returns user activity data grouped by endpoint - content: - application/json: - 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 - '400': - description: Bad Request - Invalid date format or date range - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '403': - description: Forbidden - Only management keys can fetch activity - content: - application/json: - schema: - $ref: '#/components/schemas/ForbiddenResponse' - '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" - /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. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ChatRequest' - required: true - responses: - '200': - description: Successful chat completion response - content: - application/json: - schema: - $ref: '#/components/schemas/ChatResult' - text/event-stream: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/ChatStreamChunk' - 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' - 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. - responses: - '200': - description: Returns the total credits purchased and used - content: - application/json: - 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 - '401': - description: Unauthorized - Authentication required or invalid credentials - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '403': - description: Forbidden - Only management keys can fetch credits - content: - application/json: - schema: - $ref: '#/components/schemas/ForbiddenResponse' - '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" - /credits/coinbase: - post: - security: - - bearer: [] - x-speakeasy-name-override: createCoinbaseCharge - tags: - - Credits - summary: Create a Coinbase charge for crypto payment - operationId: createCoinbaseCharge - description: Create a Coinbase charge for crypto payment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateChargeRequest' - required: true - responses: - '200': - description: Returns the calldata to fulfill the transaction - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - id: - type: string - created_at: - type: string - expires_at: - type: string - web3_data: - type: object - properties: - transfer_intent: - type: object - properties: - call_data: - type: object - properties: - deadline: - type: string - fee_amount: - type: string - id: - type: string - operator: - type: string - prefix: - type: string - recipient: - type: string - recipient_amount: - type: string - recipient_currency: - type: string - refund_destination: - type: string - signature: - type: string - required: - - deadline - - fee_amount - - id - - operator - - prefix - - recipient - - recipient_amount - - recipient_currency - - refund_destination - - signature - metadata: - type: object - properties: - chain_id: - type: number - contract_address: - type: string - sender: - type: string - required: - - chain_id - - contract_address - - sender - required: - - call_data - - metadata - required: - - transfer_intent - required: - - id - - created_at - - expires_at - - web3_data - required: - - data - '400': - description: Bad Request - Invalid credit amount or request body - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Authentication required or invalid credentials - 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 - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - 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 - requestBody: - content: - application/json: - schema: - type: object - properties: - input: - anyOf: - - type: string - - type: array - items: - type: string - - type: array - items: - type: number - - type: array - items: - type: array - items: - type: number - - type: array - items: - type: object - properties: - content: - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - required: - - type - - text - - type: object - properties: - type: - type: string - enum: - - image_url - image_url: - type: object - properties: - url: - type: string - required: - - url - required: - - type - - image_url - required: - - content - model: - type: string - encoding_format: - type: string - enum: - - float - - base64 - x-speakeasy-unknown-values: allow - dimensions: - type: integer - minimum: 0 - exclusiveMinimum: true - user: - type: string - provider: - $ref: '#/components/schemas/ProviderPreferences' - input_type: - type: string - required: - - input - - model - required: true - responses: - '200': - description: Embedding response - content: - application/json: - schema: - type: object - properties: - id: - type: string - object: - type: string - enum: - - list - data: - type: array - items: - type: object - properties: - object: - type: string - enum: - - embedding - embedding: - anyOf: - - type: array - items: - type: number - - type: string - index: - type: number - required: - - object - - embedding - model: - type: string - usage: - type: object - properties: - prompt_tokens: - type: number - total_tokens: - type: number - cost: - type: number - required: - - prompt_tokens - - total_tokens - required: - - object - - data - - model - text/event-stream: - schema: - type: string - description: Not used for embeddings - embeddings do not support streaming - 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' - '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: Cloudflare Timeout - Provider request timed out at CDN edge - 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: createEmbeddings - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /embeddings/models: - get: - tags: - - Embeddings - x-speakeasy-name-override: listModels - summary: List all embeddings models - description: Returns a list of all available embeddings models and their properties - responses: - '200': - description: Returns a list of embeddings models - content: - application/json: - schema: - $ref: '#/components/schemas/ModelsListResponse' - '400': - description: Bad Request - Invalid request parameters - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - operationId: listEmbeddingsModels - 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 - parameters: - - schema: - type: string - minLength: 1 - required: true - name: id - in: query - responses: - '200': - description: Returns the request metadata for this generation - content: - application/json: - schema: - type: object - properties: - data: - type: object - 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 - enum: - - completions - - embeddings - - video - description: Type of API used for the generation - x-speakeasy-unknown-values: allow - router: - type: string - nullable: true - 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 - 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 - required: - - id - - upstream_id - - total_cost - - cache_discount - - upstream_inference_cost - - created_at - - model - - app_id - - streamed - - cancelled - - provider_name - - latency - - moderation_latency - - generation_time - - finish_reason - - tokens_prompt - - tokens_completion - - native_tokens_prompt - - native_tokens_completion - - native_tokens_completion_images - - native_tokens_reasoning - - native_tokens_cached - - num_media_prompt - - num_input_audio_prompt - - num_media_completion - - num_search_results - - origin - - usage - - is_byok - - native_finish_reason - - external_user - - api_type - - router - - provider_responses - - user_agent - - http_referer - description: Generation data - required: - - data - description: Generation response - '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 - Generation not found - 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 - 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' - '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: getGeneration - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /models/count: - get: - tags: - - Models - x-speakeasy-name-override: count - summary: Get total count of available models - 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 - in: query - responses: - '200': - description: Returns the total count of available models - content: - application/json: - schema: - $ref: '#/components/schemas/ModelsCountResponse' - '400': - description: Bad Request - Invalid output_modalities value - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - operationId: listModelsCount - 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 - parameters: - - schema: - type: string - enum: - - programming - - roleplay - - marketing - - marketing/seo - - technology - - science - - translation - - legal - - finance - - health - - trivia - - academia - description: Filter models by use case category - example: programming - x-speakeasy-unknown-values: allow - required: false - description: Filter models by use case category - name: category - in: query - - schema: - type: string - required: false - name: supported_parameters - in: query - - 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 - in: query - responses: - '200': - description: Returns a list of models or RSS feed - content: - application/json: - schema: - $ref: '#/components/schemas/ModelsListResponse' - '400': - description: Bad Request - Invalid request parameters - content: - application/json: - schema: - $ref: '#/components/schemas/BadRequestResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - operationId: getModels - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /models/user: - get: - 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 - 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 - name: author - in: path - - schema: - type: string - required: true - name: slug - in: path - responses: - '200': - description: Returns a list of endpoints - content: - application/json: - schema: - type: object - properties: - data: - $ref: '#/components/schemas/ListEndpointsResponse' - required: - - data - '404': - description: Not Found - Model does not exist - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' - '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" - /endpoints/zdr: - get: - tags: - - Endpoints - x-speakeasy-name-override: listZdrEndpoints - summary: Preview the impact of ZDR on the available endpoints - responses: - '200': - description: Returns a list of endpoints - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/PublicEndpoint' - required: - - data - '500': - description: Internal Server Error - Unexpected server error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' - operationId: listEndpointsZdr - 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: - schema: - type: object - 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 - datacenters: - type: array - nullable: true - items: - type: string - 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 - x-speakeasy-unknown-values: allow - description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations + 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 + enforce_zdr: + description: Whether to enforce zero data retention + example: false + nullable: true + type: boolean + 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 + reset_interval: + $ref: '#/components/schemas/GuardrailInterval' + required: + - name + 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_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: + enum: + - custom + type: string + required: + - type + - 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: + enum: + - openrouter:datetime + type: string + required: + - type + 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: + enum: + - message + type: string + required: + - role + type: object + EdgeNetworkTimeoutResponse: + description: Infrastructure Timeout - Provider request timed out at edge network + example: + error: + code: 524 + message: Request timed out. Please try again later. + 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: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + EndpointStatus: + enum: + - 0 + - -1 + - -2 + - -3 + - -5 + - -10 + example: 0 + type: integer + x-speakeasy-unknown-values: allow + ErrorEvent: + allOf: + - $ref: '#/components/schemas/BaseErrorEvent' + - properties: {} + type: object + description: Event emitted when an error occurs during streaming + example: + 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: + enum: + - response.failed + type: string + required: + - type + - response + - sequence_number + type: object + FileCitation: + example: + file_id: file-abc123 + filename: research_paper.pdf + index: 0 + type: file_citation + properties: + file_id: + type: string + filename: + type: string + index: + type: integer + type: + enum: + - file_citation + type: string + required: + - 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_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_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_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: + enum: + - 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' + - 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' + 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 + type: object + InputModality: + enum: + - text + - image + - file + - audio + - video + example: text + type: string + x-speakeasy-unknown-values: allow + Inputs: + anyOf: + - type: string + - items: + anyOf: + - $ref: '#/components/schemas/ReasoningItem' + - $ref: '#/components/schemas/EasyInputMessage' + - $ref: '#/components/schemas/InputMessageItem' + - $ref: '#/components/schemas/FunctionCallItem' + - $ref: '#/components/schemas/FunctionCallOutputItem' + - allOf: + - $ref: '#/components/schemas/OutputMessageItem' + - properties: + content: + anyOf: + - 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 + role: assistant + status: completed + type: message + - allOf: + - $ref: '#/components/schemas/OutputReasoningItem' + - properties: + summary: + 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 + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + status: completed + summary: + - 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/OutputWebSearchServerToolItem' + type: array + description: Input for a response request - can be a string or array of items + example: + - 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: + enum: + - 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 + 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_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 + - 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 + - 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 + required: + - type + - message + type: object + MessagesErrorEvent: + description: Error event in the stream + example: + 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: + 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: + 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: + 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 + - 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 + 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: + - Router + - Media + - Other + - GPT + - Claude + - Gemini + - Gemma + - Grok + - Cohere + - Nova + - Qwen + - Yi + - DeepSeek + - Mistral + - Llama2 + - Llama3 + - Llama4 + - PaLM + - RWKV + - Qwen3 + example: GPT + type: string + 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: + enum: + - auto + - disabled + - null + example: auto + nullable: true + 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 + - 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 + example: OpenAI + type: string + x-speakeasy-unknown-values: allow + ProviderOverloadedResponse: + description: Provider Overloaded - Provider is temporarily overloaded + example: + error: + code: 529 + message: Provider returned error + properties: + error: + $ref: '#/components/schemas/ProviderOverloadedResponseErrorData' + user_id: + nullable: true + type: string + required: + - error + type: object + ProviderOverloadedResponseErrorData: + description: Error data for ProviderOverloadedResponse + 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 + - 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 + 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 + - fp4 + - fp6 + - fp8 + - fp16 + - bf16 + - fp32 + - unknown + example: fp16 + type: string + x-speakeasy-unknown-values: allow + ReasoningConfig: + allOf: + - $ref: '#/components/schemas/BaseReasoningConfig' + - nullable: true + properties: + enabled: + nullable: true + type: boolean + max_tokens: + type: integer + type: object + description: Configuration for reasoning mode in the response + example: + enabled: true + summary: auto + ReasoningDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningDeltaEvent' + - properties: {} + type: object + description: Event emitted when reasoning text delta is streamed + example: + content_index: 0 + delta: First, we need + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.reasoning_text.delta + ReasoningDetailEncrypted: + description: Reasoning detail encrypted schema + example: + data: encrypted data + type: reasoning.encrypted + properties: + data: + type: string + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + type: + enum: + - reasoning.encrypted + type: string + required: + - type + - data + type: object + ReasoningDetailSummary: + description: Reasoning detail summary schema + example: + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.summary + properties: + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + summary: + type: string + type: + enum: + - reasoning.summary + type: string + required: + - type + - summary + type: object + ReasoningDetailText: + description: Reasoning detail text schema + example: + signature: signature + text: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.text + properties: + format: + $ref: '#/components/schemas/ReasoningFormat' + id: + nullable: true + type: string + index: + type: integer + signature: + nullable: true + type: string + text: + nullable: true + type: string + type: + enum: + - reasoning.text + type: string + required: + - type + type: object + ReasoningDetailUnion: + description: Reasoning detail union schema + discriminator: + mapping: + reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted' + reasoning.summary: '#/components/schemas/ReasoningDetailSummary' + reasoning.text: '#/components/schemas/ReasoningDetailText' + propertyName: type + example: + summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... + type: reasoning.summary + oneOf: + - $ref: '#/components/schemas/ReasoningDetailSummary' + - $ref: '#/components/schemas/ReasoningDetailEncrypted' + - $ref: '#/components/schemas/ReasoningDetailText' + ReasoningDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningDoneEvent' + - properties: {} + type: object + description: Event emitted when reasoning text streaming is complete + example: + content_index: 0 + item_id: item-1 + output_index: 0 + sequence_number: 6 + text: First, we need to identify the key components and then combine them logically. + type: response.reasoning_text.done + ReasoningEffort: + enum: + - xhigh + - high + - medium + - low + - minimal + - none + - null + example: medium + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningFormat: + enum: + - unknown + - openai-responses-v1 + - azure-openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + - google-gemini-v1 + - null + example: unknown + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningItem: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - properties: + content: + items: + $ref: '#/components/schemas/ReasoningTextContent' + nullable: true + type: array + format: + $ref: '#/components/schemas/ReasoningFormat' + signature: + nullable: true + type: string + type: object + description: Reasoning output item with signature and format extensions + example: + id: reasoning-abc123 + summary: + - text: Step by step analysis + type: summary_text + type: reasoning + ReasoningSummaryPartAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent' + - properties: {} + type: object + description: Event emitted when a reasoning summary part is added + example: + item_id: item-1 + output_index: 0 + part: + text: '' + type: summary_text + sequence_number: 3 + summary_index: 0 + type: response.reasoning_summary_part.added + ReasoningSummaryPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent' + - properties: {} + type: object + description: Event emitted when a reasoning summary part is complete + example: + item_id: item-1 + output_index: 0 + part: + text: Analyzing the problem step by step to find the optimal solution. + type: summary_text + sequence_number: 7 + summary_index: 0 + type: response.reasoning_summary_part.done + ReasoningSummaryText: + example: + text: Analyzed the problem using first principles + type: summary_text + properties: + text: + type: string + type: + enum: + - summary_text + type: string + required: + - type + - text + type: object + ReasoningSummaryTextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent' + - properties: {} + type: object + description: Event emitted when reasoning summary text delta is streamed + example: + delta: Analyzing + item_id: item-1 + output_index: 0 + sequence_number: 4 + summary_index: 0 + type: response.reasoning_summary_text.delta + ReasoningSummaryTextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent' + - properties: {} + type: object + description: Event emitted when reasoning summary text streaming is complete + example: + item_id: item-1 + output_index: 0 + sequence_number: 6 + summary_index: 0 + text: Analyzing the problem step by step to find the optimal solution. + type: response.reasoning_summary_text.done + ReasoningSummaryVerbosity: + enum: + - auto + - concise + - detailed + - null + example: auto + nullable: true + type: string + x-speakeasy-unknown-values: allow + ReasoningTextContent: + example: + text: Let me think step by step about this problem... + type: reasoning_text + properties: + text: + type: string + type: + enum: + - reasoning_text + type: string + required: + - type + - text + type: object + RefusalDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDeltaEvent' + - properties: {} + type: object + description: Event emitted when a refusal delta is streamed + example: + content_index: 0 + delta: I'm sorry + item_id: item-1 + output_index: 0 + sequence_number: 4 + type: response.refusal.delta + RefusalDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDoneEvent' + - properties: {} + type: object + description: Event emitted when refusal streaming is complete + example: + content_index: 0 + item_id: item-1 + output_index: 0 + refusal: I'm sorry, but I can't assist with that request. + sequence_number: 6 + type: response.refusal.done + RequestMetadata: + additionalProperties: + maxLength: 512 + type: string + description: >- + Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. + example: + session_id: abc-def-ghi + user_id: '123' + nullable: true + type: object + RequestTimeoutResponse: + description: Request Timeout - Operation exceeded time limit + example: + error: + code: 408 + message: Operation timed out. Please try again later. + properties: + error: + $ref: '#/components/schemas/RequestTimeoutResponseErrorData' + user_id: + nullable: true + type: string + required: + - error + type: object + RequestTimeoutResponseErrorData: + description: Error data for RequestTimeoutResponse + example: + code: 408 + message: Operation timed out. Please try again later. + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + ResponseHealingPlugin: + example: + enabled: true + id: response-healing + properties: + enabled: + description: Set to false to disable the response-healing plugin for this request. Defaults to true. + type: boolean + id: + enum: + - response-healing + type: string + required: + - id + type: object + ResponseIncludesEnum: + enum: + - file_search_call.results + - message.input_image.image_url + - computer_call_output.output.image_url + - reasoning.encrypted_content + - code_interpreter_call.outputs + example: file_search_call.results + type: string + x-speakeasy-unknown-values: allow + ResponseOutputText: + example: + annotations: + - end_index: 42 + start_index: 0 + title: Paris - Wikipedia + type: url_citation + url: https://en.wikipedia.org/wiki/Paris + text: The capital of France is Paris. + type: output_text + properties: + annotations: + items: + $ref: '#/components/schemas/OpenAIResponsesAnnotation' + type: array + logprobs: + items: + properties: + bytes: + items: + type: integer + type: array + logprob: + format: double + type: number + token: + type: string + top_logprobs: + items: + properties: + bytes: + items: + type: integer + type: array + logprob: + format: double + type: number + token: + type: string + required: + - token + - bytes + - logprob + type: object + type: array + required: + - token + - bytes + - logprob + - top_logprobs + type: object + type: array + text: + type: string + type: + enum: + - output_text + type: string + required: + - type + - text + type: object + ResponsesErrorField: + description: Error information returned from the API + example: + code: rate_limit_exceeded + message: Rate limit exceeded. Please try again later. + nullable: true + properties: + code: + enum: + - server_error + - rate_limit_exceeded + - invalid_prompt + - vector_store_timeout + - invalid_image + - invalid_image_format + - invalid_base64_image + - invalid_image_url + - image_too_large + - image_too_small + - image_parse_error + - image_content_policy_violation + - invalid_image_mode + - image_file_too_large + - unsupported_image_media_type + - empty_image_file + - failed_to_download_image + - image_file_not_found + type: string + x-speakeasy-unknown-values: allow + message: + type: string + required: + - code + - message + type: object + ResponsesRequest: + description: Request schema for Responses endpoint + example: + input: + - content: Hello, how are you? + role: user + type: message + model: anthropic/claude-4.5-sonnet-20250929 + temperature: 0.7 + tools: + - description: Get the current weather in a given location + name: get_current_weather + parameters: + properties: + location: + type: string + type: object + type: function + top_p: 0.9 + properties: + background: + nullable: true + type: boolean + frequency_penalty: + format: double + 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: + nullable: true + type: string + max_output_tokens: + type: integer + max_tool_calls: + type: integer + metadata: + $ref: '#/components/schemas/RequestMetadata' + modalities: + description: Output modalities for the response. Supported values are "text" and "image". + example: + - text + - image + items: + $ref: '#/components/schemas/OutputModalityEnum' + type: array + model: + type: string + models: + items: + type: string + type: array + parallel_tool_calls: + nullable: true + type: boolean + plugins: + description: Plugins you want to enable for this request, including their settings. + items: + discriminator: + mapping: + auto-router: '#/components/schemas/AutoRouterPlugin' + context-compression: '#/components/schemas/ContextCompressionPlugin' + file-parser: '#/components/schemas/FileParserPlugin' + moderation: '#/components/schemas/ModerationPlugin' + response-healing: '#/components/schemas/ResponseHealingPlugin' + web: '#/components/schemas/WebSearchPlugin' + propertyName: id + oneOf: + - $ref: '#/components/schemas/AutoRouterPlugin' + - $ref: '#/components/schemas/ModerationPlugin' + - $ref: '#/components/schemas/WebSearchPlugin' + - $ref: '#/components/schemas/FileParserPlugin' + - $ref: '#/components/schemas/ResponseHealingPlugin' + - $ref: '#/components/schemas/ContextCompressionPlugin' + type: array + presence_penalty: + format: double + 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' + - properties: {} + type: object + description: Function tool definition + example: + description: Get the current weather in a location + name: get_weather + parameters: + properties: + location: + description: The city and state + type: string + unit: + enum: + - celsius + - fahrenheit + type: string + x-speakeasy-unknown-values: allow + required: + - location + type: object + type: function + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' + type: array + top_k: + type: integer + top_logprobs: + type: integer + top_p: + format: double + type: number + trace: + $ref: '#/components/schemas/TraceConfig' + truncation: + $ref: '#/components/schemas/OpenAIResponsesTruncation' + user: + description: >- + A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + maxLength: 256 + type: string + type: object + SearchContextSizeEnum: + description: Size of the search context for web search tools + enum: + - low + - medium + - high + example: medium + type: string + x-speakeasy-unknown-values: allow + SearchQualityLevel: + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + enum: + - low + - medium + - high + example: medium + type: string + x-speakeasy-unknown-values: allow + ServiceTier: + enum: + - auto + - default + - flex + - priority + - scale + - null + example: default + nullable: true + type: string + x-speakeasy-unknown-values: allow + ServiceUnavailableResponse: + description: Service Unavailable - Service temporarily unavailable + example: + error: + code: 503 + message: Service temporarily unavailable + properties: + error: + $ref: '#/components/schemas/ServiceUnavailableResponseErrorData' + user_id: + nullable: true + type: string + required: + - error + type: object + ServiceUnavailableResponseErrorData: + description: Error data for ServiceUnavailableResponse + example: + code: 503 + message: Service temporarily unavailable + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + ShellServerTool: + description: Shell tool configuration + example: + type: shell + properties: + type: + enum: + - shell + type: string + required: + - type + type: object + StoredPromptTemplate: + example: + id: prompt-abc123 + variables: + name: John + nullable: true + properties: + id: + type: string + variables: + additionalProperties: + anyOf: + - type: string + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + nullable: true + type: object + required: + - id + type: object + StreamEvents: + description: Union of all possible event types emitted during response streaming + discriminator: + mapping: + error: '#/components/schemas/ErrorEvent' + response.completed: '#/components/schemas/StreamEventsResponseCompleted' + response.content_part.added: '#/components/schemas/ContentPartAddedEvent' + response.content_part.done: '#/components/schemas/ContentPartDoneEvent' + response.created: '#/components/schemas/OpenResponsesCreatedEvent' + response.failed: '#/components/schemas/StreamEventsResponseFailed' + response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent' + response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent' + response.image_generation_call.completed: '#/components/schemas/ImageGenCallCompletedEvent' + response.image_generation_call.generating: '#/components/schemas/ImageGenCallGeneratingEvent' + response.image_generation_call.in_progress: '#/components/schemas/ImageGenCallInProgressEvent' + response.image_generation_call.partial_image: '#/components/schemas/ImageGenCallPartialImageEvent' + response.in_progress: '#/components/schemas/OpenResponsesInProgressEvent' + response.incomplete: '#/components/schemas/StreamEventsResponseIncomplete' + response.output_item.added: '#/components/schemas/StreamEventsResponseOutputItemAdded' + response.output_item.done: '#/components/schemas/StreamEventsResponseOutputItemDone' + response.output_text.annotation.added: '#/components/schemas/AnnotationAddedEvent' + response.output_text.delta: '#/components/schemas/TextDeltaEvent' + response.output_text.done: '#/components/schemas/TextDoneEvent' + response.reasoning_summary_part.added: '#/components/schemas/ReasoningSummaryPartAddedEvent' + response.reasoning_summary_part.done: '#/components/schemas/ReasoningSummaryPartDoneEvent' + response.reasoning_summary_text.delta: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + response.reasoning_summary_text.done: '#/components/schemas/ReasoningSummaryTextDoneEvent' + response.reasoning_text.delta: '#/components/schemas/ReasoningDeltaEvent' + response.reasoning_text.done: '#/components/schemas/ReasoningDoneEvent' + response.refusal.delta: '#/components/schemas/RefusalDeltaEvent' + response.refusal.done: '#/components/schemas/RefusalDoneEvent' + response.web_search_call.completed: '#/components/schemas/WebSearchCallCompletedEvent' + response.web_search_call.in_progress: '#/components/schemas/WebSearchCallInProgressEvent' + response.web_search_call.searching: '#/components/schemas/WebSearchCallSearchingEvent' + propertyName: type + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: in_progress + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 0 + type: response.created + oneOf: + - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - $ref: '#/components/schemas/OpenResponsesInProgressEvent' + - $ref: '#/components/schemas/StreamEventsResponseCompleted' + - $ref: '#/components/schemas/StreamEventsResponseIncomplete' + - $ref: '#/components/schemas/StreamEventsResponseFailed' + - $ref: '#/components/schemas/ErrorEvent' + - $ref: '#/components/schemas/StreamEventsResponseOutputItemAdded' + - $ref: '#/components/schemas/StreamEventsResponseOutputItemDone' + - $ref: '#/components/schemas/ContentPartAddedEvent' + - $ref: '#/components/schemas/ContentPartDoneEvent' + - $ref: '#/components/schemas/TextDeltaEvent' + - $ref: '#/components/schemas/TextDoneEvent' + - $ref: '#/components/schemas/RefusalDeltaEvent' + - $ref: '#/components/schemas/RefusalDoneEvent' + - $ref: '#/components/schemas/AnnotationAddedEvent' + - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent' + - $ref: '#/components/schemas/FunctionCallArgsDoneEvent' + - $ref: '#/components/schemas/ReasoningDeltaEvent' + - $ref: '#/components/schemas/ReasoningDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/ImageGenCallInProgressEvent' + - $ref: '#/components/schemas/ImageGenCallGeneratingEvent' + - $ref: '#/components/schemas/ImageGenCallPartialImageEvent' + - $ref: '#/components/schemas/ImageGenCallCompletedEvent' + - $ref: '#/components/schemas/WebSearchCallInProgressEvent' + - $ref: '#/components/schemas/WebSearchCallSearchingEvent' + - $ref: '#/components/schemas/WebSearchCallCompletedEvent' + StreamEventsResponseCompleted: + allOf: + - $ref: '#/components/schemas/CompletedEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response has completed successfully + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: completed + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 10 + type: response.completed + StreamEventsResponseFailed: + allOf: + - $ref: '#/components/schemas/FailedEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response has failed + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: failed + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 3 + type: response.failed + StreamEventsResponseIncomplete: + allOf: + - $ref: '#/components/schemas/IncompleteEvent' + - properties: + response: + $ref: '#/components/schemas/OpenResponsesResult' + type: object + description: Event emitted when a response is incomplete + example: + response: + created_at: 1704067200 + error: null + id: resp-abc123 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: null + model: gpt-4 + object: response + output: [] + parallel_tool_calls: true + status: incomplete + temperature: null + tool_choice: auto + tools: [] + top_p: null + sequence_number: 5 + type: response.incomplete + StreamEventsResponseOutputItemAdded: + allOf: + - $ref: '#/components/schemas/OutputItemAddedEvent' + - properties: + item: + $ref: '#/components/schemas/OutputItems' + type: object + description: Event emitted when a new output item is added to the response + example: + item: + content: [] + id: item-1 + role: assistant + status: in_progress + type: message + output_index: 0 + sequence_number: 2 + type: response.output_item.added + StreamEventsResponseOutputItemDone: + allOf: + - $ref: '#/components/schemas/OutputItemDoneEvent' + - properties: + item: + $ref: '#/components/schemas/OutputItems' + type: object + description: Event emitted when an output item is complete + example: + item: + content: + - annotations: [] + text: Hello! How can I help you? + type: output_text + id: item-1 + role: assistant + status: completed + type: message + output_index: 0 + sequence_number: 8 + type: response.output_item.done + StreamLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - properties: + top_logprobs: + items: + $ref: '#/components/schemas/StreamLogprobTopLogprob' + type: array + type: object + description: Log probability information for a token + example: + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 + logprob: -0.5 + token: Hello + top_logprobs: [] + StreamLogprobTopLogprob: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - properties: {} + type: object + description: Alternative token with its log probability + example: + bytes: + - 72 + - 101 + - 108 + - 108 + - 111 + logprob: -0.5 + token: Hello + TextConfig: + description: Text output configuration including format and verbosity + example: + format: + type: text + verbosity: medium + properties: + format: + $ref: '#/components/schemas/Formats' + verbosity: + enum: + - high + - low + - medium + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + type: object + TextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDeltaEvent' + - properties: + logprobs: + items: + $ref: '#/components/schemas/StreamLogprob' + type: array + type: object + description: Event emitted when a text delta is streamed + example: + content_index: 0 + delta: Hello + item_id: item-1 + logprobs: [] + output_index: 0 + sequence_number: 4 + type: response.output_text.delta + TextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDoneEvent' + - properties: + logprobs: + items: + $ref: '#/components/schemas/StreamLogprob' + type: array + type: object + description: Event emitted when text streaming is complete + example: + content_index: 0 + item_id: item-1 + logprobs: [] + output_index: 0 + sequence_number: 6 + text: Hello! How can I help you? + type: response.output_text.done + TextExtendedConfig: + allOf: + - $ref: '#/components/schemas/TextConfig' + - properties: {} + type: object + description: Text output configuration including format and verbosity + example: + format: + type: text + ToolCallStatus: + enum: + - in_progress + - completed + - incomplete + example: completed + type: string + x-speakeasy-unknown-values: allow + ToolChoiceAllowed: + description: Constrains the model to a pre-defined set of allowed tools + example: + mode: auto + tools: + - name: get_weather + type: function + type: allowed_tools + properties: + mode: + anyOf: + - enum: + - auto + type: string + - enum: + - required + type: string + tools: + items: + additionalProperties: + nullable: true + type: object + type: array + type: + enum: + - allowed_tools + type: string + required: + - type + - mode + - tools + type: object + TooManyRequestsResponse: + description: Too Many Requests - Rate limit exceeded + example: + error: + code: 429 + message: Rate limit exceeded + properties: + error: + $ref: '#/components/schemas/TooManyRequestsResponseErrorData' + user_id: + nullable: true + type: string + required: + - error + type: object + TooManyRequestsResponseErrorData: + description: Error data for TooManyRequestsResponse + example: + code: 429 + message: Rate limit exceeded + properties: + code: + type: integer + message: + type: string + metadata: + additionalProperties: + nullable: true + nullable: true + type: object + required: + - code + - message + type: object + TopProviderInfo: + description: Information about the top provider for this model + example: + context_length: 8192 + is_moderated: true + max_completion_tokens: 4096 + properties: + context_length: + description: Context length from the top provider + example: 8192 + type: integer + is_moderated: + description: Whether the top provider moderates content + example: true + type: boolean + max_completion_tokens: + description: Maximum completion tokens from the top provider + example: 4096 + 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_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_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 + exclusiveMinimum: true + minimum: 0 + 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 + 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 + 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 + 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_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 + type: string + 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 + generate_audio: + description: Whether the model supports generating audio alongside video + nullable: true + 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: + enum: + - '16:9' + - '9:16' + - '1:1' + - '4:3' + - '3:4' + - '21:9' + - '9:21' + type: string + x-speakeasy-unknown-values: allow + nullable: true + type: array + supported_durations: + description: Supported video durations in seconds + items: + type: integer + 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 + - supported_resolutions + - supported_aspect_ratios + - supported_sizes + - supported_durations + - 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_resolutions: + - 720p + supported_sizes: null + properties: + data: + items: + $ref: '#/components/schemas/VideoModel' + type: array + required: + - data + type: object + WebSearchCallCompletedEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' + - properties: {} + type: object + description: Web search call completed + example: + 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 + x-speakeasy-unknown-values: allow + WebSearchEngineEnum: + 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. + enum: + - auto + - native + - exa + - firecrawl + - parallel + example: auto + type: string + x-speakeasy-unknown-values: allow + WebSearchPlugin: + example: + enabled: true + id: web + max_results: 5 + properties: + 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: + 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 + 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: + 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_2025_08_26 + type: string + user_location: + $ref: '#/components/schemas/WebSearchUserLocation' + required: + - type + type: object + WebSearchServerTool_OpenRouter: + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + 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: + description: API key as bearer token in Authorization header + scheme: bearer + type: http + 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: + /activity: + get: + 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: + - 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' + 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': + 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: + $ref: '#/components/schemas/ActivityResponse' + description: Returns user activity data grouped by endpoint + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Get user activity grouped by endpoint + tags: + - Analytics + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /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: + 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': + 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: + properties: + data: + $ref: '#/components/schemas/ChatStreamChunk' + required: + - data + type: object + x-speakeasy-sse-sentinel: '[DONE]' + description: Successful chat completion response + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '408': + content: + application/json: + example: + error: + code: 408 + message: Operation timed out. Please try again later. + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: Request Timeout - Operation exceeded time limit + '413': + content: + application/json: + example: + error: + code: 413 + message: Request payload too large + schema: + $ref: '#/components/schemas/PayloadTooLargeResponse' + description: Payload Too Large - Request payload exceeds size limits + '422': + content: + application/json: + example: + error: + code: 422 + message: Invalid argument + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: Unprocessable Entity - Semantic validation failure + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Create a 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: + 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': + content: + application/json: + example: + data: + total_credits: 100.5 + total_usage: 25.75 + schema: + 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': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '403': + content: + application/json: + example: + error: + code: 403 + message: Only management keys can perform this operation + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: Forbidden - Authentication successful but insufficient permissions + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Get 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: + deprecated: true + 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 + responses: + '200': + description: This endpoint is deprecated and will never return a 200 response. + '410': + 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: + description: Submits an embedding request to the embeddings router + operationId: createEmbeddings + requestBody: + content: + application/json: + schema: + 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 + exclusiveMinimum: 0 + minimum: 0 + 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 + - items: + type: string + type: array + - items: + type: number + type: array + - items: + items: + type: number + type: array + type: array + - items: + properties: + content: + items: + oneOf: + - properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + - properties: + image_url: + 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: + description: The model to use for embeddings + example: openai/text-embedding-3-small + type: string + provider: + 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': + content: + application/json: + schema: + description: Embeddings response containing embedding vectors + example: + data: + - 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: + description: A single embedding object + example: + embedding: + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: 0 + object: embedding + properties: + embedding: + anyOf: + - items: + type: number + type: array + - type: string + description: Embedding vector as an array of floats or a base64 string example: - - US - - IE + - 0.0023064255 + - -0.009327292 + - 0.015797347 + index: + description: Index of the embedding in the input list + example: 0 + type: integer + object: + enum: + - embedding + 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 + - 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: + description: Token usage statistics + example: + prompt_tokens: 8 + total_tokens: 8 + properties: + 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: + description: Not used for embeddings - embeddings do not support streaming + type: string + x-speakeasy-sse-sentinel: '[DONE]' + description: Embedding response + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '503': + content: + application/json: + example: + error: + code: 503 + message: Service temporarily unavailable + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: Service Unavailable - Service temporarily unavailable + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Submit 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 + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /endpoints/zdr: + get: + operationId: listEndpointsZdr + responses: + '200': + 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: + 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': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + 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: + operationId: getGeneration + parameters: + - description: The generation ID + in: query + name: id + required: true + schema: + description: The generation ID + example: gen-1234567890 + minLength: 1 + type: string + responses: + '200': + content: + application/json: + example: + data: + 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: + description: Generation response + properties: + data: + description: Generation data + properties: + api_type: + description: Type of API used for the generation + enum: + - completions + - embeddings + - rerank + - video + - null + nullable: true + type: string + x-speakeasy-unknown-values: allow + app_id: + description: ID of the app that made the request + example: 12345 + 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 + nullable: true + type: string + session_id: + description: Session identifier grouping multiple generations in the same session + nullable: true + type: string + streamed: + description: Whether the response was streamed + example: true + nullable: true + type: boolean + tokens_completion: + description: Number of tokens in the completion + example: 25 + 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: + description: User-Agent header from the request + nullable: true + type: string + required: + - id + - upstream_id + - total_cost + - cache_discount + - upstream_inference_cost + - created_at + - model + - app_id + - streamed + - cancelled + - provider_name + - latency + - moderation_latency + - generation_time + - finish_reason + - tokens_prompt + - tokens_completion + - native_tokens_prompt + - native_tokens_completion + - native_tokens_completion_images + - native_tokens_reasoning + - native_tokens_cached + - num_media_prompt + - num_input_audio_prompt + - num_media_completion + - num_search_results + - origin + - usage + - is_byok + - native_finish_reason + - external_user + - api_type + - router + - provider_responses + - user_agent + - http_referer + type: object + required: + - data + type: object + description: Returns the request metadata for this generation + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '404': + content: + application/json: + example: + error: + code: 404 + message: Resource not found + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': + content: + application/json: + example: + error: + code: 502 + message: Provider returned error + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '524': + content: + application/json: + example: + error: + code: 524 + message: Request timed out. Please try again later. + schema: + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': + content: + application/json: + example: + error: + code: 529 + message: Provider returned error + schema: + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Get request & usage metadata for a generation + tags: + - Generations + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /guardrails: + get: + description: >- + List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + operationId: listGuardrails + 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: + - 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_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/ListGuardrailsResponse' + description: List of guardrails + '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 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_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_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_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_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': - 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 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: - operationId: list - 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. + operationId: list parameters: - - schema: - type: string + - 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' - required: false - description: Whether to include disabled API keys in the response - name: include_disabled + type: boolean + x-openrouter-type: boolean + - description: Number of API keys to skip for pagination 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 + required: false + schema: + description: Number of API keys to skip for pagination + example: 0 + minimum: 0 + type: integer responses: '200': - description: List of API keys 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: - type: object + 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: - type: array + description: List of API keys items: - type: object + 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: - hash: + 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 - name: type: string - description: Name of the API key - example: My Production Key + include_byok_in_limit: + description: Whether to include external BYOK usage in the credit limit + example: false + type: boolean 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 + type: string limit: - type: number - nullable: true description: Spending limit for the API key in USD example: 100 - limit_remaining: + format: double type: number - nullable: true + limit_remaining: description: Remaining spending limit in USD example: 74.5 + format: double + type: number 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 + 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: - type: number description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 - usage_daily: + format: double type: number + usage_daily: description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 - usage_weekly: + format: double 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: + format: double 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: + usage_weekly: + description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + example: 25.5 + format: double 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 @@ -16660,232 +16295,292 @@ paths: - 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: List of API keys + - 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 - 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 + type: object + description: List of API keys '401': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials '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 content: application/json: + example: + error: + code: 500 + message: Internal Server Error schema: $ref: '#/components/schemas/InternalServerResponse' - post: - x-speakeasy-name-override: create + description: Internal Server Error - Unexpected server error + summary: List API keys tags: - API Keys - summary: Create a new API key + 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: - type: object + example: + expires_at: '2027-12-31T23:59:59Z' + include_byok_in_limit: true + limit: 50 + limit_reset: monthly + name: My New API Key properties: - name: - type: string + 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 - description: Name for the new API key - example: My New API Key - limit: - type: number 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: - type: string - nullable: true + 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 - 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. + - null example: monthly + nullable: true + type: string x-speakeasy-unknown-values: allow - include_byok_in_limit: - type: boolean - description: Whether to include BYOK usage in the limit - example: true - expires_at: + name: + description: Name for the new API key + example: My New API Key + minLength: 1 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' + type: object required: true responses: '201': - description: API key created successfully 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: - type: object + 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: - type: object + 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: - hash: + 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 - name: type: string - description: Name of the API key - example: My Production Key + include_byok_in_limit: + description: Whether to include external BYOK usage in the credit limit + example: false + type: boolean 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 + type: string limit: - type: number - nullable: true description: Spending limit for the API key in USD example: 100 - limit_remaining: + format: double type: number - nullable: true + limit_remaining: description: Remaining spending limit in USD example: 74.5 + format: double + type: number 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: + nullable: true type: string - description: ISO 8601 timestamp of when the API key was created - example: '2025-08-24T10:30:00Z' - updated_at: + name: + description: Name of the API key + example: My Production Key type: string - nullable: true + updated_at: 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 + 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 @@ -16906,243 +16601,322 @@ paths: - 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 + type: object key: - type: string description: The actual API key string (only shown once) example: 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 + type: string 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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 + type: object + description: API key created successfully '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 '401': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials '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 content: application/json: + example: + error: + code: 500 + message: Internal Server Error schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: createKeys + 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}: - patch: - x-speakeasy-name-override: update + 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 - summary: Update an API key - description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + 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: - - 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 + - description: The hash identifier of the API key to retrieve 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 + name: hash + required: true + schema: + description: The hash identifier of the API key to retrieve + example: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 + type: string responses: '200': - description: API key updated successfully 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: - type: object + 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: - type: object + 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: - hash: + 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 - name: type: string - description: Name of the API key - example: My Production Key + include_byok_in_limit: + description: Whether to include external BYOK usage in the credit limit + example: false + type: boolean 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 + type: string limit: - type: number - nullable: true description: Spending limit for the API key in USD example: 100 - limit_remaining: + format: double type: number - nullable: true + limit_remaining: description: Remaining spending limit in USD example: 74.5 + format: double + type: number 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 + 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: - type: number description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 - usage_daily: + format: double type: number + usage_daily: description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 - usage_weekly: + format: double 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: + format: double type: number - description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) - example: 17.38 - byok_usage_monthly: + usage_weekly: + description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + example: 25.5 + format: double 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 @@ -17163,255 +16937,285 @@ paths: - 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 + type: object 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 + description: API key details '401': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials '404': - description: Not Found - API key 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 content: application/json: + example: + error: + code: 500 + message: Internal Server Error schema: $ref: '#/components/schemas/InternalServerResponse' - operationId: deleteKeys - get: - operationId: getKey - x-speakeasy-name-override: get + description: Internal Server Error - Unexpected server error + summary: Get a single API key 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. + 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: - - 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 + - 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': - description: API key details 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: - type: object + 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: - type: object + 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: - hash: + 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 - name: type: string - description: Name of the API key - example: My Production Key + include_byok_in_limit: + description: Whether to include external BYOK usage in the credit limit + example: false + type: boolean 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 + type: string limit: - type: number - nullable: true description: Spending limit for the API key in USD example: 100 - limit_remaining: + format: double type: number - nullable: true + limit_remaining: description: Remaining spending limit in USD example: 74.5 + format: double + type: number 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 + 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: - type: number description: Total OpenRouter credit usage (in USD) for the API key example: 25.5 - usage_daily: + format: double type: number + usage_daily: description: OpenRouter credit usage (in USD) for the current UTC day example: 25.5 - usage_weekly: + format: double 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: + format: double type: number - description: External BYOK usage (in USD) for the current UTC week (Monday-Sunday) - example: 17.38 - byok_usage_monthly: + usage_weekly: + description: OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + example: 25.5 + format: double 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 @@ -17425,2138 +17229,2162 @@ paths: - 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 + - 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': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials '404': - description: Not Found - API key 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 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" - /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 - 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: List of guardrails - total_count: - type: number - description: Total number of guardrails - example: 25 - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - '500': - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerResponse' + /messages: 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. + 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: - 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 + $ref: '#/components/schemas/MessagesRequest' required: true responses: - '201': - description: Guardrail created successfully + '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: - 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 + $ref: '#/components/schemas/MessagesStreamEvents' + event: + type: string + required: + - event + - data + type: object + x-speakeasy-sse-sentinel: '[DONE]' + description: Successful response '400': - description: Bad Request - Invalid request parameters content: application/json: + example: + error: + message: 'Invalid request: messages is required' + type: invalid_request_error + type: error schema: - $ref: '#/components/schemas/BadRequestResponse' + $ref: '#/components/schemas/MessagesErrorResponse' + description: Invalid request error '401': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + message: Invalid API key + type: authentication_error + type: error schema: - $ref: '#/components/schemas/UnauthorizedResponse' + $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': - description: Internal Server Error 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/InternalServerResponse' + $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" - /guardrails/{id}: + /models: 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. + operationId: getModels parameters: - - schema: + - description: Filter models by use case category + in: query + name: category + required: false + schema: + description: Filter models by use case category + enum: + - programming + - roleplay + - marketing + - marketing/seo + - technology + - science + - translation + - legal + - finance + - health + - trivia + - academia + example: programming + type: string + x-speakeasy-unknown-values: allow + - description: Filter models by supported parameter (comma-separated) + in: query + name: supported_parameters + 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 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: + 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/UnauthorizedResponse' - '404': - description: Not Found - Guardrail does not exist + $ref: '#/components/schemas/ModelsListResponse' + description: Returns a list of models or RSS feed + '400': content: application/json: + example: + error: + code: 400 + message: Invalid request parameters schema: - $ref: '#/components/schemas/NotFoundResponse' + $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' - patch: - operationId: updateGuardrail - x-speakeasy-name-override: update + description: Internal Server Error - Unexpected server error + summary: List all models and their properties tags: - - Guardrails - summary: Update a guardrail - description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + - Models + x-speakeasy-name-override: list + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /models/{author}/{slug}/endpoints: + get: + operationId: listEndpoints 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 + - description: The author/organization of the model 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 + name: author + required: true + 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: Guardrail updated successfully 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: - 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 + $ref: '#/components/schemas/ListEndpointsResponse' 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 + type: object + description: Returns a list of endpoints + '404': content: application/json: + example: + error: + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/BadRequestResponse' - '401': - description: Unauthorized - Missing or invalid authentication + $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/UnauthorizedResponse' - '404': - description: Not Found - Guardrail does not exist + $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" + /models/count: + get: + 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': content: application/json: + example: + data: + count: 150 schema: - $ref: '#/components/schemas/NotFoundResponse' + $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': - description: Internal Server Error content: application/json: + example: + error: + code: 500 + message: Internal Server Error schema: $ref: '#/components/schemas/InternalServerResponse' - delete: - operationId: deleteGuardrail - x-speakeasy-name-override: delete + description: Internal Server Error - Unexpected server error + summary: Get total count of available models 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 + - 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': - description: Guardrail deleted successfully 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: - type: object - properties: - deleted: - type: boolean - const: true - description: Confirmation that the guardrail was deleted - example: true - required: - - deleted - example: - deleted: true + $ref: '#/components/schemas/ModelsListResponse' + description: Returns a list of models filtered by user provider preferences '401': - description: Unauthorized - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials '404': - description: Not Found - Guardrail 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 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" - /guardrails/assignments/keys: + /organization/members: 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. + 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: - - 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 + - description: Number of records to skip for pagination in: query - - schema: - type: string - description: Maximum number of records to return (max 100) - example: '50' + name: offset required: false - description: Maximum number of records to return (max 100) - name: limit + 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: List of key assignments 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: - type: object properties: data: - type: array + description: List of organization members 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: + email: + description: Email address of the member + example: jane.doe@example.com 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: + first_name: + description: First name of the member + example: Jane + nullable: true type: string - description: Label of the API key - example: prod-key - assigned_by: + 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 - 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' + 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 - - key_hash - - guardrail_id - - key_name - - key_label - - assigned_by - - created_at - description: List of key assignments + - first_name + - last_name + - email + - role + type: object + type: array total_count: - type: number - description: Total number of key assignments for this guardrail + description: Total number of members in the organization example: 25 + type: integer required: - data - total_count + type: object + description: List of organization members '401': - description: Unauthorized - Missing or invalid authentication 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': - description: Internal 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" - /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 + 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: + operationId: listProviders responses: '200': - description: List of member assignments 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 + example: + 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: - 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 + datacenters: + description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations + example: + - US + - IE + items: + 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 + type: string + x-speakeasy-unknown-values: allow + 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 - 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: + 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 - 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: + slug: + description: URL-friendly identifier for the provider + example: openai type: string - format: uuid - description: ID of the guardrail - example: 550e8400-e29b-41d4-a716-446655440001 - assigned_by: + 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 - 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: + - name + - slug + - privacy_policy_url + type: object + type: array 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' + type: object + description: Returns a list of providers '500': - description: Internal Server Error content: application/json: + example: + error: + code: 500 + message: Internal Server Error schema: $ref: '#/components/schemas/InternalServerResponse' - post: - operationId: bulkAssignMembersToGuardrail - x-speakeasy-name-override: bulkAssignMembers + description: Internal Server Error - Unexpected server error + summary: List all providers 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 + - Providers + x-speakeasy-name-override: list + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /rerank: + post: + description: Submits a rerank request to the rerank router + operationId: createRerank requestBody: content: application/json: schema: - type: object + 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: - member_user_ids: - type: array + documents: + description: The list of documents to rerank + example: + - Paris is the capital of France. + - Berlin is the capital of Germany. items: type: string - minLength: 1 - minItems: 1 - description: Array of member user IDs to assign to the guardrail - example: - - user_abc123 - - user_def456 + 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 + exclusiveMinimum: 0 + minimum: 0 + type: integer required: - - member_user_ids + - model + - query + - documents + type: object required: true responses: '200': - description: Assignment result 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: - assigned_count: - type: number - description: Number of members successfully assigned - example: 2 + id: + description: Unique identifier for the rerank response (ORID format) + example: gen-rerank-1234567890-abc + type: string + model: + description: The model used for reranking + example: cohere/rerank-v3.5 + type: string + provider: + description: The provider that served the rerank request + example: Cohere + type: string + results: + description: List of rerank results sorted by relevance + example: + - document: + text: Paris is the capital of France. + index: 0 + relevance_score: 0.98 + items: + description: A single rerank result + example: + document: + text: Paris is the capital of France. + index: 0 + relevance_score: 0.98 + properties: + document: + description: The document object containing the original text + properties: + text: + description: The document text + example: Paris is the capital of France. + type: string + required: + - text + type: object + index: + description: Index of the document in the original input list + example: 0 + type: integer + relevance_score: + description: Relevance score of the document to the query + example: 0.98 + format: double + type: number + required: + - index + - relevance_score + - document + type: object + type: array + usage: + description: Usage statistics + example: + search_units: 1 + total_tokens: 150 + properties: + cost: + description: Cost of the request in credits + example: 0.001 + format: double + type: number + search_units: + description: Number of search units consumed (Cohere billing) + example: 1 + type: integer + total_tokens: + description: Total number of tokens used + example: 150 + type: integer + type: object required: - - assigned_count + - 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': - description: Bad Request - Invalid 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 - Missing or invalid authentication 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': - description: Guardrail 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': + 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 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" - /guardrails/{id}/assignments/keys/remove: + /responses: 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 + 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: - 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 + $ref: '#/components/schemas/ResponsesRequest' required: true responses: '200': - description: Unassignment result 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: - unassigned_count: - type: number - description: Number of keys successfully unassigned - example: 3 + data: + $ref: '#/components/schemas/StreamEvents' required: - - unassigned_count + - data + type: object + x-speakeasy-sse-sentinel: '[DONE]' + description: Successful response '400': - description: Bad Request - Invalid 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 - Missing or invalid authentication 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': - description: Guardrail 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 + '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': - description: Internal 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/InternalServerResponse' + $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" - /guardrails/{id}/assignments/members/remove: + /videos: 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 + 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: - 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 + $ref: '#/components/schemas/VideoGenerationRequest' required: true responses: - '200': - description: Unassignment result + '202': content: application/json: + example: + generation_id: gen-xyz789 + id: job-abc123 + polling_url: /api/v1/videos/job-abc123 + status: pending schema: - type: object - properties: - unassigned_count: - type: number - description: Number of members successfully unassigned - example: 2 - required: - - unassigned_count + $ref: '#/components/schemas/VideoGenerationResponse' + description: Video generation request accepted '400': - description: Bad Request - Invalid 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 - Missing or invalid authentication content: application/json: + example: + error: + code: 401 + message: Missing Authentication header schema: $ref: '#/components/schemas/UnauthorizedResponse' - '404': - description: Guardrail not found - content: - application/json: - schema: - $ref: '#/components/schemas/NotFoundResponse' - '500': - description: Internal Server Error + 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/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 + $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: - 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 + $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/UnauthorizedResponse' + $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 + 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" - /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 + /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': - description: Successfully exchanged code for an API key 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: - 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 + $ref: '#/components/schemas/VideoGenerationResponse' + description: Video generation status + '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 + '404': content: application/json: + example: + error: + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/ForbiddenResponse' + $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: 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" - /auth/keys/code: - 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 - requestBody: - content: - application/json: - 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 - required: true + /videos/{jobId}/content: + get: + description: Streams the generated video content from the upstream provider + operationId: listVideosContent + parameters: + - in: path + name: jobId + required: true + schema: + example: job-abc123 + minLength: 1 + type: string + - in: query + name: index + required: false + schema: + default: 0 + example: 0 + minimum: 0 + nullable: true + type: integer responses: '200': - description: Successfully created authorization code content: - application/json: + application/octet-stream: + example: 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' - required: - - data + format: binary + type: string + description: Video content stream '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 + '404': content: application/json: + example: + error: + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/ConflictResponse' + $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_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' - operationId: createAuthKeysCode + 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 c6780f09..8971c40f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.761.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:87266665422e9d6e5e28cda694187c2ce383c3a43c4f808668a7b17b4e129a22 - sourceBlobDigest: sha256:79bd9c141c4e9a9838681324981fdfe076c21753cedee1f948707687ae45f1bd + sourceRevisionDigest: sha256:3af53a46d19759cbc5722cec3a918044aea7e61e4aea1f88473866ef7400e853 + sourceBlobDigest: sha256:65867749e932dfcd62598e1bb3cfaf360f668104caa359ef346c830f0dd00e82 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:87266665422e9d6e5e28cda694187c2ce383c3a43c4f808668a7b17b4e129a22 - sourceBlobDigest: sha256:79bd9c141c4e9a9838681324981fdfe076c21753cedee1f948707687ae45f1bd + sourceRevisionDigest: sha256:3af53a46d19759cbc5722cec3a918044aea7e61e4aea1f88473866ef7400e853 + sourceBlobDigest: sha256:65867749e932dfcd62598e1bb3cfaf360f668104caa359ef346c830f0dd00e82 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:9a832d36ae2ccf77b0f32fc8f6b84e621e9664d18dbedcfb148b061ceafd38f9 + codeSamplesRevisionDigest: sha256:089d13712d858cf28e4449a06b8f767df659c19cc8ed2d3ad0405f6686d0c1c4 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.0 @@ -26,6 +26,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/FUNCTIONS.md b/FUNCTIONS.md index 567e560b..223ef378 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -20,7 +20,7 @@ specific category of applications. ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { betaResponsesSend } from "@openrouter/sdk/funcs/betaResponsesSend.js"; +import { analyticsGetUserActivity } from "@openrouter/sdk/funcs/analyticsGetUserActivity.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -32,14 +32,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await betaResponsesSend(openRouter, { - responsesRequest: {}, - }); + const res = await analyticsGetUserActivity(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("betaResponsesSend failed:", res.error); + console.log("analyticsGetUserActivity failed:", res.error); } } diff --git a/README.md b/README.md index 3b757808..940c839c 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,41 @@ for await (const chunk of result) { + +## 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 also be an +async iterable that can be consumed using the [`for await...of`][for-await-of] +syntax. + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of + +Here's an example of one such pagination call: + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.guardrails.list(); + + for await (const page of result) { + console.log(page); + } +} + +run(); + +``` + + ## Debugging diff --git a/RELEASES.md b/RELEASES.md index 66c880f4..0053c828 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -146,4 +146,14 @@ Based on: ### Generated - [typescript v0.1.2] . ### Releases -- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - . \ No newline at end of file +- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - . + +## 2026-04-12 00:44:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.0 (2.879.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.12.0] . +### Releases +- [NPM v0.12.0] https://www.npmjs.com/package/@openrouter/sdk/v/0.12.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 69c81d0d..18a134fb 100644 --- a/USAGE.md +++ b/USAGE.md @@ -10,9 +10,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.beta.responses.send({ - responsesRequest: {}, - }); + const result = await openRouter.analytics.getUserActivity(); console.log(result); } diff --git a/docs/models/activityitem.md b/docs/models/activityitem.md index 761ca947..1c67ea44 100644 --- a/docs/models/activityitem.md +++ b/docs/models/activityitem.md @@ -6,17 +6,17 @@ import { ActivityItem } from "@openrouter/sdk/models"; let value: ActivityItem = { + byokUsageInference: 0.012, + completionTokens: 125, date: "2025-08-24", + endpointId: "550e8400-e29b-41d4-a716-446655440000", model: "openai/gpt-4.1", modelPermaslug: "openai/gpt-4.1-2025-04-14", - endpointId: "550e8400-e29b-41d4-a716-446655440000", - providerName: "OpenAI", - usage: 0.015, - byokUsageInference: 0.012, - requests: 5, promptTokens: 50, - completionTokens: 125, + providerName: "OpenAI", reasoningTokens: 25, + requests: 5, + usage: 0.015, }; ``` @@ -24,14 +24,14 @@ let value: ActivityItem = { | Field | Type | Required | Description | Example | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `byokUsageInference` | *number* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 | +| `completionTokens` | *number* | :heavy_check_mark: | Total completion tokens generated | 125 | | `date` | *string* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 | +| `endpointId` | *string* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 | | `model` | *string* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 | | `modelPermaslug` | *string* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 | -| `endpointId` | *string* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 | +| `promptTokens` | *number* | :heavy_check_mark: | Total prompt tokens used | 50 | | `providerName` | *string* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI | -| `usage` | *number* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 | -| `byokUsageInference` | *number* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 | +| `reasoningTokens` | *number* | :heavy_check_mark: | Total reasoning tokens used | 25 | | `requests` | *number* | :heavy_check_mark: | Number of requests made | 5 | -| `promptTokens` | *number* | :heavy_check_mark: | Total prompt tokens used | 50 | -| `completionTokens` | *number* | :heavy_check_mark: | Total completion tokens generated | 125 | -| `reasoningTokens` | *number* | :heavy_check_mark: | Total reasoning tokens used | 25 | \ No newline at end of file +| `usage` | *number* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 | \ No newline at end of file diff --git a/docs/models/architecture.md b/docs/models/architecture.md index a79153a0..7b6e489f 100644 --- a/docs/models/architecture.md +++ b/docs/models/architecture.md @@ -8,15 +8,15 @@ Model architecture information import { Architecture } from "@openrouter/sdk/models"; let value: Architecture = { - tokenizer: "GPT", - instructType: "chatml", - modality: "text", inputModalities: [ "text", ], + instructType: "chatml", + modality: "text", outputModalities: [ "text", ], + tokenizer: "GPT", }; ``` @@ -24,8 +24,8 @@ let value: Architecture = { | Field | Type | Required | Description | Example | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `tokenizer` | [models.Tokenizer](../models/tokenizer.md) | :heavy_check_mark: | N/A | GPT | -| `instructType` | [models.InstructType](../models/instructtype.md) | :heavy_check_mark: | Instruction format type | | -| `modality` | *string* | :heavy_check_mark: | Primary modality of the model | text | | `inputModalities` | [models.InputModality](../models/inputmodality.md)[] | :heavy_check_mark: | Supported input modalities | | -| `outputModalities` | [models.OutputModality](../models/outputmodality.md)[] | :heavy_check_mark: | Supported output modalities | | \ No newline at end of file +| `instructType` | [models.InstructType](../models/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml | +| `modality` | *string* | :heavy_check_mark: | Primary modality of the model | text | +| `outputModalities` | [models.OutputModality](../models/outputmodality.md)[] | :heavy_check_mark: | Supported output modalities | | +| `tokenizer` | [models.Tokenizer](../models/tokenizer.md) | :heavy_check_mark: | N/A | GPT | \ No newline at end of file diff --git a/docs/models/chainid.md b/docs/models/chainid.md deleted file mode 100644 index f6f7a85f..00000000 --- a/docs/models/chainid.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChainId - -## Example Usage - -```typescript -import { ChainId } from "@openrouter/sdk/models"; - -let value: ChainId = 137; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -1 | 137 | 8453 | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/completiontokensdetails.md b/docs/models/completiontokensdetails.md index f5a794e0..2ec86eb2 100644 --- a/docs/models/completiontokensdetails.md +++ b/docs/models/completiontokensdetails.md @@ -14,7 +14,7 @@ let value: CompletionTokensDetails = {}; | Field | Type | Required | Description | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `reasoningTokens` | *number* | :heavy_minus_sign: | Tokens used for reasoning | -| `audioTokens` | *number* | :heavy_minus_sign: | Tokens used for audio output | | `acceptedPredictionTokens` | *number* | :heavy_minus_sign: | Accepted prediction tokens | +| `audioTokens` | *number* | :heavy_minus_sign: | Tokens used for audio output | +| `reasoningTokens` | *number* | :heavy_minus_sign: | Tokens used for reasoning | | `rejectedPredictionTokens` | *number* | :heavy_minus_sign: | Rejected prediction tokens | \ No newline at end of file diff --git a/docs/models/createchargerequest.md b/docs/models/createchargerequest.md deleted file mode 100644 index 096fdbbc..00000000 --- a/docs/models/createchargerequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateChargeRequest - -Create a Coinbase charge for crypto payment - -## Example Usage - -```typescript -import { CreateChargeRequest } from "@openrouter/sdk/models"; - -let value: CreateChargeRequest = { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `amount` | *number* | :heavy_check_mark: | N/A | -| `sender` | *string* | :heavy_check_mark: | N/A | -| `chainId` | [models.ChainId](../models/chainid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/defaultparameters.md b/docs/models/defaultparameters.md index 2f1254ed..145314b4 100644 --- a/docs/models/defaultparameters.md +++ b/docs/models/defaultparameters.md @@ -14,9 +14,9 @@ let value: DefaultParameters = {}; | Field | Type | Required | Description | | ------------------- | ------------------- | ------------------- | ------------------- | -| `temperature` | *number* | :heavy_minus_sign: | N/A | -| `topP` | *number* | :heavy_minus_sign: | N/A | -| `topK` | *number* | :heavy_minus_sign: | N/A | | `frequencyPenalty` | *number* | :heavy_minus_sign: | N/A | | `presencePenalty` | *number* | :heavy_minus_sign: | N/A | -| `repetitionPenalty` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `repetitionPenalty` | *number* | :heavy_minus_sign: | N/A | +| `temperature` | *number* | :heavy_minus_sign: | N/A | +| `topK` | *number* | :heavy_minus_sign: | N/A | +| `topP` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errort.md b/docs/models/errort.md index 60ef38cc..45064a57 100644 --- a/docs/models/errort.md +++ b/docs/models/errort.md @@ -8,8 +8,8 @@ Error information import { ErrorT } from "@openrouter/sdk/models"; let value: ErrorT = { - message: "Rate limit exceeded", code: 429, + message: "Rate limit exceeded", }; ``` @@ -17,5 +17,5 @@ let value: ErrorT = { | Field | Type | Required | Description | Example | | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `message` | *string* | :heavy_check_mark: | Error message | Rate limit exceeded | -| `code` | *number* | :heavy_check_mark: | Error code | 429 | \ No newline at end of file +| `code` | *number* | :heavy_check_mark: | Error code | 429 | +| `message` | *string* | :heavy_check_mark: | Error message | Rate limit exceeded | \ No newline at end of file diff --git a/docs/models/filecitation.md b/docs/models/filecitation.md index adfa205a..a2768b94 100644 --- a/docs/models/filecitation.md +++ b/docs/models/filecitation.md @@ -6,10 +6,10 @@ import { FileCitation } from "@openrouter/sdk/models"; let value: FileCitation = { - type: "file_citation", fileId: "file-abc123", filename: "research_paper.pdf", index: 0, + type: "file_citation", }; ``` @@ -17,7 +17,7 @@ let value: FileCitation = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *"file_citation"* | :heavy_check_mark: | N/A | | `fileId` | *string* | :heavy_check_mark: | N/A | | `filename` | *string* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `index` | *number* | :heavy_check_mark: | N/A | +| `type` | *"file_citation"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filepath.md b/docs/models/filepath.md index 1401b28f..000b91cf 100644 --- a/docs/models/filepath.md +++ b/docs/models/filepath.md @@ -6,9 +6,9 @@ import { FilePath } from "@openrouter/sdk/models"; let value: FilePath = { - type: "file_path", - fileId: "file-xyz789", + fileId: "file-abc123", index: 0, + type: "file_path", }; ``` @@ -16,6 +16,6 @@ let value: FilePath = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *"file_path"* | :heavy_check_mark: | N/A | | `fileId` | *string* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `index` | *number* | :heavy_check_mark: | N/A | +| `type` | *"file_path"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/inputtokensdetails.md b/docs/models/inputtokensdetails.md index 613d3c8c..5887fac2 100644 --- a/docs/models/inputtokensdetails.md +++ b/docs/models/inputtokensdetails.md @@ -6,7 +6,7 @@ import { InputTokensDetails } from "@openrouter/sdk/models"; let value: InputTokensDetails = { - cachedTokens: 229.09, + cachedTokens: 22909, }; ``` diff --git a/docs/models/instructtype.md b/docs/models/instructtype.md index 4a40bcdf..d11ac515 100644 --- a/docs/models/instructtype.md +++ b/docs/models/instructtype.md @@ -7,7 +7,7 @@ Instruction format type ```typescript import { InstructType } from "@openrouter/sdk/models"; -let value: InstructType = "claude"; +let value: InstructType = "chatml"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/models/listendpointsresponse.md b/docs/models/listendpointsresponse.md index 1dad57e0..c4154d69 100644 --- a/docs/models/listendpointsresponse.md +++ b/docs/models/listendpointsresponse.md @@ -8,37 +8,40 @@ List of available endpoints for a model import { ListEndpointsResponse } from "@openrouter/sdk/models"; let value: ListEndpointsResponse = { - 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", - instructType: "chatml", - modality: "text->text", inputModalities: [ "text", ], + instructType: "chatml", + modality: "text->text", outputModalities: [ "text", ], + tokenizer: "GPT", }, + created: 1692901234, + description: + "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", endpoints: [ { - name: "OpenAI: GPT-4", + contextLength: 8192, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + maxCompletionTokens: 4096, + maxPromptTokens: 8192, modelId: "openai/gpt-4", modelName: "GPT-4", - contextLength: 8192, + name: "OpenAI: GPT-4", pricing: { - prompt: "0.00003", completion: "0.00006", + prompt: "0.00003", }, providerName: "OpenAI", - tag: "openai", quantization: "fp16", - maxCompletionTokens: 4096, - maxPromptTokens: 8192, supportedParameters: [ "temperature", "top_p", @@ -46,22 +49,21 @@ let value: ListEndpointsResponse = { "frequency_penalty", "presence_penalty", ], - uptimeLast30m: 99.5, supportsImplicitCaching: true, - latencyLast30m: { - p50: 0.25, - p75: 0.35, - p90: 0.48, - p99: 0.85, - }, + tag: "openai", throughputLast30m: { p50: 45.2, p75: 38.5, p90: 28.3, p99: 15.1, }, + uptimeLast1d: 99.8, + uptimeLast30m: 99.5, + uptimeLast5m: 100, }, ], + id: "openai/gpt-4", + name: "GPT-4", }; ``` @@ -69,9 +71,9 @@ let value: ListEndpointsResponse = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | -| `name` | *string* | :heavy_check_mark: | Display name of the model | GPT-4 | +| `architecture` | [models.Architecture](../models/architecture.md) | :heavy_check_mark: | N/A | {
"instruct_type": "chatml",
"modality": "text",
"tokenizer": "GPT"
} | | `created` | *number* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 | | `description` | *string* | :heavy_check_mark: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. | -| `architecture` | [models.Architecture](../models/architecture.md) | :heavy_check_mark: | N/A | {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text"
} | -| `endpoints` | [models.PublicEndpoint](../models/publicendpoint.md)[] | :heavy_check_mark: | List of available endpoints for this model | | \ No newline at end of file +| `endpoints` | [models.PublicEndpoint](../models/publicendpoint.md)[] | :heavy_check_mark: | List of available endpoints for this model | | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | +| `name` | *string* | :heavy_check_mark: | Display name of the model | GPT-4 | \ No newline at end of file diff --git a/docs/models/model.md b/docs/models/model.md index e493176e..4d2da1d1 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -8,34 +8,37 @@ Information about an AI model available on OpenRouter import { Model } from "@openrouter/sdk/models"; let value: Model = { - id: "openai/gpt-4", - canonicalSlug: "openai/gpt-4", - name: "GPT-4", - created: 1692901234, - pricing: { - prompt: "0.00003", - completion: "0.00006", - }, - contextLength: 8192, architecture: { - modality: "text->text", inputModalities: [ "text", ], + modality: "text->text", outputModalities: [ "text", ], }, - topProvider: { - isModerated: true, + canonicalSlug: "openai/gpt-4", + contextLength: 8192, + created: 1692901234, + defaultParameters: null, + id: "openai/gpt-4", + links: { + details: "/api/v1/models/openai/gpt-5.4/endpoints", }, + name: "GPT-4", perRequestLimits: null, + pricing: { + completion: "0.00006", + prompt: "0.00003", + }, supportedParameters: [ "temperature", "top_p", "max_tokens", ], - defaultParameters: null, + topProvider: { + isModerated: true, + }, }; ``` @@ -43,18 +46,19 @@ let value: Model = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | +| `architecture` | [models.ModelArchitecture](../models/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
} | | `canonicalSlug` | *string* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 | -| `huggingFaceId` | *string* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | -| `name` | *string* | :heavy_check_mark: | Display name of the model | GPT-4 | +| `contextLength` | *number* | :heavy_check_mark: | Maximum context length in tokens | 8192 | | `created` | *number* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 | +| `defaultParameters` | [models.DefaultParameters](../models/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` | *string* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. | -| `pricing` | [models.PublicPricing](../models/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
} | -| `contextLength` | *number* | :heavy_check_mark: | Maximum context length in tokens | 8192 | -| `architecture` | [models.ModelArchitecture](../models/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
} | -| `topProvider` | [models.TopProviderInfo](../models/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
} | -| `perRequestLimits` | [models.PerRequestLimits](../models/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"prompt_tokens": 1000,
"completion_tokens": 1000
} | -| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | List of supported parameters for this model | | -| `defaultParameters` | [models.DefaultParameters](../models/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
} | +| `expirationDate` | *string* | :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 | +| `huggingFaceId` | *string* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | | `knowledgeCutoff` | *string* | :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 | -| `expirationDate` | *string* | :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` | [models.ModelLinks](../models/modellinks.md) | :heavy_check_mark: | Related API endpoints and resources for this model. | {
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | +| `name` | *string* | :heavy_check_mark: | Display name of the model | GPT-4 | +| `perRequestLimits` | [models.PerRequestLimits](../models/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"completion_tokens": 1000,
"prompt_tokens": 1000
} | +| `pricing` | [models.PublicPricing](../models/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
} | +| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | List of supported parameters for this model | | +| `topProvider` | [models.TopProviderInfo](../models/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/models/modelarchitecture.md b/docs/models/modelarchitecture.md index d30a0bb3..9b310ad2 100644 --- a/docs/models/modelarchitecture.md +++ b/docs/models/modelarchitecture.md @@ -8,10 +8,10 @@ Model architecture information import { ModelArchitecture } from "@openrouter/sdk/models"; let value: ModelArchitecture = { - modality: "text->text", inputModalities: [ "text", ], + modality: "text->text", outputModalities: [ "text", ], @@ -22,8 +22,8 @@ let value: ModelArchitecture = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `tokenizer` | [models.ModelGroup](../models/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT | +| `inputModalities` | [models.InputModality](../models/inputmodality.md)[] | :heavy_check_mark: | Supported input modalities | | | `instructType` | [models.ModelArchitectureInstructType](../models/modelarchitectureinstructtype.md) | :heavy_minus_sign: | Instruction format type | chatml | | `modality` | *string* | :heavy_check_mark: | Primary modality of the model | text->text | -| `inputModalities` | [models.InputModality](../models/inputmodality.md)[] | :heavy_check_mark: | Supported input modalities | | -| `outputModalities` | [models.OutputModality](../models/outputmodality.md)[] | :heavy_check_mark: | Supported output modalities | | \ No newline at end of file +| `outputModalities` | [models.OutputModality](../models/outputmodality.md)[] | :heavy_check_mark: | Supported output modalities | | +| `tokenizer` | [models.ModelGroup](../models/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT | \ No newline at end of file diff --git a/docs/models/modelgroup.md b/docs/models/modelgroup.md index a2c121bb..008f0705 100644 --- a/docs/models/modelgroup.md +++ b/docs/models/modelgroup.md @@ -15,5 +15,5 @@ let value: ModelGroup = "GPT"; ## Values ```typescript -"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized +"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Gemma" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/modelslistresponse.md b/docs/models/modelslistresponse.md index 30173e62..940006ff 100644 --- a/docs/models/modelslistresponse.md +++ b/docs/models/modelslistresponse.md @@ -10,28 +10,29 @@ import { ModelsListResponse } from "@openrouter/sdk/models"; let value: ModelsListResponse = { data: [ { - id: "openai/gpt-4", - canonicalSlug: "openai/gpt-4", - name: "GPT-4", - created: 1692901234, - pricing: { - prompt: "0.00003", - completion: "0.00006", - }, - contextLength: 8192, architecture: { - modality: "text->text", inputModalities: [ "text", ], + modality: "text->text", outputModalities: [ "text", ], }, - topProvider: { - isModerated: true, + canonicalSlug: "openai/gpt-4", + contextLength: 8192, + created: 1692901234, + defaultParameters: null, + id: "openai/gpt-4", + links: { + details: "/api/v1/models/openai/gpt-5.4/endpoints", }, + name: "GPT-4", perRequestLimits: null, + pricing: { + completion: "0.00006", + prompt: "0.00003", + }, supportedParameters: [ "temperature", "top_p", @@ -39,7 +40,9 @@ let value: ModelsListResponse = { "frequency_penalty", "presence_penalty", ], - defaultParameters: null, + topProvider: { + isModerated: true, + }, }, ], }; @@ -47,6 +50,6 @@ let value: ModelsListResponse = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `data` | [models.Model](../models/model.md)[] | :heavy_check_mark: | List of available models | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.Model](../models/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/models/openairesponsesannotation.md b/docs/models/openairesponsesannotation.md index f4b8b964..dc986fb3 100644 --- a/docs/models/openairesponsesannotation.md +++ b/docs/models/openairesponsesannotation.md @@ -7,10 +7,10 @@ ```typescript const value: models.FileCitation = { - type: "file_citation", fileId: "file-abc123", filename: "research_paper.pdf", index: 0, + type: "file_citation", }; ``` @@ -18,11 +18,11 @@ const value: models.FileCitation = { ```typescript const value: models.URLCitation = { + endIndex: 582752, + startIndex: 114325, + title: "", type: "url_citation", - url: "https://openrouter.ai/docs", - title: "OpenRouter Documentation", - startIndex: 0, - endIndex: 42, + url: "https://dim-jet.biz/", }; ``` @@ -30,9 +30,9 @@ const value: models.URLCitation = { ```typescript const value: models.FilePath = { - type: "file_path", - fileId: "file-xyz789", + fileId: "file-abc123", index: 0, + type: "file_path", }; ``` diff --git a/docs/models/openairesponsesrefusalcontent.md b/docs/models/openairesponsesrefusalcontent.md index 6e2def30..0a736ef8 100644 --- a/docs/models/openairesponsesrefusalcontent.md +++ b/docs/models/openairesponsesrefusalcontent.md @@ -6,8 +6,8 @@ import { OpenAIResponsesRefusalContent } from "@openrouter/sdk/models"; let value: OpenAIResponsesRefusalContent = { - type: "refusal", refusal: "I'm sorry, I cannot assist with that request", + type: "refusal", }; ``` @@ -15,5 +15,5 @@ let value: OpenAIResponsesRefusalContent = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *"refusal"* | :heavy_check_mark: | N/A | -| `refusal` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `refusal` | *string* | :heavy_check_mark: | N/A | +| `type` | *"refusal"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsesresponsestatus.md b/docs/models/openairesponsesresponsestatus.md index f0b38faf..44ff0f74 100644 --- a/docs/models/openairesponsesresponsestatus.md +++ b/docs/models/openairesponsesresponsestatus.md @@ -5,7 +5,7 @@ ```typescript import { OpenAIResponsesResponseStatus } from "@openrouter/sdk/models"; -let value: OpenAIResponsesResponseStatus = "failed"; +let value: OpenAIResponsesResponseStatus = "completed"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/models/openairesponsestoolchoicefunction.md b/docs/models/openairesponsestoolchoicefunction.md index ee619714..9329c5fe 100644 --- a/docs/models/openairesponsestoolchoicefunction.md +++ b/docs/models/openairesponsestoolchoicefunction.md @@ -6,8 +6,8 @@ import { OpenAIResponsesToolChoiceFunction } from "@openrouter/sdk/models"; let value: OpenAIResponsesToolChoiceFunction = { - type: "function", name: "", + type: "function", }; ``` @@ -15,5 +15,5 @@ let value: OpenAIResponsesToolChoiceFunction = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenAIResponsesToolChoiceTypeFunction](../models/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `name` | *string* | :heavy_check_mark: | N/A | +| `type` | [models.OpenAIResponsesToolChoiceTypeFunction](../models/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsestoolchoiceunion.md b/docs/models/openairesponsestoolchoiceunion.md index f394b526..7fcf96e9 100644 --- a/docs/models/openairesponsestoolchoiceunion.md +++ b/docs/models/openairesponsestoolchoiceunion.md @@ -25,8 +25,8 @@ const value: models.OpenAIResponsesToolChoiceRequired = "required"; ```typescript const value: models.OpenAIResponsesToolChoiceFunction = { - type: "function", name: "", + type: "function", }; ``` @@ -38,3 +38,18 @@ const value: models.OpenAIResponsesToolChoice = { }; ``` +### `models.ToolChoiceAllowed` + +```typescript +const value: models.ToolChoiceAllowed = { + mode: "auto", + tools: [ + { + "name": "get_weather", + "type": "function", + }, + ], + type: "allowed_tools", +}; +``` + diff --git a/docs/models/operations/apitype.md b/docs/models/operations/apitype.md index d01ad30e..4758d05b 100644 --- a/docs/models/operations/apitype.md +++ b/docs/models/operations/apitype.md @@ -7,7 +7,7 @@ Type of API used for the generation ```typescript import { ApiType } from "@openrouter/sdk/models/operations"; -let value: ApiType = "embeddings"; +let value: ApiType = "rerank"; // Open enum: unrecognized values are captured as Unrecognized ``` @@ -15,5 +15,5 @@ let value: ApiType = "embeddings"; ## Values ```typescript -"completions" | "embeddings" | "video" | Unrecognized +"completions" | "embeddings" | "rerank" | "video" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailrequest.md b/docs/models/operations/bulkassignkeystoguardrailrequest.md index bc5eaf71..fa34230d 100644 --- a/docs/models/operations/bulkassignkeystoguardrailrequest.md +++ b/docs/models/operations/bulkassignkeystoguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkAssignKeysToGuardrailRequest } from "@openrouter/sdk/models/operati let value: BulkAssignKeysToGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -23,4 +23,4 @@ let value: BulkAssignKeysToGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkAssignKeysToGuardrailRequestBody](../../models/operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkAssignKeysRequest` | [models.BulkAssignKeysRequest](../../models/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailrequestbody.md b/docs/models/operations/bulkassignkeystoguardrailrequestbody.md deleted file mode 100644 index a7ed0dcf..00000000 --- a/docs/models/operations/bulkassignkeystoguardrailrequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignKeysToGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkAssignKeysToGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignKeysToGuardrailRequestBody = { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `keyHashes` | *string*[] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailresponse.md b/docs/models/operations/bulkassignkeystoguardrailresponse.md deleted file mode 100644 index a9b6b30c..00000000 --- a/docs/models/operations/bulkassignkeystoguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignKeysToGuardrailResponse - -Assignment result - -## Example Usage - -```typescript -import { BulkAssignKeysToGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignKeysToGuardrailResponse = { - assignedCount: 3, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `assignedCount` | *number* | :heavy_check_mark: | Number of keys successfully assigned | 3 | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailrequest.md b/docs/models/operations/bulkassignmemberstoguardrailrequest.md index fa8bb4ca..c36a00c0 100644 --- a/docs/models/operations/bulkassignmemberstoguardrailrequest.md +++ b/docs/models/operations/bulkassignmemberstoguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkAssignMembersToGuardrailRequest } from "@openrouter/sdk/models/oper let value: BulkAssignMembersToGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkAssignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -24,4 +24,4 @@ let value: BulkAssignMembersToGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkAssignMembersToGuardrailRequestBody](../../models/operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkAssignMembersRequest` | [models.BulkAssignMembersRequest](../../models/bulkassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md b/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md deleted file mode 100644 index a1b88827..00000000 --- a/docs/models/operations/bulkassignmemberstoguardrailrequestbody.md +++ /dev/null @@ -1,20 +0,0 @@ -# BulkAssignMembersToGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkAssignMembersToGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignMembersToGuardrailRequestBody = { - memberUserIds: [ - "user_abc123", - "user_def456", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `memberUserIds` | *string*[] | :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/models/operations/bulkassignmemberstoguardrailresponse.md b/docs/models/operations/bulkassignmemberstoguardrailresponse.md deleted file mode 100644 index 6f83d903..00000000 --- a/docs/models/operations/bulkassignmemberstoguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkAssignMembersToGuardrailResponse - -Assignment result - -## Example Usage - -```typescript -import { BulkAssignMembersToGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkAssignMembersToGuardrailResponse = { - assignedCount: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `assignedCount` | *number* | :heavy_check_mark: | Number of members successfully assigned | 2 | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md index a57fdea5..44f7f4a4 100644 --- a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkUnassignKeysFromGuardrailRequest } from "@openrouter/sdk/models/ope let value: BulkUnassignKeysFromGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignKeysRequest: { keyHashes: [ "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", ], @@ -23,4 +23,4 @@ let value: BulkUnassignKeysFromGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../../models/operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkUnassignKeysRequest` | [models.BulkUnassignKeysRequest](../../models/bulkunassignkeysrequest.md) | :heavy_check_mark: | N/A | {
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md b/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md deleted file mode 100644 index 5a1b1ad3..00000000 --- a/docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignKeysFromGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkUnassignKeysFromGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignKeysFromGuardrailRequestBody = { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `keyHashes` | *string*[] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailresponse.md b/docs/models/operations/bulkunassignkeysfromguardrailresponse.md deleted file mode 100644 index c77c8c77..00000000 --- a/docs/models/operations/bulkunassignkeysfromguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignKeysFromGuardrailResponse - -Unassignment result - -## Example Usage - -```typescript -import { BulkUnassignKeysFromGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignKeysFromGuardrailResponse = { - unassignedCount: 3, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `unassignedCount` | *number* | :heavy_check_mark: | Number of keys successfully unassigned | 3 | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md index 668117d9..0d825994 100644 --- a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md @@ -7,7 +7,7 @@ import { BulkUnassignMembersFromGuardrailRequest } from "@openrouter/sdk/models/ let value: BulkUnassignMembersFromGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -24,4 +24,4 @@ let value: BulkUnassignMembersFromGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../../models/operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `bulkUnassignMembersRequest` | [models.BulkUnassignMembersRequest](../../models/bulkunassignmembersrequest.md) | :heavy_check_mark: | N/A | {
"member_user_ids": [
"user_abc123",
"user_def456"
]
} | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md b/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md deleted file mode 100644 index 82ae5400..00000000 --- a/docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md +++ /dev/null @@ -1,20 +0,0 @@ -# BulkUnassignMembersFromGuardrailRequestBody - -## Example Usage - -```typescript -import { BulkUnassignMembersFromGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignMembersFromGuardrailRequestBody = { - memberUserIds: [ - "user_abc123", - "user_def456", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `memberUserIds` | *string*[] | :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/models/operations/bulkunassignmembersfromguardrailresponse.md b/docs/models/operations/bulkunassignmembersfromguardrailresponse.md deleted file mode 100644 index a3568670..00000000 --- a/docs/models/operations/bulkunassignmembersfromguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# BulkUnassignMembersFromGuardrailResponse - -Unassignment result - -## Example Usage - -```typescript -import { BulkUnassignMembersFromGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: BulkUnassignMembersFromGuardrailResponse = { - unassignedCount: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `unassignedCount` | *number* | :heavy_check_mark: | Number of members successfully unassigned | 2 | \ No newline at end of file diff --git a/docs/models/operations/calldata.md b/docs/models/operations/calldata.md deleted file mode 100644 index d630cf8a..00000000 --- a/docs/models/operations/calldata.md +++ /dev/null @@ -1,35 +0,0 @@ -# CallData - -## Example Usage - -```typescript -import { CallData } from "@openrouter/sdk/models/operations"; - -let value: CallData = { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `deadline` | *string* | :heavy_check_mark: | N/A | -| `feeAmount` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `operator` | *string* | :heavy_check_mark: | N/A | -| `prefix` | *string* | :heavy_check_mark: | N/A | -| `recipient` | *string* | :heavy_check_mark: | N/A | -| `recipientAmount` | *string* | :heavy_check_mark: | N/A | -| `recipientCurrency` | *string* | :heavy_check_mark: | N/A | -| `refundDestination` | *string* | :heavy_check_mark: | N/A | -| `signature` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/content.md b/docs/models/operations/content.md index cc911d27..d66bbbe9 100644 --- a/docs/models/operations/content.md +++ b/docs/models/operations/content.md @@ -7,8 +7,8 @@ ```typescript const value: operations.ContentText = { - type: "text", text: "", + type: "text", }; ``` @@ -16,10 +16,10 @@ const value: operations.ContentText = { ```typescript const value: operations.ContentImageURL = { - type: "image_url", imageUrl: { url: "https://zealous-march.biz/", }, + type: "image_url", }; ``` diff --git a/docs/models/operations/contentimageurl.md b/docs/models/operations/contentimageurl.md index 07dae3ef..fc535f10 100644 --- a/docs/models/operations/contentimageurl.md +++ b/docs/models/operations/contentimageurl.md @@ -6,10 +6,10 @@ import { ContentImageURL } from "@openrouter/sdk/models/operations"; let value: ContentImageURL = { - type: "image_url", imageUrl: { url: "https://zealous-march.biz/", }, + type: "image_url", }; ``` @@ -17,5 +17,5 @@ let value: ContentImageURL = { | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `type` | *"image_url"* | :heavy_check_mark: | N/A | -| `imageUrl` | [operations.ImageUrl](../../models/operations/imageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `imageUrl` | [operations.ImageUrl](../../models/operations/imageurl.md) | :heavy_check_mark: | N/A | +| `type` | *"image_url"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/contenttext.md b/docs/models/operations/contenttext.md index 85b3a967..9870a64d 100644 --- a/docs/models/operations/contenttext.md +++ b/docs/models/operations/contenttext.md @@ -6,8 +6,8 @@ import { ContentText } from "@openrouter/sdk/models/operations"; let value: ContentText = { - type: "text", text: "", + type: "text", }; ``` @@ -15,5 +15,5 @@ let value: ContentText = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *"text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `text` | *string* | :heavy_check_mark: | N/A | +| `type` | *"text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscodedata.md b/docs/models/operations/createauthkeyscodedata.md index 500d330e..281ac740 100644 --- a/docs/models/operations/createauthkeyscodedata.md +++ b/docs/models/operations/createauthkeyscodedata.md @@ -8,9 +8,9 @@ Auth code data import { CreateAuthKeysCodeData } from "@openrouter/sdk/models/operations"; let value: CreateAuthKeysCodeData = { - id: "auth_code_xyz789", appId: 12345, createdAt: "2025-08-24T10:30:00Z", + id: "auth_code_xyz789", }; ``` @@ -18,6 +18,6 @@ let value: CreateAuthKeysCodeData = { | Field | Type | Required | Description | Example | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 | | `appId` | *number* | :heavy_check_mark: | The application ID associated with this auth code | 12345 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z | \ No newline at end of file +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z | +| `id` | *string* | :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/models/operations/createauthkeyscoderequestbody.md b/docs/models/operations/createauthkeyscoderequestbody.md index 9e51f134..473d7a15 100644 --- a/docs/models/operations/createauthkeyscoderequestbody.md +++ b/docs/models/operations/createauthkeyscoderequestbody.md @@ -17,7 +17,7 @@ let value: CreateAuthKeysCodeRequestBody = { | `callbackUrl` | *string* | :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 | | `codeChallenge` | *string* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | | `codeChallengeMethod` | [operations.CreateAuthKeysCodeCodeChallengeMethod](../../models/operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | -| `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z | | `keyLabel` | *string* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key | +| `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | | `usageLimitType` | [operations.UsageLimitType](../../models/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/models/operations/createauthkeyscoderesponse.md b/docs/models/operations/createauthkeyscoderesponse.md index e610aec9..359a09f9 100644 --- a/docs/models/operations/createauthkeyscoderesponse.md +++ b/docs/models/operations/createauthkeyscoderesponse.md @@ -9,9 +9,9 @@ import { CreateAuthKeysCodeResponse } from "@openrouter/sdk/models/operations"; let value: CreateAuthKeysCodeResponse = { data: { - id: "auth_code_xyz789", appId: 12345, createdAt: "2025-08-24T10:30:00Z", + id: "auth_code_xyz789", }, }; ``` @@ -20,4 +20,4 @@ let value: CreateAuthKeysCodeResponse = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `data` | [operations.CreateAuthKeysCodeData](../../models/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](../../models/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/models/operations/createcoinbasechargedata.md b/docs/models/operations/createcoinbasechargedata.md deleted file mode 100644 index 9acb63a0..00000000 --- a/docs/models/operations/createcoinbasechargedata.md +++ /dev/null @@ -1,43 +0,0 @@ -# CreateCoinbaseChargeData - -## Example Usage - -```typescript -import { CreateCoinbaseChargeData } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeData = { - id: "", - createdAt: "1730810681036", - expiresAt: "1742058293127", - web3Data: { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `createdAt` | *string* | :heavy_check_mark: | N/A | -| `expiresAt` | *string* | :heavy_check_mark: | N/A | -| `web3Data` | [operations.Web3Data](../../models/operations/web3data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargeglobals.md b/docs/models/operations/createcoinbasechargeglobals.md deleted file mode 100644 index 8a57aaa6..00000000 --- a/docs/models/operations/createcoinbasechargeglobals.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateCoinbaseChargeGlobals - -## Example Usage - -```typescript -import { CreateCoinbaseChargeGlobals } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeGlobals = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :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.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :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/models/operations/createcoinbasechargerequest.md b/docs/models/operations/createcoinbasechargerequest.md deleted file mode 100644 index 7427ed1d..00000000 --- a/docs/models/operations/createcoinbasechargerequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateCoinbaseChargeRequest - -## Example Usage - -```typescript -import { CreateCoinbaseChargeRequest } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeRequest = { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :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.
| | -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `createChargeRequest` | [models.CreateChargeRequest](../../models/createchargerequest.md) | :heavy_check_mark: | N/A | {
"amount": 100,
"sender": "0x1234567890123456789012345678901234567890",
"chain_id": 1
} | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargeresponse.md b/docs/models/operations/createcoinbasechargeresponse.md deleted file mode 100644 index 48df4424..00000000 --- a/docs/models/operations/createcoinbasechargeresponse.md +++ /dev/null @@ -1,44 +0,0 @@ -# CreateCoinbaseChargeResponse - -Returns the calldata to fulfill the transaction - -## Example Usage - -```typescript -import { CreateCoinbaseChargeResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeResponse = { - data: { - id: "", - createdAt: "1723897831264", - expiresAt: "1744713163031", - web3Data: { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `data` | [operations.CreateCoinbaseChargeData](../../models/operations/createcoinbasechargedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargesecurity.md b/docs/models/operations/createcoinbasechargesecurity.md deleted file mode 100644 index 9de595c8..00000000 --- a/docs/models/operations/createcoinbasechargesecurity.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateCoinbaseChargeSecurity - -## Example Usage - -```typescript -import { CreateCoinbaseChargeSecurity } from "@openrouter/sdk/models/operations"; - -let value: CreateCoinbaseChargeSecurity = { - bearer: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `bearer` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsdata.md b/docs/models/operations/createembeddingsdata.md index b6acb226..5e845b54 100644 --- a/docs/models/operations/createembeddingsdata.md +++ b/docs/models/operations/createembeddingsdata.md @@ -1,20 +1,26 @@ # CreateEmbeddingsData +A single embedding object + ## Example Usage ```typescript import { CreateEmbeddingsData } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsData = { + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], object: "embedding", - embedding: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `object` | [operations.ObjectEmbedding](../../models/operations/objectembedding.md) | :heavy_check_mark: | N/A | -| `embedding` | *operations.Embedding* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `embedding` | *operations.Embedding* | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [
0.0023064255,
-0.009327292,
0.015797347
] | +| `index` | *number* | :heavy_minus_sign: | Index of the embedding in the input list | 0 | +| `object` | [operations.ObjectEmbedding](../../models/operations/objectembedding.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsrequest.md b/docs/models/operations/createembeddingsrequest.md index 2768e50f..f35f3026 100644 --- a/docs/models/operations/createembeddingsrequest.md +++ b/docs/models/operations/createembeddingsrequest.md @@ -7,23 +7,17 @@ import { CreateEmbeddingsRequest } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsRequest = { requestBody: { - input: [ - [], - [ - 3849.69, - ], - [], - ], - model: "Model Y", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :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.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `requestBody` | [operations.CreateEmbeddingsRequestBody](../../models/operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :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.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `requestBody` | [operations.CreateEmbeddingsRequestBody](../../models/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/models/operations/createembeddingsrequestbody.md b/docs/models/operations/createembeddingsrequestbody.md index 37b54605..986464ca 100644 --- a/docs/models/operations/createembeddingsrequestbody.md +++ b/docs/models/operations/createembeddingsrequestbody.md @@ -1,24 +1,26 @@ # CreateEmbeddingsRequestBody +Embeddings request input + ## Example Usage ```typescript import { CreateEmbeddingsRequestBody } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsRequestBody = { - input: [], - model: "Focus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `input` | *operations.InputUnion* | :heavy_check_mark: | N/A | -| `model` | *string* | :heavy_check_mark: | N/A | -| `encodingFormat` | [operations.EncodingFormat](../../models/operations/encodingformat.md) | :heavy_minus_sign: | N/A | -| `dimensions` | *number* | :heavy_minus_sign: | N/A | -| `user` | *string* | :heavy_minus_sign: | N/A | -| `provider` | [models.ProviderPreferences](../../models/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. | -| `inputType` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `dimensions` | *number* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 | +| `encodingFormat` | [operations.EncodingFormat](../../models/operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float | +| `input` | *operations.InputUnion* | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog | +| `inputType` | *string* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query | +| `model` | *string* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small | +| `provider` | [models.ProviderPreferences](../../models/providerpreferences.md) | :heavy_minus_sign: | N/A | {
"allow_fallbacks": true
} | +| `user` | *string* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsresponse.md b/docs/models/operations/createembeddingsresponse.md index cfc7f402..2888a926 100644 --- a/docs/models/operations/createembeddingsresponse.md +++ b/docs/models/operations/createembeddingsresponse.md @@ -7,9 +7,18 @@ ```typescript const value: operations.CreateEmbeddingsResponseBody = { + data: [ + { + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], + object: "embedding", + }, + ], + model: "openai/text-embedding-3-small", object: "list", - data: [], - model: "Focus", }; ``` diff --git a/docs/models/operations/createembeddingsresponsebody.md b/docs/models/operations/createembeddingsresponsebody.md index 18423c1d..9e428920 100644 --- a/docs/models/operations/createembeddingsresponsebody.md +++ b/docs/models/operations/createembeddingsresponsebody.md @@ -1,6 +1,6 @@ # CreateEmbeddingsResponseBody -Embedding response +Embeddings response containing embedding vectors ## Example Usage @@ -8,18 +8,27 @@ Embedding response import { CreateEmbeddingsResponseBody } from "@openrouter/sdk/models/operations"; let value: CreateEmbeddingsResponseBody = { + data: [ + { + embedding: [ + 0.0023064255, + -0.009327292, + 0.015797347, + ], + object: "embedding", + }, + ], + model: "openai/text-embedding-3-small", object: "list", - data: [], - model: "Focus", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `object` | [operations.ObjectT](../../models/operations/objectt.md) | :heavy_check_mark: | N/A | -| `data` | [operations.CreateEmbeddingsData](../../models/operations/createembeddingsdata.md)[] | :heavy_check_mark: | N/A | -| `model` | *string* | :heavy_check_mark: | N/A | -| `usage` | [operations.Usage](../../models/operations/usage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `data` | [operations.CreateEmbeddingsData](../../models/operations/createembeddingsdata.md)[] | :heavy_check_mark: | List of embedding objects | [
{
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
],
"index": 0,
"object": "embedding"
}
] | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the embeddings response | embd-1234567890 | +| `model` | *string* | :heavy_check_mark: | The model used for embeddings | openai/text-embedding-3-small | +| `object` | [operations.ObjectT](../../models/operations/objectt.md) | :heavy_check_mark: | N/A | | +| `usage` | [operations.CreateEmbeddingsUsage](../../models/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/models/operations/createguardraildata.md b/docs/models/operations/createguardraildata.md deleted file mode 100644 index e914c2f7..00000000 --- a/docs/models/operations/createguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateGuardrailData - -The created guardrail - -## Example Usage - -```typescript -import { CreateGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.CreateGuardrailResetIntervalResponse](../../models/operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :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"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :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/models/operations/createguardrailrequest.md b/docs/models/operations/createguardrailrequest.md index 2d9de582..241784b2 100644 --- a/docs/models/operations/createguardrailrequest.md +++ b/docs/models/operations/createguardrailrequest.md @@ -6,7 +6,7 @@ import { CreateGuardrailRequest } from "@openrouter/sdk/models/operations"; let value: CreateGuardrailRequest = { - requestBody: { + createGuardrailRequest: { name: "My New Guardrail", }, }; @@ -19,4 +19,4 @@ let value: CreateGuardrailRequest = { | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `requestBody` | [operations.CreateGuardrailRequestBody](../../models/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 +| `createGuardrailRequest` | [models.CreateGuardrailRequest](../../models/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_providers": null,
"limit_usd": 50,
"name": "My New Guardrail",
"reset_interval": "monthly"
} | \ No newline at end of file diff --git a/docs/models/operations/createguardrailrequestbody.md b/docs/models/operations/createguardrailrequestbody.md deleted file mode 100644 index c55fc131..00000000 --- a/docs/models/operations/createguardrailrequestbody.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateGuardrailRequestBody - -## Example Usage - -```typescript -import { CreateGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailRequestBody = { - name: "My New Guardrail", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 50 | -| `resetInterval` | [operations.CreateGuardrailResetIntervalRequest](../../models/operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :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"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | \ No newline at end of file diff --git a/docs/models/operations/createguardrailresetintervalrequest.md b/docs/models/operations/createguardrailresetintervalrequest.md deleted file mode 100644 index f13dca34..00000000 --- a/docs/models/operations/createguardrailresetintervalrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateGuardrailResetIntervalRequest - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { CreateGuardrailResetIntervalRequest } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResetIntervalRequest = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/createguardrailresetintervalresponse.md b/docs/models/operations/createguardrailresetintervalresponse.md deleted file mode 100644 index 81c6a47c..00000000 --- a/docs/models/operations/createguardrailresetintervalresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateGuardrailResetIntervalResponse - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { CreateGuardrailResetIntervalResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResetIntervalResponse = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/createguardrailresponse.md b/docs/models/operations/createguardrailresponse.md deleted file mode 100644 index 82ab5e0c..00000000 --- a/docs/models/operations/createguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateGuardrailResponse - -Guardrail created successfully - -## Example Usage - -```typescript -import { CreateGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: CreateGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "My New Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateGuardrailData](../../models/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/models/operations/createkeysdata.md b/docs/models/operations/createkeysdata.md index 77c3c7bf..814af966 100644 --- a/docs/models/operations/createkeysdata.md +++ b/docs/models/operations/createkeysdata.md @@ -8,25 +8,25 @@ The created API key information import { CreateKeysData } from "@openrouter/sdk/models/operations"; let value: CreateKeysData = { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "sk-or-v1-0e6...1c96", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }; ``` @@ -34,23 +34,23 @@ let value: CreateKeysData = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `creatorUserId` | *string* | :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` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | | `hash` | *string* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | | `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | | `limitRemaining` | *number* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | | `limitReset` | *string* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | | `usage` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usageWeekly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | | `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | -| `creatorUserId` | *string* | :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 +| `usageWeekly` | *number* | :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/models/operations/createkeysrequest.md b/docs/models/operations/createkeysrequest.md index f5db40c7..9f2c61c3 100644 --- a/docs/models/operations/createkeysrequest.md +++ b/docs/models/operations/createkeysrequest.md @@ -19,4 +19,4 @@ let value: CreateKeysRequest = { | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `requestBody` | [operations.CreateKeysRequestBody](../../models/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 +| `requestBody` | [operations.CreateKeysRequestBody](../../models/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/models/operations/createkeysrequestbody.md b/docs/models/operations/createkeysrequestbody.md index dbf3e43f..a5340c35 100644 --- a/docs/models/operations/createkeysrequestbody.md +++ b/docs/models/operations/createkeysrequestbody.md @@ -14,8 +14,9 @@ let value: CreateKeysRequestBody = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name for the new API key | My New API Key | +| `creatorUserId` | *string* | :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 | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :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 | +| `includeByokInLimit` | *boolean* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | | `limit` | *number* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 | | `limitReset` | [operations.CreateKeysLimitReset](../../models/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 | -| `includeByokInLimit` | *boolean* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :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 +| `name` | *string* | :heavy_check_mark: | Name for the new API key | My New API Key | \ No newline at end of file diff --git a/docs/models/operations/createkeysresponse.md b/docs/models/operations/createkeysresponse.md index e09f4cc3..8cff40ca 100644 --- a/docs/models/operations/createkeysresponse.md +++ b/docs/models/operations/createkeysresponse.md @@ -9,25 +9,25 @@ import { CreateKeysResponse } from "@openrouter/sdk/models/operations"; let value: CreateKeysResponse = { data: { + byokUsage: 0, + byokUsageDaily: 0, + byokUsageMonthly: 0, + byokUsageWeekly: 0, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My New API Key", + includeByokInLimit: true, label: "My New API Key", - disabled: false, limit: 50, limitRemaining: 50, limitReset: "monthly", - includeByokInLimit: true, + name: "My New API Key", + updatedAt: null, usage: 0, usageDaily: 0, - usageWeekly: 0, usageMonthly: 0, - byokUsage: 0, - byokUsageDaily: 0, - byokUsageWeekly: 0, - byokUsageMonthly: 0, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: null, - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 0, }, key: "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", @@ -38,5 +38,5 @@ let value: CreateKeysResponse = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateKeysData](../../models/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](../../models/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` | *string* | :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/models/operations/createresponsesrequest.md b/docs/models/operations/createresponsesrequest.md index 6d893983..94027367 100644 --- a/docs/models/operations/createresponsesrequest.md +++ b/docs/models/operations/createresponsesrequest.md @@ -17,4 +17,4 @@ let value: CreateResponsesRequest = { | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `responsesRequest` | [models.ResponsesRequest](../../models/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 +| `responsesRequest` | [models.ResponsesRequest](../../models/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/models/operations/createresponsesresponse.md b/docs/models/operations/createresponsesresponse.md index 05a6aa2b..35a50704 100644 --- a/docs/models/operations/createresponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -7,29 +7,36 @@ ```typescript const value: models.OpenResponsesResult = { - id: "resp-abc123", - object: "response", + completedAt: 311936, createdAt: 1704067200, + error: null, + frequencyPenalty: 7286.67, + id: "resp-abc123", + incompleteDetails: null, + instructions: null, + metadata: null, model: "gpt-4", - status: "completed", - completedAt: 7286.67, + object: "response", output: [ { + content: [ + { + text: "Hello! How can I help you today?", + type: "output_text", + }, + ], + id: "msg-abc123", + role: "assistant", type: "message", - status: "completed", }, ], - error: null, - incompleteDetails: null, - temperature: null, - topP: null, - presencePenalty: 9990.37, - frequencyPenalty: null, - instructions: null, - metadata: null, - tools: [], - toolChoice: "auto", parallelToolCalls: true, + presencePenalty: 3737.69, + status: "completed", + temperature: 9990.37, + toolChoice: "auto", + tools: [], + topP: 461.05, }; ``` diff --git a/docs/models/operations/createresponsesresponsebody.md b/docs/models/operations/createresponsesresponsebody.md index 9a44a658..8a2f9c8e 100644 --- a/docs/models/operations/createresponsesresponsebody.md +++ b/docs/models/operations/createresponsesresponsebody.md @@ -9,28 +9,28 @@ import { CreateResponsesResponseBody } from "@openrouter/sdk/models/operations"; let value: CreateResponsesResponseBody = { data: { - type: "response.created", response: { - id: "resp-abc123", - object: "response", + completedAt: 798483, createdAt: 1704067200, - model: "gpt-4", - status: "in_progress", - completedAt: 8101.12, - output: [], error: null, + frequencyPenalty: 8101.12, + id: "resp-abc123", incompleteDetails: null, - temperature: null, - topP: null, - presencePenalty: 8087.26, - frequencyPenalty: 4886.88, instructions: null, metadata: null, - tools: [], - toolChoice: "auto", + model: "gpt-4", + object: "response", + output: [], parallelToolCalls: true, + presencePenalty: 9758.23, + status: "in_progress", + temperature: 8087.26, + toolChoice: "auto", + tools: [], + topP: 4800.08, }, sequenceNumber: 0, + type: "response.created", }, }; ``` @@ -39,4 +39,4 @@ let value: CreateResponsesResponseBody = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | *models.StreamEvents* | :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` | *models.StreamEvents* | :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/models/operations/deleteguardrailresponse.md b/docs/models/operations/deleteguardrailresponse.md deleted file mode 100644 index ef931107..00000000 --- a/docs/models/operations/deleteguardrailresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteGuardrailResponse - -Guardrail deleted successfully - -## Example Usage - -```typescript -import { DeleteGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: DeleteGuardrailResponse = { - deleted: true, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `deleted` | *true* | :heavy_check_mark: | Confirmation that the guardrail was deleted | true | \ No newline at end of file diff --git a/docs/models/operations/embedding.md b/docs/models/operations/embedding.md index 840767b6..34cea4b9 100644 --- a/docs/models/operations/embedding.md +++ b/docs/models/operations/embedding.md @@ -1,5 +1,7 @@ # Embedding +Embedding vector as an array of floats or a base64 string + ## Supported Types @@ -7,9 +9,9 @@ ```typescript const value: number[] = [ - 3390.48, - 1336.21, - 9437.99, + 0.0023064255, + -0.009327292, + 0.015797347, ]; ``` diff --git a/docs/models/operations/encodingformat.md b/docs/models/operations/encodingformat.md index 02594e25..78efaae2 100644 --- a/docs/models/operations/encodingformat.md +++ b/docs/models/operations/encodingformat.md @@ -1,5 +1,7 @@ # EncodingFormat +The format of the output embeddings + ## Example Usage ```typescript diff --git a/docs/models/operations/exchangeauthcodeforapikeyrequest.md b/docs/models/operations/exchangeauthcodeforapikeyrequest.md index d67d86a0..1a3e710c 100644 --- a/docs/models/operations/exchangeauthcodeforapikeyrequest.md +++ b/docs/models/operations/exchangeauthcodeforapikeyrequest.md @@ -19,4 +19,4 @@ let value: ExchangeAuthCodeForAPIKeyRequest = { | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `requestBody` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../../models/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 +| `requestBody` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../../models/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/models/operations/exchangeauthcodeforapikeyrequestbody.md b/docs/models/operations/exchangeauthcodeforapikeyrequestbody.md index b59a06a5..b45ac5df 100644 --- a/docs/models/operations/exchangeauthcodeforapikeyrequestbody.md +++ b/docs/models/operations/exchangeauthcodeforapikeyrequestbody.md @@ -15,5 +15,5 @@ let value: ExchangeAuthCodeForAPIKeyRequestBody = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `code` | *string* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 | -| `codeVerifier` | *string* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk | -| `codeChallengeMethod` | [operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod](../../models/operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | \ No newline at end of file +| `codeChallengeMethod` | [operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod](../../models/operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | +| `codeVerifier` | *string* | :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/models/operations/getcurrentkeydata.md b/docs/models/operations/getcurrentkeydata.md index c984d706..8b737d4c 100644 --- a/docs/models/operations/getcurrentkeydata.md +++ b/docs/models/operations/getcurrentkeydata.md @@ -8,28 +8,28 @@ Current API key information import { GetCurrentKeyData } from "@openrouter/sdk/models/operations"; let value: GetCurrentKeyData = { - label: "sk-or-v1-au7...890", - limit: 100, - usage: 25.5, - usageDaily: 25.5, - usageWeekly: 25.5, - usageMonthly: 25.5, byokUsage: 17.38, byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + includeByokInLimit: false, isFreeTier: false, isManagementKey: false, isProvisioningKey: false, + label: "sk-or-v1-au7...890", + limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", rateLimit: { - requests: 1000, interval: "1h", note: "This field is deprecated and safe to ignore.", + requests: 1000, }, + usage: 25.5, + usageDaily: 25.5, + usageMonthly: 25.5, + usageWeekly: 25.5, }; ``` @@ -37,22 +37,22 @@ let value: GetCurrentKeyData = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | -| `usage` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | -| `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usageWeekly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | -| `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | | `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | | `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | | `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `creatorUserId` | *string* | :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 | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `isFreeTier` | *boolean* | :heavy_check_mark: | Whether this is a free tier API key | false | | `isManagementKey` | *boolean* | :heavy_check_mark: | Whether this is a management key | false | | ~~`isProvisioningKey`~~ | *boolean* | :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 | +| `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | +| `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | | `limitRemaining` | *number* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | | `limitReset` | *string* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | -| `creatorUserId` | *string* | :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 | -| ~~`rateLimit`~~ | [operations.RateLimit](../../models/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 +| ~~`rateLimit`~~ | [operations.RateLimit](../../models/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` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | +| `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | +| `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | +| `usageWeekly` | *number* | :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/models/operations/getcurrentkeyresponse.md b/docs/models/operations/getcurrentkeyresponse.md index 30bd2282..dc486242 100644 --- a/docs/models/operations/getcurrentkeyresponse.md +++ b/docs/models/operations/getcurrentkeyresponse.md @@ -9,28 +9,28 @@ import { GetCurrentKeyResponse } from "@openrouter/sdk/models/operations"; let value: GetCurrentKeyResponse = { data: { - label: "sk-or-v1-au7...890", - limit: 100, - usage: 25.5, - usageDaily: 25.5, - usageWeekly: 25.5, - usageMonthly: 25.5, byokUsage: 17.38, byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + includeByokInLimit: false, isFreeTier: false, isManagementKey: false, isProvisioningKey: false, + label: "sk-or-v1-au7...890", + limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", rateLimit: { - requests: 1000, interval: "1h", note: "This field is deprecated and safe to ignore.", + requests: 1000, }, + usage: 25.5, + usageDaily: 25.5, + usageMonthly: 25.5, + usageWeekly: 25.5, }, }; ``` @@ -39,4 +39,4 @@ let value: GetCurrentKeyResponse = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `data` | [operations.GetCurrentKeyData](../../models/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](../../models/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/models/operations/getgenerationdata.md b/docs/models/operations/getgenerationdata.md index 500816da..b8638ecb 100644 --- a/docs/models/operations/getgenerationdata.md +++ b/docs/models/operations/getgenerationdata.md @@ -8,86 +8,88 @@ Generation data import { GetGenerationData } from "@openrouter/sdk/models/operations"; let value: GetGenerationData = { - id: "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", - upstreamId: "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", - totalCost: 0.0015, - cacheDiscount: 0.0002, - upstreamInferenceCost: 0.0012, - createdAt: "2024-07-15T23:33:19.433273+00:00", - model: "sao10k/l3-stheno-8b", + apiType: "embeddings", appId: 12345, - streamed: true, + cacheDiscount: 0.0002, cancelled: false, - providerName: "Infermatic", + createdAt: "2024-07-15T23:33:19.433273+00:00", + externalUser: "user-123", + finishReason: "stop", + generationTime: 1200, + httpReferer: "", + id: "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", + isByok: false, latency: 1250, + model: "sao10k/l3-stheno-8b", moderationLatency: 50, - generationTime: 1200, - finishReason: "stop", - tokensPrompt: 10, - tokensCompletion: 25, - nativeTokensPrompt: 10, + nativeFinishReason: "stop", + nativeTokensCached: 3, nativeTokensCompletion: 25, nativeTokensCompletionImages: 0, + nativeTokensPrompt: 10, nativeTokensReasoning: 5, - nativeTokensCached: 3, - numMediaPrompt: 1, numInputAudioPrompt: 0, numMediaCompletion: 0, + numMediaPrompt: 1, numSearchResults: 5, origin: "https://openrouter.ai/", - usage: 0.0015, - isByok: false, - nativeFinishReason: "stop", - externalUser: "user-123", - apiType: "completions", - router: "openrouter/auto", + providerName: "Infermatic", providerResponses: [ { - status: 9669.26, + status: 200, }, ], + router: "openrouter/auto", + streamed: true, + tokensCompletion: 25, + tokensPrompt: 10, + totalCost: 0.0015, + upstreamId: "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", + upstreamInferenceCost: 0.0012, + usage: 0.0015, userAgent: "", - httpReferer: "", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG | -| `upstreamId` | *string* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 | -| `totalCost` | *number* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 | -| `cacheDiscount` | *number* | :heavy_check_mark: | Discount applied due to caching | 0.0002 | -| `upstreamInferenceCost` | *number* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 | -| `model` | *string* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b | -| `appId` | *number* | :heavy_check_mark: | ID of the app that made the request | 12345 | -| `streamed` | *boolean* | :heavy_check_mark: | Whether the response was streamed | true | -| `cancelled` | *boolean* | :heavy_check_mark: | Whether the generation was cancelled | false | -| `providerName` | *string* | :heavy_check_mark: | Name of the provider that served the request | Infermatic | -| `latency` | *number* | :heavy_check_mark: | Total latency in milliseconds | 1250 | -| `moderationLatency` | *number* | :heavy_check_mark: | Moderation latency in milliseconds | 50 | -| `generationTime` | *number* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 | -| `finishReason` | *string* | :heavy_check_mark: | Reason the generation finished | stop | -| `tokensPrompt` | *number* | :heavy_check_mark: | Number of tokens in the prompt | 10 | -| `tokensCompletion` | *number* | :heavy_check_mark: | Number of tokens in the completion | 25 | -| `nativeTokensPrompt` | *number* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 | -| `nativeTokensCompletion` | *number* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 | -| `nativeTokensCompletionImages` | *number* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 | -| `nativeTokensReasoning` | *number* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 | -| `nativeTokensCached` | *number* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | -| `numMediaPrompt` | *number* | :heavy_check_mark: | Number of media items in the prompt | 1 | -| `numInputAudioPrompt` | *number* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | -| `numMediaCompletion` | *number* | :heavy_check_mark: | Number of media items in the completion | 0 | -| `numSearchResults` | *number* | :heavy_check_mark: | Number of search results included | 5 | -| `origin` | *string* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | -| `usage` | *number* | :heavy_check_mark: | Usage amount in USD | 0.0015 | -| `isByok` | *boolean* | :heavy_check_mark: | Whether this used bring-your-own-key | false | -| `nativeFinishReason` | *string* | :heavy_check_mark: | Native finish reason as reported by provider | stop | -| `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | -| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | -| `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | -| `providerResponses` | [operations.ProviderResponse](../../models/operations/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | -| `userAgent` | *string* | :heavy_check_mark: | User-Agent header from the request | | -| `httpReferer` | *string* | :heavy_check_mark: | Referer header from the request | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | +| `appId` | *number* | :heavy_check_mark: | ID of the app that made the request | 12345 | +| `cacheDiscount` | *number* | :heavy_check_mark: | Discount applied due to caching | 0.0002 | +| `cancelled` | *boolean* | :heavy_check_mark: | Whether the generation was cancelled | false | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 | +| `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | +| `finishReason` | *string* | :heavy_check_mark: | Reason the generation finished | stop | +| `generationTime` | *number* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 | +| `httpReferer` | *string* | :heavy_check_mark: | Referer header from the request | | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG | +| `isByok` | *boolean* | :heavy_check_mark: | Whether this used bring-your-own-key | false | +| `latency` | *number* | :heavy_check_mark: | Total latency in milliseconds | 1250 | +| `model` | *string* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b | +| `moderationLatency` | *number* | :heavy_check_mark: | Moderation latency in milliseconds | 50 | +| `nativeFinishReason` | *string* | :heavy_check_mark: | Native finish reason as reported by provider | stop | +| `nativeTokensCached` | *number* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | +| `nativeTokensCompletion` | *number* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 | +| `nativeTokensCompletionImages` | *number* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 | +| `nativeTokensPrompt` | *number* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 | +| `nativeTokensReasoning` | *number* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 | +| `numInputAudioPrompt` | *number* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | +| `numMediaCompletion` | *number* | :heavy_check_mark: | Number of media items in the completion | 0 | +| `numMediaPrompt` | *number* | :heavy_check_mark: | Number of media items in the prompt | 1 | +| `numSearchResults` | *number* | :heavy_check_mark: | Number of search results included | 5 | +| `origin` | *string* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | +| `providerName` | *string* | :heavy_check_mark: | Name of the provider that served the request | Infermatic | +| `providerResponses` | [models.ProviderResponse](../../models/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | +| `requestId` | *string* | :heavy_minus_sign: | Unique identifier grouping all generations from a single API request | req-1727282430-aBcDeFgHiJkLmNoPqRsT | +| `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | +| `sessionId` | *string* | :heavy_minus_sign: | Session identifier grouping multiple generations in the same session | | +| `streamed` | *boolean* | :heavy_check_mark: | Whether the response was streamed | true | +| `tokensCompletion` | *number* | :heavy_check_mark: | Number of tokens in the completion | 25 | +| `tokensPrompt` | *number* | :heavy_check_mark: | Number of tokens in the prompt | 10 | +| `totalCost` | *number* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 | +| `upstreamId` | *string* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 | +| `upstreamInferenceCost` | *number* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 | +| `usage` | *number* | :heavy_check_mark: | Usage amount in USD | 0.0015 | +| `userAgent` | *string* | :heavy_check_mark: | User-Agent header from the request | | \ No newline at end of file diff --git a/docs/models/operations/getgenerationrequest.md b/docs/models/operations/getgenerationrequest.md index 721877b0..ab182ccd 100644 --- a/docs/models/operations/getgenerationrequest.md +++ b/docs/models/operations/getgenerationrequest.md @@ -6,15 +6,15 @@ import { GetGenerationRequest } from "@openrouter/sdk/models/operations"; let value: GetGenerationRequest = { - id: "", + id: "gen-1234567890", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :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.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :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.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | The generation ID | gen-1234567890 | \ No newline at end of file diff --git a/docs/models/operations/getgenerationresponse.md b/docs/models/operations/getgenerationresponse.md index 2f82ace8..c7cbf539 100644 --- a/docs/models/operations/getgenerationresponse.md +++ b/docs/models/operations/getgenerationresponse.md @@ -9,42 +9,46 @@ import { GetGenerationResponse } from "@openrouter/sdk/models/operations"; let value: GetGenerationResponse = { data: { - id: "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", - upstreamId: "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", - totalCost: 0.0015, - cacheDiscount: 0.0002, - upstreamInferenceCost: 0.0012, - createdAt: "2024-07-15T23:33:19.433273+00:00", - model: "sao10k/l3-stheno-8b", + apiType: null, appId: 12345, - streamed: true, + cacheDiscount: 0.0002, cancelled: false, - providerName: "Infermatic", + createdAt: "2024-07-15T23:33:19.433273+00:00", + externalUser: "user-123", + finishReason: "stop", + generationTime: 1200, + httpReferer: null, + id: "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", + isByok: false, latency: 1250, + model: "sao10k/l3-stheno-8b", moderationLatency: 50, - generationTime: 1200, - finishReason: "stop", - tokensPrompt: 10, - tokensCompletion: 25, - nativeTokensPrompt: 10, + nativeFinishReason: "stop", + nativeTokensCached: 3, nativeTokensCompletion: 25, nativeTokensCompletionImages: 0, + nativeTokensPrompt: 10, nativeTokensReasoning: 5, - nativeTokensCached: 3, - numMediaPrompt: 1, numInputAudioPrompt: 0, numMediaCompletion: 0, + numMediaPrompt: 1, numSearchResults: 5, origin: "https://openrouter.ai/", - usage: 0.0015, - isByok: false, - nativeFinishReason: "stop", - externalUser: "user-123", - apiType: null, + providerName: "Infermatic", + providerResponses: [ + { + status: 200, + }, + ], router: "openrouter/auto", - providerResponses: null, + streamed: true, + tokensCompletion: 25, + tokensPrompt: 10, + totalCost: 0.0015, + upstreamId: "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", + upstreamInferenceCost: 0.0012, + usage: 0.0015, userAgent: "", - httpReferer: "", }, }; ``` diff --git a/docs/models/operations/getguardraildata.md b/docs/models/operations/getguardraildata.md deleted file mode 100644 index ed56bce7..00000000 --- a/docs/models/operations/getguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetGuardrailData - -The guardrail - -## Example Usage - -```typescript -import { GetGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.GetGuardrailResetInterval](../../models/operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :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"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :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/models/operations/getguardrailresetinterval.md b/docs/models/operations/getguardrailresetinterval.md deleted file mode 100644 index 3b74eace..00000000 --- a/docs/models/operations/getguardrailresetinterval.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetGuardrailResetInterval - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { GetGuardrailResetInterval } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailResetInterval = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/getguardrailresponse.md b/docs/models/operations/getguardrailresponse.md deleted file mode 100644 index 1f501c88..00000000 --- a/docs/models/operations/getguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetGuardrailResponse - -Guardrail details - -## Example Usage - -```typescript -import { GetGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: GetGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetGuardrailData](../../models/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/models/operations/getkeydata.md b/docs/models/operations/getkeydata.md index 2cca0e5b..2088193b 100644 --- a/docs/models/operations/getkeydata.md +++ b/docs/models/operations/getkeydata.md @@ -8,25 +8,25 @@ The API key information import { GetKeyData } from "@openrouter/sdk/models/operations"; let value: GetKeyData = { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "sk-or-v1-0e6...1c96", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }; ``` @@ -34,23 +34,23 @@ let value: GetKeyData = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `creatorUserId` | *string* | :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` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | | `hash` | *string* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | | `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | | `limitRemaining` | *number* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | | `limitReset` | *string* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | | `usage` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usageWeekly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | | `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | -| `creatorUserId` | *string* | :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 +| `usageWeekly` | *number* | :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/models/operations/getkeyresponse.md b/docs/models/operations/getkeyresponse.md index 1c9ced00..91e446ca 100644 --- a/docs/models/operations/getkeyresponse.md +++ b/docs/models/operations/getkeyresponse.md @@ -9,25 +9,25 @@ import { GetKeyResponse } from "@openrouter/sdk/models/operations"; let value: GetKeyResponse = { data: { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "Production API Key", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }, }; ``` @@ -36,4 +36,4 @@ let value: GetKeyResponse = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetKeyData](../../models/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](../../models/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/models/operations/getmodelsrequest.md b/docs/models/operations/getmodelsrequest.md index 584f2c71..2b9e2e53 100644 --- a/docs/models/operations/getmodelsrequest.md +++ b/docs/models/operations/getmodelsrequest.md @@ -16,5 +16,5 @@ let value: GetModelsRequest = {}; | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `category` | [operations.Category](../../models/operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | -| `supportedParameters` | *string* | :heavy_minus_sign: | N/A | | +| `supportedParameters` | *string* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature | | `outputModalities` | *string* | :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/models/operations/getuseractivityrequest.md b/docs/models/operations/getuseractivityrequest.md index b42df01f..3761cd02 100644 --- a/docs/models/operations/getuseractivityrequest.md +++ b/docs/models/operations/getuseractivityrequest.md @@ -15,4 +15,6 @@ let value: GetUserActivityRequest = {}; | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `date` | *string* | :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` | *string* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | +| `apiKeyHash` | *string* | :heavy_minus_sign: | Filter by API key hash (SHA-256 hex string, as returned by the keys API). | abc123def456... | +| `userId` | *string* | :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/models/operations/getuseractivityresponse.md b/docs/models/operations/getuseractivityresponse.md deleted file mode 100644 index 6276d5ef..00000000 --- a/docs/models/operations/getuseractivityresponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# GetUserActivityResponse - -Returns user activity data grouped by endpoint - -## Example Usage - -```typescript -import { GetUserActivityResponse } from "@openrouter/sdk/models/operations"; - -let value: GetUserActivityResponse = { - data: [ - { - date: "2025-08-24", - model: "openai/gpt-4.1", - modelPermaslug: "openai/gpt-4.1-2025-04-14", - endpointId: "550e8400-e29b-41d4-a716-446655440000", - providerName: "OpenAI", - usage: 0.015, - byokUsageInference: 0.012, - requests: 5, - promptTokens: 50, - completionTokens: 125, - reasoningTokens: 25, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `data` | [models.ActivityItem](../../models/activityitem.md)[] | :heavy_check_mark: | List of activity items | \ No newline at end of file diff --git a/docs/models/operations/inputunion.md b/docs/models/operations/inputunion.md index d9f8b763..0989515a 100644 --- a/docs/models/operations/inputunion.md +++ b/docs/models/operations/inputunion.md @@ -1,12 +1,14 @@ # InputUnion +Text, token, or multimodal input(s) to embed + ## Supported Types ### `string` ```typescript -const value: string = ""; +const value: string = "The quick brown fox jumps over the lazy dog"; ``` ### `string[]` diff --git a/docs/models/operations/listdata.md b/docs/models/operations/listdata.md index c703836b..bb23098f 100644 --- a/docs/models/operations/listdata.md +++ b/docs/models/operations/listdata.md @@ -6,25 +6,25 @@ import { ListData } from "@openrouter/sdk/models/operations"; let value: ListData = { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "sk-or-v1-0e6...1c96", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }; ``` @@ -32,23 +32,23 @@ let value: ListData = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `creatorUserId` | *string* | :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` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | | `hash` | *string* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | | `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | | `limitRemaining` | *number* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | | `limitReset` | *string* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | | `usage` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usageWeekly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | | `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | -| `creatorUserId` | *string* | :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 +| `usageWeekly` | *number* | :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/models/operations/listendpointsrequest.md b/docs/models/operations/listendpointsrequest.md index a5eecdd5..6298ca21 100644 --- a/docs/models/operations/listendpointsrequest.md +++ b/docs/models/operations/listendpointsrequest.md @@ -6,17 +6,17 @@ import { ListEndpointsRequest } from "@openrouter/sdk/models/operations"; let value: ListEndpointsRequest = { - author: "", - slug: "", + author: "openai", + slug: "gpt-4", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :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.
| -| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| -| `author` | *string* | :heavy_check_mark: | N/A | -| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :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.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `author` | *string* | :heavy_check_mark: | The author/organization of the model | openai | +| `slug` | *string* | :heavy_check_mark: | The model slug | gpt-4 | \ No newline at end of file diff --git a/docs/models/operations/listendpointsresponse.md b/docs/models/operations/listendpointsresponse.md index cd366c60..c91f2d9f 100644 --- a/docs/models/operations/listendpointsresponse.md +++ b/docs/models/operations/listendpointsresponse.md @@ -9,66 +9,66 @@ import { ListEndpointsResponse } from "@openrouter/sdk/models/operations"; let value: ListEndpointsResponse = { 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", - instructType: "chatml", - modality: "text->text", inputModalities: [ "text", ], + instructType: "chatml", + modality: "text->text", outputModalities: [ "text", ], + tokenizer: "GPT", }, + created: 1692901234, + description: + "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", endpoints: [ { - name: "OpenAI: GPT-4", + contextLength: 8192, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + maxCompletionTokens: 4096, + maxPromptTokens: 8192, modelId: "openai/gpt-4", modelName: "GPT-4", - contextLength: 8192, + name: "OpenAI: GPT-4", pricing: { - prompt: "0.00003", completion: "0.00006", + prompt: "0.00003", }, providerName: "OpenAI", - tag: "openai", quantization: "fp16", - maxCompletionTokens: 4096, - maxPromptTokens: 8192, supportedParameters: [ "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], - uptimeLast30m: 99.5, supportsImplicitCaching: true, - latencyLast30m: { - p50: 0.25, - p75: 0.35, - p90: 0.48, - p99: 0.85, - }, + tag: "openai", throughputLast30m: { p50: 45.2, p75: 38.5, p90: 28.3, p99: 15.1, }, + uptimeLast1d: 99.8, + uptimeLast30m: 99.5, + uptimeLast5m: 100, }, ], + id: "openai/gpt-4", + name: "GPT-4", }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.ListEndpointsResponse](../../models/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` | [models.ListEndpointsResponse](../../models/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/models/operations/listendpointszdrresponse.md b/docs/models/operations/listendpointszdrresponse.md index 92153e5a..89e64672 100644 --- a/docs/models/operations/listendpointszdrresponse.md +++ b/docs/models/operations/listendpointszdrresponse.md @@ -10,38 +10,40 @@ import { ListEndpointsZdrResponse } from "@openrouter/sdk/models/operations"; let value: ListEndpointsZdrResponse = { data: [ { - name: "OpenAI: GPT-4", + contextLength: 8192, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + maxCompletionTokens: 4096, + maxPromptTokens: 8192, modelId: "openai/gpt-4", modelName: "GPT-4", - contextLength: 8192, + name: "OpenAI: GPT-4", pricing: { - prompt: "0.00003", completion: "0.00006", + prompt: "0.00003", }, providerName: "OpenAI", - tag: "openai", quantization: "fp16", - maxCompletionTokens: 4096, - maxPromptTokens: 8192, supportedParameters: [ "temperature", "top_p", "max_tokens", ], - uptimeLast30m: 99.5, supportsImplicitCaching: true, - latencyLast30m: { - p50: 0.25, - p75: 0.35, - p90: 0.48, - p99: 0.85, - }, + tag: "openai", throughputLast30m: { p50: 45.2, p75: 38.5, p90: 28.3, p99: 15.1, }, + uptimeLast1d: 99.8, + uptimeLast30m: 99.5, + uptimeLast5m: 100, }, ], }; diff --git a/docs/models/operations/listguardrailkeyassignmentsdata.md b/docs/models/operations/listguardrailkeyassignmentsdata.md deleted file mode 100644 index 14a67512..00000000 --- a/docs/models/operations/listguardrailkeyassignmentsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListGuardrailKeyAssignmentsData - -## Example Usage - -```typescript -import { ListGuardrailKeyAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailKeyAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `keyHash` | *string* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `keyName` | *string* | :heavy_check_mark: | Name of the API key | Production Key | -| `keyLabel` | *string* | :heavy_check_mark: | Label of the API key | prod-key | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :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/models/operations/listguardrailkeyassignmentsrequest.md b/docs/models/operations/listguardrailkeyassignmentsrequest.md index ea9fca67..98960de4 100644 --- a/docs/models/operations/listguardrailkeyassignmentsrequest.md +++ b/docs/models/operations/listguardrailkeyassignmentsrequest.md @@ -18,5 +18,5 @@ let value: ListGuardrailKeyAssignmentsRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailkeyassignmentsresponse.md b/docs/models/operations/listguardrailkeyassignmentsresponse.md index 386a0775..92c0f76f 100644 --- a/docs/models/operations/listguardrailkeyassignmentsresponse.md +++ b/docs/models/operations/listguardrailkeyassignmentsresponse.md @@ -1,32 +1,31 @@ # ListGuardrailKeyAssignmentsResponse -List of key assignments - ## Example Usage ```typescript import { ListGuardrailKeyAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailKeyAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 25, + result: { + data: [ + { + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + id: "550e8400-e29b-41d4-a716-446655440000", + keyHash: + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + keyLabel: "prod-key", + keyName: "Production Key", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailKeyAssignmentsData](../../models/operations/listguardrailkeyassignmentsdata.md)[] | :heavy_check_mark: | List of key assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListKeyAssignmentsResponse](../../models/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/models/operations/listguardrailmemberassignmentsdata.md b/docs/models/operations/listguardrailmemberassignmentsdata.md deleted file mode 100644 index bccd30f3..00000000 --- a/docs/models/operations/listguardrailmemberassignmentsdata.md +++ /dev/null @@ -1,27 +0,0 @@ -# ListGuardrailMemberAssignmentsData - -## Example Usage - -```typescript -import { ListGuardrailMemberAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailMemberAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `userId` | *string* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 | -| `organizationId` | *string* | :heavy_check_mark: | Organization ID | org_xyz789 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :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/models/operations/listguardrailmemberassignmentsrequest.md b/docs/models/operations/listguardrailmemberassignmentsrequest.md index 6c3d33e2..c8c6940d 100644 --- a/docs/models/operations/listguardrailmemberassignmentsrequest.md +++ b/docs/models/operations/listguardrailmemberassignmentsrequest.md @@ -18,5 +18,5 @@ let value: ListGuardrailMemberAssignmentsRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsresponse.md b/docs/models/operations/listguardrailmemberassignmentsresponse.md index 297a6a89..7d592e1e 100644 --- a/docs/models/operations/listguardrailmemberassignmentsresponse.md +++ b/docs/models/operations/listguardrailmemberassignmentsresponse.md @@ -1,30 +1,29 @@ # ListGuardrailMemberAssignmentsResponse -List of member assignments - ## Example Usage ```typescript import { ListGuardrailMemberAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailMemberAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 10, + result: { + data: [ + { + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + id: "550e8400-e29b-41d4-a716-446655440000", + organizationId: "org_xyz789", + userId: "user_abc123", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailMemberAssignmentsData](../../models/operations/listguardrailmemberassignmentsdata.md)[] | :heavy_check_mark: | List of member assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of member assignments | 10 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListMemberAssignmentsResponse](../../models/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/models/operations/listguardrailsdata.md b/docs/models/operations/listguardrailsdata.md deleted file mode 100644 index d0b8b4e9..00000000 --- a/docs/models/operations/listguardrailsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListGuardrailsData - -## Example Usage - -```typescript -import { ListGuardrailsData } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.ListGuardrailsResetInterval](../../models/operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :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"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :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/models/operations/listguardrailsrequest.md b/docs/models/operations/listguardrailsrequest.md index fd4c9ded..1d9c1ad9 100644 --- a/docs/models/operations/listguardrailsrequest.md +++ b/docs/models/operations/listguardrailsrequest.md @@ -15,5 +15,5 @@ let value: ListGuardrailsRequest = {}; | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailsresetinterval.md b/docs/models/operations/listguardrailsresetinterval.md deleted file mode 100644 index 4295722e..00000000 --- a/docs/models/operations/listguardrailsresetinterval.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListGuardrailsResetInterval - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { ListGuardrailsResetInterval } from "@openrouter/sdk/models/operations"; - -let value: ListGuardrailsResetInterval = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/listguardrailsresponse.md b/docs/models/operations/listguardrailsresponse.md index f32e01e8..b4f3cf73 100644 --- a/docs/models/operations/listguardrailsresponse.md +++ b/docs/models/operations/listguardrailsresponse.md @@ -1,27 +1,26 @@ # ListGuardrailsResponse -List of guardrails - ## Example Usage ```typescript import { ListGuardrailsResponse } from "@openrouter/sdk/models/operations"; let value: ListGuardrailsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 1, + result: { + data: [ + { + createdAt: "2025-08-24T10:30:00Z", + id: "550e8400-e29b-41d4-a716-446655440000", + name: "Production Guardrail", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | [operations.ListGuardrailsData](../../models/operations/listguardrailsdata.md)[] | :heavy_check_mark: | List of guardrails | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of guardrails | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListGuardrailsResponse](../../models/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_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/models/operations/listkeyassignmentsdata.md b/docs/models/operations/listkeyassignmentsdata.md deleted file mode 100644 index e30d8132..00000000 --- a/docs/models/operations/listkeyassignmentsdata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListKeyAssignmentsData - -## Example Usage - -```typescript -import { ListKeyAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListKeyAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `keyHash` | *string* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `keyName` | *string* | :heavy_check_mark: | Name of the API key | Production Key | -| `keyLabel` | *string* | :heavy_check_mark: | Label of the API key | prod-key | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :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/models/operations/listkeyassignmentsrequest.md b/docs/models/operations/listkeyassignmentsrequest.md index aee7f115..5c3f8d71 100644 --- a/docs/models/operations/listkeyassignmentsrequest.md +++ b/docs/models/operations/listkeyassignmentsrequest.md @@ -15,5 +15,5 @@ let value: ListKeyAssignmentsRequest = {}; | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsresponse.md b/docs/models/operations/listkeyassignmentsresponse.md index bdce9b8e..dcf78572 100644 --- a/docs/models/operations/listkeyassignmentsresponse.md +++ b/docs/models/operations/listkeyassignmentsresponse.md @@ -1,32 +1,31 @@ # ListKeyAssignmentsResponse -List of key assignments - ## Example Usage ```typescript import { ListKeyAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListKeyAssignmentsResponse = { - data: [ - { - id: "550e8400-e29b-41d4-a716-446655440000", - keyHash: - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - keyName: "Production Key", - keyLabel: "prod-key", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", - }, - ], - totalCount: 25, + result: { + data: [ + { + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + id: "550e8400-e29b-41d4-a716-446655440000", + keyHash: + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + keyLabel: "prod-key", + keyName: "Production Key", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `data` | [operations.ListKeyAssignmentsData](../../models/operations/listkeyassignmentsdata.md)[] | :heavy_check_mark: | List of key assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListKeyAssignmentsResponse](../../models/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/models/operations/listmemberassignmentsdata.md b/docs/models/operations/listmemberassignmentsdata.md deleted file mode 100644 index 52d09761..00000000 --- a/docs/models/operations/listmemberassignmentsdata.md +++ /dev/null @@ -1,27 +0,0 @@ -# ListMemberAssignmentsData - -## Example Usage - -```typescript -import { ListMemberAssignmentsData } from "@openrouter/sdk/models/operations"; - -let value: ListMemberAssignmentsData = { - id: "550e8400-e29b-41d4-a716-446655440000", - userId: "user_abc123", - organizationId: "org_xyz789", - guardrailId: "550e8400-e29b-41d4-a716-446655440001", - assignedBy: "user_abc123", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 | -| `userId` | *string* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 | -| `organizationId` | *string* | :heavy_check_mark: | Organization ID | org_xyz789 | -| `guardrailId` | *string* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 | -| `assignedBy` | *string* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 | -| `createdAt` | *string* | :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/models/operations/listmemberassignmentsrequest.md b/docs/models/operations/listmemberassignmentsrequest.md index 9d8e2840..c8c39bf7 100644 --- a/docs/models/operations/listmemberassignmentsrequest.md +++ b/docs/models/operations/listmemberassignmentsrequest.md @@ -15,5 +15,5 @@ let value: ListMemberAssignmentsRequest = {}; | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | -| `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file +| `offset` | *number* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | +| `limit` | *number* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsresponse.md b/docs/models/operations/listmemberassignmentsresponse.md index d9d9bb77..53698d26 100644 --- a/docs/models/operations/listmemberassignmentsresponse.md +++ b/docs/models/operations/listmemberassignmentsresponse.md @@ -1,21 +1,29 @@ # ListMemberAssignmentsResponse -List of member assignments - ## Example Usage ```typescript import { ListMemberAssignmentsResponse } from "@openrouter/sdk/models/operations"; let value: ListMemberAssignmentsResponse = { - data: [], - totalCount: 10, + result: { + data: [ + { + assignedBy: "user_abc123", + createdAt: "2025-08-24T10:30:00Z", + guardrailId: "550e8400-e29b-41d4-a716-446655440001", + id: "550e8400-e29b-41d4-a716-446655440000", + organizationId: "org_xyz789", + userId: "user_abc123", + }, + ], + totalCount: 1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [operations.ListMemberAssignmentsData](../../models/operations/listmemberassignmentsdata.md)[] | :heavy_check_mark: | List of member assignments | | -| `totalCount` | *number* | :heavy_check_mark: | Total number of member assignments | 10 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ListMemberAssignmentsResponse](../../models/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/models/operations/listprovidersdata.md b/docs/models/operations/listprovidersdata.md index 7c3361ec..c1904189 100644 --- a/docs/models/operations/listprovidersdata.md +++ b/docs/models/operations/listprovidersdata.md @@ -7,8 +7,8 @@ import { ListProvidersData } from "@openrouter/sdk/models/operations"; let value: ListProvidersData = { name: "OpenAI", - slug: "openai", privacyPolicyUrl: "https://openai.com/privacy", + slug: "openai", }; ``` @@ -16,10 +16,10 @@ let value: ListProvidersData = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `datacenters` | [operations.Datacenter](../../models/operations/datacenter.md)[] | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country codes of the provider datacenter locations | [
"US",
"IE"
] | +| `headquarters` | [operations.Headquarters](../../models/operations/headquarters.md) | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country code of the provider headquarters | US | | `name` | *string* | :heavy_check_mark: | Display name of the provider | OpenAI | -| `slug` | *string* | :heavy_check_mark: | URL-friendly identifier for the provider | openai | | `privacyPolicyUrl` | *string* | :heavy_check_mark: | URL to the provider's privacy policy | https://openai.com/privacy | -| `termsOfServiceUrl` | *string* | :heavy_minus_sign: | URL to the provider's terms of service | https://openai.com/terms | +| `slug` | *string* | :heavy_check_mark: | URL-friendly identifier for the provider | openai | | `statusPageUrl` | *string* | :heavy_minus_sign: | URL to the provider's status page | https://status.openai.com | -| `headquarters` | [operations.Headquarters](../../models/operations/headquarters.md) | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country code of the provider headquarters | US | -| `datacenters` | [operations.Datacenter](../../models/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 +| `termsOfServiceUrl` | *string* | :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/models/operations/listprovidersresponse.md b/docs/models/operations/listprovidersresponse.md index c383f6cd..9dd45708 100644 --- a/docs/models/operations/listprovidersresponse.md +++ b/docs/models/operations/listprovidersresponse.md @@ -11,8 +11,8 @@ let value: ListProvidersResponse = { data: [ { name: "OpenAI", - slug: "openai", privacyPolicyUrl: "https://openai.com/privacy", + slug: "openai", }, ], }; diff --git a/docs/models/operations/listrequest.md b/docs/models/operations/listrequest.md index a29359f4..fb107509 100644 --- a/docs/models/operations/listrequest.md +++ b/docs/models/operations/listrequest.md @@ -15,5 +15,5 @@ let value: ListRequest = {}; | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `includeDisabled` | *string* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | -| `offset` | *string* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file +| `includeDisabled` | *boolean* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | +| `offset` | *number* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file diff --git a/docs/models/operations/listresponse.md b/docs/models/operations/listresponse.md index 196deab5..e927f5c4 100644 --- a/docs/models/operations/listresponse.md +++ b/docs/models/operations/listresponse.md @@ -10,25 +10,25 @@ import { ListResponse } from "@openrouter/sdk/models/operations"; let value: ListResponse = { data: [ { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "Production API Key", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }, ], }; diff --git a/docs/models/operations/metadata.md b/docs/models/operations/metadata.md deleted file mode 100644 index 597c48b5..00000000 --- a/docs/models/operations/metadata.md +++ /dev/null @@ -1,21 +0,0 @@ -# Metadata - -## Example Usage - -```typescript -import { Metadata } from "@openrouter/sdk/models/operations"; - -let value: Metadata = { - chainId: 5773.31, - contractAddress: "", - sender: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `chainId` | *number* | :heavy_check_mark: | N/A | -| `contractAddress` | *string* | :heavy_check_mark: | N/A | -| `sender` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/providername.md b/docs/models/operations/providername.md deleted file mode 100644 index 37cc7202..00000000 --- a/docs/models/operations/providername.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderName - -## Example Usage - -```typescript -import { ProviderName } from "@openrouter/sdk/models/operations"; - -let value: ProviderName = "Lambda"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"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" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/providerresponse.md b/docs/models/operations/providerresponse.md deleted file mode 100644 index f4c34c04..00000000 --- a/docs/models/operations/providerresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# ProviderResponse - -## Example Usage - -```typescript -import { ProviderResponse } from "@openrouter/sdk/models/operations"; - -let value: ProviderResponse = { - status: 9155.58, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `endpointId` | *string* | :heavy_minus_sign: | N/A | -| `modelPermaslug` | *string* | :heavy_minus_sign: | N/A | -| `providerName` | [operations.ProviderName](../../models/operations/providername.md) | :heavy_minus_sign: | N/A | -| `status` | *number* | :heavy_check_mark: | N/A | -| `latency` | *number* | :heavy_minus_sign: | N/A | -| `isByok` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ratelimit.md b/docs/models/operations/ratelimit.md index 2fa11c77..3cdf4e9e 100644 --- a/docs/models/operations/ratelimit.md +++ b/docs/models/operations/ratelimit.md @@ -10,9 +10,9 @@ Legacy rate limit information about a key. Will always return -1. import { RateLimit } from "@openrouter/sdk/models/operations"; let value: RateLimit = { - requests: 1000, interval: "1h", note: "This field is deprecated and safe to ignore.", + requests: 1000, }; ``` @@ -20,6 +20,6 @@ let value: RateLimit = { | Field | Type | Required | Description | Example | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `requests` | *number* | :heavy_check_mark: | Number of requests allowed per interval | 1000 | | `interval` | *string* | :heavy_check_mark: | Rate limit interval | 1h | -| `note` | *string* | :heavy_check_mark: | Note about the rate limit | This field is deprecated and safe to ignore. | \ No newline at end of file +| `note` | *string* | :heavy_check_mark: | Note about the rate limit | This field is deprecated and safe to ignore. | +| `requests` | *number* | :heavy_check_mark: | Number of requests allowed per interval | 1000 | \ No newline at end of file diff --git a/docs/models/operations/sendchatcompletionrequestrequest.md b/docs/models/operations/sendchatcompletionrequestrequest.md index ae5e2912..3a4bd098 100644 --- a/docs/models/operations/sendchatcompletionrequestrequest.md +++ b/docs/models/operations/sendchatcompletionrequestrequest.md @@ -9,15 +9,14 @@ let value: SendChatCompletionRequestRequest = { chatRequest: { messages: [ { - role: "system", content: "You are a helpful assistant.", + role: "system", }, { - role: "user", content: "What is the capital of France?", + role: "user", }, ], - temperature: 0.7, }, }; ``` @@ -29,4 +28,4 @@ let value: SendChatCompletionRequestRequest = { | `httpReferer` | *string* | :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.
| | | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `chatRequest` | [models.ChatRequest](../../models/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 +| `chatRequest` | [models.ChatRequest](../../models/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/models/operations/sendchatcompletionrequestresponse.md b/docs/models/operations/sendchatcompletionrequestresponse.md index c6414b74..c24f870a 100644 --- a/docs/models/operations/sendchatcompletionrequestresponse.md +++ b/docs/models/operations/sendchatcompletionrequestresponse.md @@ -7,7 +7,6 @@ ```typescript const value: models.ChatResult = { - id: "chatcmpl-123", choices: [ { finishReason: "stop", @@ -18,6 +17,7 @@ const value: models.ChatResult = { }, ], created: 1677652288, + id: "chatcmpl-123", model: "openai/gpt-4", object: "chat.completion", systemFingerprint: "fp_44709d6fcb", diff --git a/docs/models/operations/sendchatcompletionrequestresponsebody.md b/docs/models/operations/sendchatcompletionrequestresponsebody.md index 6fbbfa90..c949a52d 100644 --- a/docs/models/operations/sendchatcompletionrequestresponsebody.md +++ b/docs/models/operations/sendchatcompletionrequestresponsebody.md @@ -9,7 +9,6 @@ import { SendChatCompletionRequestResponseBody } from "@openrouter/sdk/models/op let value: SendChatCompletionRequestResponseBody = { data: { - id: "chatcmpl-123", choices: [ { delta: {}, @@ -18,6 +17,7 @@ let value: SendChatCompletionRequestResponseBody = { }, ], created: 1677652288, + id: "chatcmpl-123", model: "openai/gpt-4", object: "chat.completion.chunk", }, @@ -28,4 +28,4 @@ let value: SendChatCompletionRequestResponseBody = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.ChatStreamChunk](../../models/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` | [models.ChatStreamChunk](../../models/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/models/operations/transferintent.md b/docs/models/operations/transferintent.md deleted file mode 100644 index be14c3de..00000000 --- a/docs/models/operations/transferintent.md +++ /dev/null @@ -1,34 +0,0 @@ -# TransferIntent - -## Example Usage - -```typescript -import { TransferIntent } from "@openrouter/sdk/models/operations"; - -let value: TransferIntent = { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `callData` | [operations.CallData](../../models/operations/calldata.md) | :heavy_check_mark: | N/A | -| `metadata` | [operations.Metadata](../../models/operations/metadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateguardraildata.md b/docs/models/operations/updateguardraildata.md deleted file mode 100644 index 22cbd14e..00000000 --- a/docs/models/operations/updateguardraildata.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateGuardrailData - -The updated guardrail - -## Example Usage - -```typescript -import { UpdateGuardrailData } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailData = { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Production Guardrail", - createdAt: "2025-08-24T10:30:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 | -| `name` | *string* | :heavy_check_mark: | Name of the guardrail | Production Guardrail | -| `description` | *string* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment | -| `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | -| `resetInterval` | [operations.UpdateGuardrailResetIntervalResponse](../../models/operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :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"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :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/models/operations/updateguardrailrequest.md b/docs/models/operations/updateguardrailrequest.md index 1a3aa633..9aad11d3 100644 --- a/docs/models/operations/updateguardrailrequest.md +++ b/docs/models/operations/updateguardrailrequest.md @@ -7,7 +7,7 @@ import { UpdateGuardrailRequest } from "@openrouter/sdk/models/operations"; let value: UpdateGuardrailRequest = { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, + updateGuardrailRequest: {}, }; ``` @@ -19,4 +19,4 @@ let value: UpdateGuardrailRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | -| `requestBody` | [operations.UpdateGuardrailRequestBody](../../models/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 +| `updateGuardrailRequest` | [models.UpdateGuardrailRequest](../../models/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/models/operations/updateguardrailrequestbody.md b/docs/models/operations/updateguardrailrequestbody.md deleted file mode 100644 index 02e8d2bc..00000000 --- a/docs/models/operations/updateguardrailrequestbody.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateGuardrailRequestBody - -## Example Usage - -```typescript -import { UpdateGuardrailRequestBody } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name | -| `description` | *string* | :heavy_minus_sign: | New description for the guardrail | Updated description | -| `limitUsd` | *number* | :heavy_minus_sign: | New spending limit in USD | 75 | -| `resetInterval` | [operations.UpdateGuardrailResetIntervalRequest](../../models/operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | -| `allowedProviders` | *string*[] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | -| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | -| `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | -| `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | true | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresetintervalrequest.md b/docs/models/operations/updateguardrailresetintervalrequest.md deleted file mode 100644 index 8e6f6716..00000000 --- a/docs/models/operations/updateguardrailresetintervalrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateGuardrailResetIntervalRequest - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { UpdateGuardrailResetIntervalRequest } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResetIntervalRequest = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresetintervalresponse.md b/docs/models/operations/updateguardrailresetintervalresponse.md deleted file mode 100644 index c4c13495..00000000 --- a/docs/models/operations/updateguardrailresetintervalresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateGuardrailResetIntervalResponse - -Interval at which the limit resets (daily, weekly, monthly) - -## Example Usage - -```typescript -import { UpdateGuardrailResetIntervalResponse } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResetIntervalResponse = "monthly"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"daily" | "weekly" | "monthly" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresponse.md b/docs/models/operations/updateguardrailresponse.md deleted file mode 100644 index 51f061f5..00000000 --- a/docs/models/operations/updateguardrailresponse.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateGuardrailResponse - -Guardrail updated successfully - -## Example Usage - -```typescript -import { UpdateGuardrailResponse } from "@openrouter/sdk/models/operations"; - -let value: UpdateGuardrailResponse = { - data: { - id: "550e8400-e29b-41d4-a716-446655440000", - name: "Updated Guardrail Name", - createdAt: "2025-08-24T10:30:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateGuardrailData](../../models/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/models/operations/updatekeysdata.md b/docs/models/operations/updatekeysdata.md index 834d4eb2..3fa06843 100644 --- a/docs/models/operations/updatekeysdata.md +++ b/docs/models/operations/updatekeysdata.md @@ -8,25 +8,25 @@ The updated API key information import { UpdateKeysData } from "@openrouter/sdk/models/operations"; let value: UpdateKeysData = { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "My Production Key", + includeByokInLimit: false, label: "sk-or-v1-0e6...1c96", - disabled: false, limit: 100, limitRemaining: 74.5, limitReset: "monthly", - includeByokInLimit: false, + name: "My Production Key", + updatedAt: "2025-08-24T15:45:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T15:45:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }; ``` @@ -34,23 +34,23 @@ let value: UpdateKeysData = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `creatorUserId` | *string* | :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` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | | `hash` | *string* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `label` | *string* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *boolean* | :heavy_check_mark: | Whether the API key is disabled | false | | `limit` | *number* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | | `limitRemaining` | *number* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | | `limitReset` | *string* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `includeByokInLimit` | *boolean* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `name` | *string* | :heavy_check_mark: | Name of the API key | My Production Key | +| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | | `usage` | *number* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | | `usageDaily` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usageWeekly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | | `usageMonthly` | *number* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byokUsage` | *number* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byokUsageDaily` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byokUsageWeekly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byokUsageMonthly` | *number* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updatedAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | -| `creatorUserId` | *string* | :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 +| `usageWeekly` | *number* | :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/models/operations/updatekeysrequest.md b/docs/models/operations/updatekeysrequest.md index c58123c8..874514ad 100644 --- a/docs/models/operations/updatekeysrequest.md +++ b/docs/models/operations/updatekeysrequest.md @@ -19,4 +19,4 @@ let value: UpdateKeysRequest = { | `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | | `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *string* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `requestBody` | [operations.UpdateKeysRequestBody](../../models/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 +| `requestBody` | [operations.UpdateKeysRequestBody](../../models/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/models/operations/updatekeysrequestbody.md b/docs/models/operations/updatekeysrequestbody.md index 6d05aec3..cba683aa 100644 --- a/docs/models/operations/updatekeysrequestbody.md +++ b/docs/models/operations/updatekeysrequestbody.md @@ -12,8 +12,8 @@ let value: UpdateKeysRequestBody = {}; | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | New name for the API key | Updated API Key Name | | `disabled` | *boolean* | :heavy_minus_sign: | Whether to disable the API key | false | +| `includeByokInLimit` | *boolean* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | | `limit` | *number* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 | | `limitReset` | [operations.UpdateKeysLimitReset](../../models/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 | -| `includeByokInLimit` | *boolean* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | \ No newline at end of file +| `name` | *string* | :heavy_minus_sign: | New name for the API key | Updated API Key Name | \ No newline at end of file diff --git a/docs/models/operations/updatekeysresponse.md b/docs/models/operations/updatekeysresponse.md index cd71a1d2..b27fe941 100644 --- a/docs/models/operations/updatekeysresponse.md +++ b/docs/models/operations/updatekeysresponse.md @@ -9,25 +9,25 @@ import { UpdateKeysResponse } from "@openrouter/sdk/models/operations"; let value: UpdateKeysResponse = { data: { + byokUsage: 17.38, + byokUsageDaily: 17.38, + byokUsageMonthly: 17.38, + byokUsageWeekly: 17.38, + createdAt: "2025-08-24T10:30:00Z", + creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + disabled: false, hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - name: "Updated API Key Name", + includeByokInLimit: true, label: "Updated API Key Name", - disabled: false, limit: 75, limitRemaining: 49.5, limitReset: "daily", - includeByokInLimit: true, + name: "Updated API Key Name", + updatedAt: "2025-08-24T16:00:00Z", usage: 25.5, usageDaily: 25.5, - usageWeekly: 25.5, usageMonthly: 25.5, - byokUsage: 17.38, - byokUsageDaily: 17.38, - byokUsageWeekly: 17.38, - byokUsageMonthly: 17.38, - createdAt: "2025-08-24T10:30:00Z", - updatedAt: "2025-08-24T16:00:00Z", - creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000", + usageWeekly: 25.5, }, }; ``` @@ -36,4 +36,4 @@ let value: UpdateKeysResponse = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateKeysData](../../models/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](../../models/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/models/operations/usage.md b/docs/models/operations/usage.md deleted file mode 100644 index 9fd02485..00000000 --- a/docs/models/operations/usage.md +++ /dev/null @@ -1,20 +0,0 @@ -# Usage - -## Example Usage - -```typescript -import { Usage } from "@openrouter/sdk/models/operations"; - -let value: Usage = { - promptTokens: 9797.96, - totalTokens: 7874.4, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `promptTokens` | *number* | :heavy_check_mark: | N/A | -| `totalTokens` | *number* | :heavy_check_mark: | N/A | -| `cost` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/web3data.md b/docs/models/operations/web3data.md deleted file mode 100644 index a47730ad..00000000 --- a/docs/models/operations/web3data.md +++ /dev/null @@ -1,35 +0,0 @@ -# Web3Data - -## Example Usage - -```typescript -import { Web3Data } from "@openrouter/sdk/models/operations"; - -let value: Web3Data = { - transferIntent: { - callData: { - deadline: "", - feeAmount: "", - id: "", - operator: "", - prefix: "", - recipient: "", - recipientAmount: "", - recipientCurrency: "", - refundDestination: "", - signature: "", - }, - metadata: { - chainId: 7497.17, - contractAddress: "", - sender: "", - }, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `transferIntent` | [operations.TransferIntent](../../models/operations/transferintent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/outputitemimagegenerationcall.md b/docs/models/outputitemimagegenerationcall.md index f4418126..ae881a91 100644 --- a/docs/models/outputitemimagegenerationcall.md +++ b/docs/models/outputitemimagegenerationcall.md @@ -6,11 +6,11 @@ import { OutputItemImageGenerationCall } from "@openrouter/sdk/models"; let value: OutputItemImageGenerationCall = { - type: "image_generation_call", id: "imagegen-abc123", result: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==", status: "completed", + type: "image_generation_call", }; ``` @@ -18,7 +18,7 @@ let value: OutputItemImageGenerationCall = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `type` | [models.OutputItemImageGenerationCallType](../models/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | | | `id` | *string* | :heavy_check_mark: | N/A | | | `result` | *string* | :heavy_minus_sign: | N/A | | -| `status` | [models.ImageGenerationStatus](../models/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file +| `status` | [models.ImageGenerationStatus](../models/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed | +| `type` | [models.OutputItemImageGenerationCallType](../models/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/outputmessage.md b/docs/models/outputmessage.md index e5657b7a..fe9ffd58 100644 --- a/docs/models/outputmessage.md +++ b/docs/models/outputmessage.md @@ -6,15 +6,15 @@ import { OutputMessage } from "@openrouter/sdk/models"; let value: OutputMessage = { - id: "msg-abc123", - role: "assistant", - type: "message", content: [ { - type: "output_text", text: "Hello! How can I help you today?", + type: "output_text", }, ], + id: "msg-abc123", + role: "assistant", + type: "message", }; ``` @@ -22,9 +22,9 @@ let value: OutputMessage = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content` | *models.OutputMessageContent*[] | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_check_mark: | N/A | +| `phase` | *models.OutputMessagePhaseUnion* | :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` | [models.OutputMessageRole](../models/outputmessagerole.md) | :heavy_check_mark: | N/A | -| `type` | [models.OutputMessageType](../models/outputmessagetype.md) | :heavy_check_mark: | N/A | | `status` | *models.OutputMessageStatusUnion* | :heavy_minus_sign: | N/A | -| `content` | *models.OutputMessageContent*[] | :heavy_check_mark: | N/A | -| `phase` | *models.OutputMessagePhaseUnion* | :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 +| `type` | [models.OutputMessageType](../models/outputmessagetype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/outputmessagecontent.md b/docs/models/outputmessagecontent.md index 24ed1552..d3e7a05b 100644 --- a/docs/models/outputmessagecontent.md +++ b/docs/models/outputmessagecontent.md @@ -7,8 +7,8 @@ ```typescript const value: models.ResponseOutputText = { - type: "output_text", text: "The capital of France is Paris.", + type: "output_text", }; ``` @@ -16,8 +16,8 @@ const value: models.ResponseOutputText = { ```typescript const value: models.OpenAIResponsesRefusalContent = { - type: "refusal", refusal: "I'm sorry, I cannot assist with that request", + type: "refusal", }; ``` diff --git a/docs/models/outputmodality.md b/docs/models/outputmodality.md index 1efcd8a3..8552be6c 100644 --- a/docs/models/outputmodality.md +++ b/docs/models/outputmodality.md @@ -13,5 +13,5 @@ let value: OutputModality = "text"; ## Values ```typescript -"text" | "image" | "embeddings" | "audio" | "video" | Unrecognized +"text" | "image" | "embeddings" | "audio" | "video" | "rerank" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/outputtokensdetails.md b/docs/models/outputtokensdetails.md index 294456ad..7d5103ff 100644 --- a/docs/models/outputtokensdetails.md +++ b/docs/models/outputtokensdetails.md @@ -6,7 +6,7 @@ import { OutputTokensDetails } from "@openrouter/sdk/models"; let value: OutputTokensDetails = { - reasoningTokens: 4785.27, + reasoningTokens: 478527, }; ``` diff --git a/docs/models/parameter.md b/docs/models/parameter.md index 90d4c5b2..ea3baf1a 100644 --- a/docs/models/parameter.md +++ b/docs/models/parameter.md @@ -13,5 +13,5 @@ let value: Parameter = "temperature"; ## Values ```typescript -"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" | Unrecognized +"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" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/pdfparserengine.md b/docs/models/pdfparserengine.md index 99aa61a7..dad11a13 100644 --- a/docs/models/pdfparserengine.md +++ b/docs/models/pdfparserengine.md @@ -8,7 +8,7 @@ The engine to use for parsing PDF files. "pdf-text" is deprecated and automatica ### `models.PDFParserEngineEnum` ```typescript -const value: models.PDFParserEngineEnum = "native"; +const value: models.PDFParserEngineEnum = "cloudflare-ai"; ``` ### `models.PDFParserEnginePDFText` diff --git a/docs/models/pdfparseroptions.md b/docs/models/pdfparseroptions.md index 6868a31d..b51efdb5 100644 --- a/docs/models/pdfparseroptions.md +++ b/docs/models/pdfparseroptions.md @@ -12,6 +12,6 @@ let value: PDFParserOptions = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `engine` | *models.PDFParserEngine* | :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` | *models.PDFParserEngine* | :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/models/perrequestlimits.md b/docs/models/perrequestlimits.md index df2c4efd..887aa4dc 100644 --- a/docs/models/perrequestlimits.md +++ b/docs/models/perrequestlimits.md @@ -8,8 +8,8 @@ Per-request token limits import { PerRequestLimits } from "@openrouter/sdk/models"; let value: PerRequestLimits = { - promptTokens: 1000, completionTokens: 1000, + promptTokens: 1000, }; ``` @@ -17,5 +17,5 @@ let value: PerRequestLimits = { | Field | Type | Required | Description | Example | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `promptTokens` | *number* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 | -| `completionTokens` | *number* | :heavy_check_mark: | Maximum completion tokens per request | 1000 | \ No newline at end of file +| `completionTokens` | *number* | :heavy_check_mark: | Maximum completion tokens per request | 1000 | +| `promptTokens` | *number* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 | \ No newline at end of file diff --git a/docs/models/pricing.md b/docs/models/pricing.md index 7f9e3da9..cf48d441 100644 --- a/docs/models/pricing.md +++ b/docs/models/pricing.md @@ -6,8 +6,8 @@ import { Pricing } from "@openrouter/sdk/models"; let value: Pricing = { - prompt: "1000", completion: "1000", + prompt: "1000", }; ``` @@ -15,17 +15,17 @@ let value: Pricing = { | Field | Type | Required | Description | Example | | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `prompt` | *string* | :heavy_check_mark: | N/A | 1000 | +| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `audioOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | | `completion` | *string* | :heavy_check_mark: | N/A | 1000 | -| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `discount` | *number* | :heavy_minus_sign: | N/A | | | `image` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `imageToken` | *string* | :heavy_minus_sign: | N/A | 1000 | | `imageOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audioOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `imageToken` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputAudioCache` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `webSearch` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `internalReasoning` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputCacheRead` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputCacheWrite` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `discount` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `internalReasoning` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `prompt` | *string* | :heavy_check_mark: | N/A | 1000 | +| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `webSearch` | *string* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/models/prompttokensdetails.md b/docs/models/prompttokensdetails.md index ccc55e39..4ef32473 100644 --- a/docs/models/prompttokensdetails.md +++ b/docs/models/prompttokensdetails.md @@ -14,7 +14,7 @@ let value: PromptTokensDetails = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `cachedTokens` | *number* | :heavy_minus_sign: | Cached prompt tokens | -| `cacheWriteTokens` | *number* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. | | `audioTokens` | *number* | :heavy_minus_sign: | Audio input tokens | +| `cacheWriteTokens` | *number* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. | +| `cachedTokens` | *number* | :heavy_minus_sign: | Cached prompt tokens | | `videoTokens` | *number* | :heavy_minus_sign: | Video input tokens | \ No newline at end of file diff --git a/docs/models/providerpreferences.md b/docs/models/providerpreferences.md index 306c9db4..995f52dc 100644 --- a/docs/models/providerpreferences.md +++ b/docs/models/providerpreferences.md @@ -1,6 +1,6 @@ # ProviderPreferences -Provider routing preferences for the request. +When multiple model providers are available, optionally indicate your routing preference. ## Example Usage @@ -15,15 +15,15 @@ let value: ProviderPreferences = {}; | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `allowFallbacks` | *boolean* | :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.
| | -| `requireParameters` | *boolean* | :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. | | | `dataCollection` | [models.DataCollection](../models/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` | *boolean* | :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 | | `enforceDistillableText` | *boolean* | :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` | *models.ProviderPreferencesOrder*[] | :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` | *models.ProviderPreferencesOnly*[] | :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` | *models.ProviderPreferencesIgnore*[] | :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` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | *models.ProviderPreferencesSortUnion* | :heavy_minus_sign: | N/A | price | -| `maxPrice` | [models.ProviderPreferencesMaxPrice](../models/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` | *models.Ignore*[] | :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"
] | +| `maxPrice` | [models.MaxPrice](../models/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` | *models.Only*[] | :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` | *models.Order*[] | :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"
] | +| `preferredMaxLatency` | *models.PreferredMaxLatency* | :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 | | `preferredMinThroughput` | *models.PreferredMinThroughput* | :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 | -| `preferredMaxLatency` | *models.PreferredMaxLatency* | :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` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | +| `requireParameters` | *boolean* | :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` | *models.Sort* | :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` | *boolean* | :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/models/providerpreferencesby.md b/docs/models/providerpreferencesby.md deleted file mode 100644 index 8fa6b2fc..00000000 --- a/docs/models/providerpreferencesby.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesBy - -The provider sorting strategy (price, throughput, latency) - -## Example Usage - -```typescript -import { ProviderPreferencesBy } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesBy = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesignore.md b/docs/models/providerpreferencesignore.md deleted file mode 100644 index d14a7d5e..00000000 --- a/docs/models/providerpreferencesignore.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesIgnore - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencesmaxprice.md b/docs/models/providerpreferencesmaxprice.md deleted file mode 100644 index 329af3fb..00000000 --- a/docs/models/providerpreferencesmaxprice.md +++ /dev/null @@ -1,21 +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. - -## Example Usage - -```typescript -import { ProviderPreferencesMaxPrice } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesMaxPrice = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `prompt` | *string* | :heavy_minus_sign: | Price per million prompt tokens | 1000 | -| `completion` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `image` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/models/providerpreferencesonly.md b/docs/models/providerpreferencesonly.md deleted file mode 100644 index 9240a5ee..00000000 --- a/docs/models/providerpreferencesonly.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesOnly - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencesorder.md b/docs/models/providerpreferencesorder.md deleted file mode 100644 index 0937f38f..00000000 --- a/docs/models/providerpreferencesorder.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesOrder - - -## Supported Types - -### `models.ProviderName` - -```typescript -const value: models.ProviderName = "OpenAI"; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/providerpreferencespartition.md b/docs/models/providerpreferencespartition.md deleted file mode 100644 index 3c1d3ffe..00000000 --- a/docs/models/providerpreferencespartition.md +++ /dev/null @@ -1,19 +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. - -## Example Usage - -```typescript -import { ProviderPreferencesPartition } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesPartition = "model"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"model" | "none" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersort.md b/docs/models/providerpreferencesprovidersort.md deleted file mode 100644 index e9b44bf1..00000000 --- a/docs/models/providerpreferencesprovidersort.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesProviderSort - -The provider sorting strategy (price, throughput, latency) - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSort } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSort = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfig.md b/docs/models/providerpreferencesprovidersortconfig.md deleted file mode 100644 index 5fe0b816..00000000 --- a/docs/models/providerpreferencesprovidersortconfig.md +++ /dev/null @@ -1,16 +0,0 @@ -# ProviderPreferencesProviderSortConfig - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSortConfig } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSortConfig = {}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `by` | [models.ProviderPreferencesBy](../models/providerpreferencesby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price | -| `partition` | [models.ProviderPreferencesPartition](../models/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/models/providerpreferencesprovidersortconfigenum.md b/docs/models/providerpreferencesprovidersortconfigenum.md deleted file mode 100644 index 488f7814..00000000 --- a/docs/models/providerpreferencesprovidersortconfigenum.md +++ /dev/null @@ -1,15 +0,0 @@ -# ProviderPreferencesProviderSortConfigEnum - -## Example Usage - -```typescript -import { ProviderPreferencesProviderSortConfigEnum } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesProviderSortConfigEnum = "price"; -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" -``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfigunion.md b/docs/models/providerpreferencesprovidersortconfigunion.md deleted file mode 100644 index ae0d8d18..00000000 --- a/docs/models/providerpreferencesprovidersortconfigunion.md +++ /dev/null @@ -1,19 +0,0 @@ -# ProviderPreferencesProviderSortConfigUnion - -The provider sorting strategy (price, throughput, latency) - - -## Supported Types - -### `models.ProviderPreferencesProviderSortConfig` - -```typescript -const value: models.ProviderPreferencesProviderSortConfig = {}; -``` - -### `models.ProviderPreferencesProviderSortConfigEnum` - -```typescript -const value: models.ProviderPreferencesProviderSortConfigEnum = "exacto"; -``` - diff --git a/docs/models/providerpreferencessortenum.md b/docs/models/providerpreferencessortenum.md deleted file mode 100644 index ed6e30ea..00000000 --- a/docs/models/providerpreferencessortenum.md +++ /dev/null @@ -1,17 +0,0 @@ -# ProviderPreferencesSortEnum - -## Example Usage - -```typescript -import { ProviderPreferencesSortEnum } from "@openrouter/sdk/models"; - -let value: ProviderPreferencesSortEnum = "price"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"price" | "throughput" | "latency" | "exacto" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/providerpreferencessortunion.md b/docs/models/providerpreferencessortunion.md deleted file mode 100644 index c71c5597..00000000 --- a/docs/models/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 - -### `models.ProviderPreferencesProviderSort` - -```typescript -const value: models.ProviderPreferencesProviderSort = "price"; -``` - -### `models.ProviderPreferencesProviderSortConfigUnion` - -```typescript -const value: models.ProviderPreferencesProviderSortConfigUnion = "price"; -``` - -### `models.ProviderPreferencesSortEnum` - -```typescript -const value: models.ProviderPreferencesSortEnum = "price"; -``` - diff --git a/docs/models/publicendpoint.md b/docs/models/publicendpoint.md index d334bf19..f0c44d33 100644 --- a/docs/models/publicendpoint.md +++ b/docs/models/publicendpoint.md @@ -8,38 +8,40 @@ Information about a specific model endpoint import { PublicEndpoint } from "@openrouter/sdk/models"; let value: PublicEndpoint = { - name: "OpenAI: GPT-4", + contextLength: 8192, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + maxCompletionTokens: 4096, + maxPromptTokens: 8192, modelId: "openai/gpt-4", modelName: "GPT-4", - contextLength: 8192, + name: "OpenAI: GPT-4", pricing: { - prompt: "0.00003", completion: "0.00006", + prompt: "0.00003", }, providerName: "OpenAI", - tag: "openai", quantization: "fp16", - maxCompletionTokens: 4096, - maxPromptTokens: 8192, supportedParameters: [ "temperature", "top_p", "max_tokens", ], - uptimeLast30m: 99.5, supportsImplicitCaching: true, - latencyLast30m: { - p50: 0.25, - p75: 0.35, - p90: 0.48, - p99: 0.85, - }, + tag: "openai", throughputLast30m: { p50: 45.2, p75: 38.5, p90: 28.3, p99: 15.1, }, + uptimeLast1d: 99.8, + uptimeLast30m: 99.5, + uptimeLast5m: 100, }; ``` @@ -47,19 +49,21 @@ let value: PublicEndpoint = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | | +| `contextLength` | *number* | :heavy_check_mark: | N/A | | +| `latencyLast30m` | [models.PercentileStats](../models/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
} | +| `maxCompletionTokens` | *number* | :heavy_check_mark: | N/A | | +| `maxPromptTokens` | *number* | :heavy_check_mark: | N/A | | | `modelId` | *string* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 | | `modelName` | *string* | :heavy_check_mark: | N/A | | -| `contextLength` | *number* | :heavy_check_mark: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | | `pricing` | [models.Pricing](../models/pricing.md) | :heavy_check_mark: | N/A | | | `providerName` | [models.ProviderName](../models/providername.md) | :heavy_check_mark: | N/A | OpenAI | -| `tag` | *string* | :heavy_check_mark: | N/A | | | `quantization` | [models.PublicEndpointQuantization](../models/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 | -| `maxCompletionTokens` | *number* | :heavy_check_mark: | N/A | | -| `maxPromptTokens` | *number* | :heavy_check_mark: | N/A | | -| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | N/A | | | `status` | [models.EndpointStatus](../models/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | -| `uptimeLast30m` | *number* | :heavy_check_mark: | N/A | | +| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | N/A | | | `supportsImplicitCaching` | *boolean* | :heavy_check_mark: | N/A | | -| `latencyLast30m` | [models.PercentileStats](../models/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. | | -| `throughputLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `tag` | *string* | :heavy_check_mark: | N/A | | +| `throughputLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | N/A | {
"p50": 25.5,
"p75": 35.2,
"p90": 48.7,
"p99": 85.3
} | +| `uptimeLast1d` | *number* | :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. | | +| `uptimeLast30m` | *number* | :heavy_check_mark: | N/A | | +| `uptimeLast5m` | *number* | :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/models/publicpricing.md b/docs/models/publicpricing.md index 28039777..2496d902 100644 --- a/docs/models/publicpricing.md +++ b/docs/models/publicpricing.md @@ -8,8 +8,8 @@ Pricing information for the model import { PublicPricing } from "@openrouter/sdk/models"; let value: PublicPricing = { - prompt: "0.00003", completion: "0.00006", + prompt: "0.00003", }; ``` @@ -17,17 +17,17 @@ let value: PublicPricing = { | Field | Type | Required | Description | Example | | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `prompt` | *string* | :heavy_check_mark: | N/A | 1000 | +| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `audioOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | | `completion` | *string* | :heavy_check_mark: | N/A | 1000 | -| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `discount` | *number* | :heavy_minus_sign: | N/A | | | `image` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `imageToken` | *string* | :heavy_minus_sign: | N/A | 1000 | | `imageOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audio` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `audioOutput` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `imageToken` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputAudioCache` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `webSearch` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `internalReasoning` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputCacheRead` | *string* | :heavy_minus_sign: | N/A | 1000 | | `inputCacheWrite` | *string* | :heavy_minus_sign: | N/A | 1000 | -| `discount` | *number* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `internalReasoning` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `prompt` | *string* | :heavy_check_mark: | N/A | 1000 | +| `request` | *string* | :heavy_minus_sign: | N/A | 1000 | +| `webSearch` | *string* | :heavy_minus_sign: | N/A | 1000 | \ No newline at end of file diff --git a/docs/models/reasoning.md b/docs/models/reasoning.md index f595b98f..f3909245 100644 --- a/docs/models/reasoning.md +++ b/docs/models/reasoning.md @@ -12,7 +12,7 @@ let value: Reasoning = {}; ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `effort` | [models.Effort](../models/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium | -| `summary` | *any* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `effort` | [models.Effort](../models/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium | +| `summary` | [models.ChatReasoningSummaryVerbosityEnum](../models/chatreasoningsummaryverbosityenum.md) | :heavy_minus_sign: | N/A | concise | \ No newline at end of file diff --git a/docs/models/reasoningdetailencrypted.md b/docs/models/reasoningdetailencrypted.md index 42f226cb..6c9b6188 100644 --- a/docs/models/reasoningdetailencrypted.md +++ b/docs/models/reasoningdetailencrypted.md @@ -8,17 +8,17 @@ Reasoning detail encrypted schema import { ReasoningDetailEncrypted } from "@openrouter/sdk/models"; let value: ReasoningDetailEncrypted = { - type: "reasoning.encrypted", data: "", + type: "reasoning.encrypted", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `type` | *"reasoning.encrypted"* | :heavy_check_mark: | N/A | -| `data` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailEncryptedFormat](../models/reasoningdetailencryptedformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `data` | *string* | :heavy_check_mark: | N/A | | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `index` | *number* | :heavy_minus_sign: | N/A | | +| `type` | *"reasoning.encrypted"* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailencryptedformat.md b/docs/models/reasoningdetailencryptedformat.md deleted file mode 100644 index 6a53e623..00000000 --- a/docs/models/reasoningdetailencryptedformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailEncryptedFormat - -## Example Usage - -```typescript -import { ReasoningDetailEncryptedFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailEncryptedFormat = "xai-responses-v1"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/reasoningdetailsummary.md b/docs/models/reasoningdetailsummary.md index 85c377e2..3fdbd958 100644 --- a/docs/models/reasoningdetailsummary.md +++ b/docs/models/reasoningdetailsummary.md @@ -8,18 +8,18 @@ Reasoning detail summary schema import { ReasoningDetailSummary } from "@openrouter/sdk/models"; let value: ReasoningDetailSummary = { - type: "reasoning.summary", summary: "The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...", + type: "reasoning.summary", }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | *"reasoning.summary"* | :heavy_check_mark: | N/A | -| `summary` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailSummaryFormat](../models/reasoningdetailsummaryformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `index` | *number* | :heavy_minus_sign: | N/A | | +| `summary` | *string* | :heavy_check_mark: | N/A | | +| `type` | *"reasoning.summary"* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailsummaryformat.md b/docs/models/reasoningdetailsummaryformat.md deleted file mode 100644 index 62cf8a26..00000000 --- a/docs/models/reasoningdetailsummaryformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailSummaryFormat - -## Example Usage - -```typescript -import { ReasoningDetailSummaryFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailSummaryFormat = "unknown"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/reasoningdetailtext.md b/docs/models/reasoningdetailtext.md index 0a428c24..97dd1233 100644 --- a/docs/models/reasoningdetailtext.md +++ b/docs/models/reasoningdetailtext.md @@ -14,11 +14,11 @@ let value: ReasoningDetailText = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `type` | *"reasoning.text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_minus_sign: | N/A | -| `signature` | *string* | :heavy_minus_sign: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.ReasoningDetailTextFormat](../models/reasoningdetailtextformat.md) | :heavy_minus_sign: | N/A | -| `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `format` | [models.ReasoningFormat](../models/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `index` | *number* | :heavy_minus_sign: | N/A | | +| `signature` | *string* | :heavy_minus_sign: | N/A | | +| `text` | *string* | :heavy_minus_sign: | N/A | | +| `type` | *"reasoning.text"* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/reasoningdetailtextformat.md b/docs/models/reasoningdetailtextformat.md deleted file mode 100644 index b1a3b686..00000000 --- a/docs/models/reasoningdetailtextformat.md +++ /dev/null @@ -1,17 +0,0 @@ -# ReasoningDetailTextFormat - -## Example Usage - -```typescript -import { ReasoningDetailTextFormat } from "@openrouter/sdk/models"; - -let value: ReasoningDetailTextFormat = "xai-responses-v1"; - -// Open enum: unrecognized values are captured as Unrecognized -``` - -## Values - -```typescript -"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized -``` \ No newline at end of file diff --git a/docs/models/reasoningdetailunion.md b/docs/models/reasoningdetailunion.md index 88328d82..c0e5e40d 100644 --- a/docs/models/reasoningdetailunion.md +++ b/docs/models/reasoningdetailunion.md @@ -5,22 +5,22 @@ Reasoning detail union schema ## Supported Types -### `models.ReasoningDetailSummary` +### `models.ReasoningDetailEncrypted` ```typescript -const value: models.ReasoningDetailSummary = { - type: "reasoning.summary", - summary: - "The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...", +const value: models.ReasoningDetailEncrypted = { + data: "", + type: "reasoning.encrypted", }; ``` -### `models.ReasoningDetailEncrypted` +### `models.ReasoningDetailSummary` ```typescript -const value: models.ReasoningDetailEncrypted = { - type: "reasoning.encrypted", - data: "", +const value: models.ReasoningDetailSummary = { + summary: + "The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...", + type: "reasoning.summary", }; ``` diff --git a/docs/models/reasoningsummarytext.md b/docs/models/reasoningsummarytext.md index 6ee39e82..938c8a74 100644 --- a/docs/models/reasoningsummarytext.md +++ b/docs/models/reasoningsummarytext.md @@ -6,8 +6,8 @@ import { ReasoningSummaryText } from "@openrouter/sdk/models"; let value: ReasoningSummaryText = { - type: "summary_text", text: "Analyzed the problem using first principles", + type: "summary_text", }; ``` @@ -15,5 +15,5 @@ let value: ReasoningSummaryText = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | [models.ReasoningSummaryTextType](../models/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `text` | *string* | :heavy_check_mark: | N/A | +| `type` | [models.ReasoningSummaryTextType](../models/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/reasoningtextcontent.md b/docs/models/reasoningtextcontent.md index 81b29705..33a49d75 100644 --- a/docs/models/reasoningtextcontent.md +++ b/docs/models/reasoningtextcontent.md @@ -6,8 +6,8 @@ import { ReasoningTextContent } from "@openrouter/sdk/models"; let value: ReasoningTextContent = { - type: "reasoning_text", text: "Let me think step by step about this problem...", + type: "reasoning_text", }; ``` @@ -15,5 +15,5 @@ let value: ReasoningTextContent = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | [models.ReasoningTextContentType](../models/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `text` | *string* | :heavy_check_mark: | N/A | +| `type` | [models.ReasoningTextContentType](../models/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseformat.md b/docs/models/responseformat.md index 229fe6f8..85828f02 100644 --- a/docs/models/responseformat.md +++ b/docs/models/responseformat.md @@ -5,11 +5,12 @@ Response format configuration ## Supported Types -### `models.ChatFormatTextConfig` +### `models.ChatFormatGrammarConfig` ```typescript -const value: models.ChatFormatTextConfig = { - type: "text", +const value: models.ChatFormatGrammarConfig = { + grammar: "root ::= \"yes\" | \"no\"", + type: "grammar", }; ``` @@ -25,27 +26,26 @@ const value: models.FormatJsonObjectConfig = { ```typescript const value: models.ChatFormatJsonSchemaConfig = { - type: "json_schema", jsonSchema: { name: "math_response", }, + type: "json_schema", }; ``` -### `models.ChatFormatGrammarConfig` +### `models.ChatFormatPythonConfig` ```typescript -const value: models.ChatFormatGrammarConfig = { - type: "grammar", - grammar: "root ::= \"yes\" | \"no\"", +const value: models.ChatFormatPythonConfig = { + type: "python", }; ``` -### `models.ChatFormatPythonConfig` +### `models.ChatFormatTextConfig` ```typescript -const value: models.ChatFormatPythonConfig = { - type: "python", +const value: models.ChatFormatTextConfig = { + type: "text", }; ``` diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index 76338eb3..30fab527 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -6,16 +6,16 @@ import { ResponseOutputText } from "@openrouter/sdk/models"; let value: ResponseOutputText = { - type: "output_text", text: "The capital of France is Paris.", + type: "output_text", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *"output_text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | -| `logprobs` | [models.ResponseOutputTextLogprob](../models/responseoutputtextlogprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | +| `logprobs` | [models.Logprob](../models/logprob.md)[] | :heavy_minus_sign: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `type` | *"output_text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseoutputtexttoplogprob.md b/docs/models/responseoutputtexttoplogprob.md index 9e5fada5..9c09574b 100644 --- a/docs/models/responseoutputtexttoplogprob.md +++ b/docs/models/responseoutputtexttoplogprob.md @@ -6,12 +6,12 @@ import { ResponseOutputTextTopLogprob } from "@openrouter/sdk/models"; let value: ResponseOutputTextTopLogprob = { - token: "", bytes: [ - 3036.17, - 344.14, + 303617, + 34414, ], logprob: 1976.4, + token: "", }; ``` @@ -19,6 +19,6 @@ let value: ResponseOutputTextTopLogprob = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `token` | *string* | :heavy_check_mark: | N/A | | `bytes` | *number*[] | :heavy_check_mark: | N/A | -| `logprob` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `logprob` | *number* | :heavy_check_mark: | N/A | +| `token` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tokenizer.md b/docs/models/tokenizer.md index 38a08a8f..c8cb31d3 100644 --- a/docs/models/tokenizer.md +++ b/docs/models/tokenizer.md @@ -15,5 +15,5 @@ let value: Tokenizer = "GPT"; ## Values ```typescript -"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized +"Router" | "Media" | "Other" | "GPT" | "Claude" | "Gemini" | "Gemma" | "Grok" | "Cohere" | "Nova" | "Qwen" | "Yi" | "DeepSeek" | "Mistral" | "Llama2" | "Llama3" | "Llama4" | "PaLM" | "RWKV" | "Qwen3" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/topproviderinfo.md b/docs/models/topproviderinfo.md index e318660c..13b362bc 100644 --- a/docs/models/topproviderinfo.md +++ b/docs/models/topproviderinfo.md @@ -17,5 +17,5 @@ let value: TopProviderInfo = { | Field | Type | Required | Description | Example | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | `contextLength` | *number* | :heavy_minus_sign: | Context length from the top provider | 8192 | -| `maxCompletionTokens` | *number* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 | -| `isModerated` | *boolean* | :heavy_check_mark: | Whether the top provider moderates content | true | \ No newline at end of file +| `isModerated` | *boolean* | :heavy_check_mark: | Whether the top provider moderates content | true | +| `maxCompletionTokens` | *number* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 | \ No newline at end of file diff --git a/docs/models/urlcitation.md b/docs/models/urlcitation.md index 284cac10..3b7bed47 100644 --- a/docs/models/urlcitation.md +++ b/docs/models/urlcitation.md @@ -6,11 +6,11 @@ import { URLCitation } from "@openrouter/sdk/models"; let value: URLCitation = { + endIndex: 827156, + startIndex: 720244, + title: "", type: "url_citation", - url: "https://openrouter.ai/docs", - title: "OpenRouter Documentation", - startIndex: 0, - endIndex: 42, + url: "https://snappy-decision.biz", }; ``` @@ -18,8 +18,8 @@ let value: URLCitation = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *"url_citation"* | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `title` | *string* | :heavy_check_mark: | N/A | +| `endIndex` | *number* | :heavy_check_mark: | N/A | | `startIndex` | *number* | :heavy_check_mark: | N/A | -| `endIndex` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| `title` | *string* | :heavy_check_mark: | N/A | +| `type` | *"url_citation"* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/variables.md b/docs/models/variables.md index af35d730..b49ee124 100644 --- a/docs/models/variables.md +++ b/docs/models/variables.md @@ -13,8 +13,8 @@ const value: string = ""; ```typescript const value: models.InputText = { - type: "input_text", text: "Hello, how can I help you?", + type: "input_text", }; ``` @@ -22,8 +22,8 @@ const value: models.InputText = { ```typescript const value: models.InputImage = { - type: "input_image", detail: "auto", + type: "input_image", }; ``` diff --git a/docs/models/websearchengine.md b/docs/models/websearchengine.md index cc70585e..142e52f7 100644 --- a/docs/models/websearchengine.md +++ b/docs/models/websearchengine.md @@ -7,7 +7,7 @@ The search engine to use for web search. ```typescript import { WebSearchEngine } from "@openrouter/sdk/models"; -let value: WebSearchEngine = "native"; +let value: WebSearchEngine = "exa"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index d74a2206..ffc84727 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -75,7 +75,7 @@ run(); ### Response -**Promise\<[operations.GetUserActivityResponse](../../models/operations/getuseractivityresponse.md)\>** +**Promise\<[models.ActivityResponse](../../models/activityresponse.md)\>** ### Errors @@ -84,5 +84,6 @@ run(); | 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 d5424399..7ea37a8b 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -6,20 +6,20 @@ API key management endpoints ### Available Operations +* [getCurrentKeyMetadata](#getcurrentkeymetadata) - 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 -* [getCurrentKeyMetadata](#getcurrentkeymetadata) - Get current API key +* [update](#update) - Update an API key -## list +## getCurrentKeyMetadata -List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Get information on the API key associated with the current authentication session ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -31,7 +31,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.apiKeys.list(); + const result = await openRouter.apiKeys.getCurrentKeyMetadata(); console.log(result); } @@ -45,7 +45,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { apiKeysList } from "@openrouter/sdk/funcs/apiKeysList.js"; +import { apiKeysGetCurrentKeyMetadata } from "@openrouter/sdk/funcs/apiKeysGetCurrentKeyMetadata.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -57,12 +57,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await apiKeysList(openRouter); + const res = await apiKeysGetCurrentKeyMetadata(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("apiKeysList failed:", res.error); + console.log("apiKeysGetCurrentKeyMetadata failed:", res.error); } } @@ -73,31 +73,30 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRequest](../../models/operations/listrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetCurrentKeyRequest](../../models/operations/getcurrentkeyrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListResponse](../../models/operations/listresponse.md)\>** +**Promise\<[operations.GetCurrentKeyResponse](../../models/operations/getcurrentkeyresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.UnauthorizedResponseError | 401 | application/json | -| errors.TooManyRequestsResponseError | 429 | application/json | -| errors.InternalServerResponseError | 500 | application/json | -| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## create +## list -Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -109,11 +108,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.apiKeys.create({ - requestBody: { - name: "My New API Key", - }, - }); + const result = await openRouter.apiKeys.list(); console.log(result); } @@ -127,7 +122,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { apiKeysCreate } from "@openrouter/sdk/funcs/apiKeysCreate.js"; +import { apiKeysList } from "@openrouter/sdk/funcs/apiKeysList.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -139,16 +134,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await apiKeysCreate(openRouter, { - requestBody: { - name: "My New API Key", - }, - }); + const res = await apiKeysList(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("apiKeysCreate failed:", res.error); + console.log("apiKeysList failed:", res.error); } } @@ -159,32 +150,31 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateKeysRequest](../../models/operations/createkeysrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListRequest](../../models/operations/listrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CreateKeysResponse](../../models/operations/createkeysresponse.md)\>** +**Promise\<[operations.ListResponse](../../models/operations/listresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | | errors.TooManyRequestsResponseError | 429 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## update +## create -Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -196,9 +186,14 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.apiKeys.update({ - hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - requestBody: {}, + const result = await openRouter.apiKeys.create({ + requestBody: { + expiresAt: new Date("2027-12-31T23:59:59Z"), + includeByokInLimit: true, + limit: 50, + limitReset: "monthly", + name: "My New API Key", + }, }); console.log(result); @@ -213,7 +208,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { apiKeysUpdate } from "@openrouter/sdk/funcs/apiKeysUpdate.js"; +import { apiKeysCreate } from "@openrouter/sdk/funcs/apiKeysCreate.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -225,15 +220,20 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await apiKeysUpdate(openRouter, { - hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", - requestBody: {}, + const res = await apiKeysCreate(openRouter, { + requestBody: { + expiresAt: new Date("2027-12-31T23:59:59Z"), + includeByokInLimit: true, + limit: 50, + limitReset: "monthly", + name: "My New API Key", + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("apiKeysUpdate failed:", res.error); + console.log("apiKeysCreate failed:", res.error); } } @@ -244,14 +244,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateKeysRequest](../../models/operations/updatekeysrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateKeysRequest](../../models/operations/createkeysrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.UpdateKeysResponse](../../models/operations/updatekeysresponse.md)\>** +**Promise\<[operations.CreateKeysResponse](../../models/operations/createkeysresponse.md)\>** ### Errors @@ -259,7 +259,6 @@ run(); | ----------------------------------- | ----------------------------------- | ----------------------------------- | | 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 | \*/\* | @@ -430,13 +429,13 @@ run(); | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## getCurrentKeyMetadata +## 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 - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -448,7 +447,16 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.apiKeys.getCurrentKeyMetadata(); + const result = await openRouter.apiKeys.update({ + hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", + requestBody: { + disabled: false, + includeByokInLimit: true, + limit: 75, + limitReset: "daily", + name: "Updated API Key Name", + }, + }); console.log(result); } @@ -462,7 +470,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { apiKeysGetCurrentKeyMetadata } from "@openrouter/sdk/funcs/apiKeysGetCurrentKeyMetadata.js"; +import { apiKeysUpdate } from "@openrouter/sdk/funcs/apiKeysUpdate.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -474,12 +482,21 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await apiKeysGetCurrentKeyMetadata(openRouter); + const res = await apiKeysUpdate(openRouter, { + hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", + requestBody: { + disabled: false, + includeByokInLimit: true, + limit: 75, + limitReset: "daily", + name: "Updated API Key Name", + }, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("apiKeysGetCurrentKeyMetadata failed:", res.error); + console.log("apiKeysUpdate failed:", res.error); } } @@ -490,19 +507,22 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCurrentKeyRequest](../../models/operations/getcurrentkeyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateKeysRequest](../../models/operations/updatekeysrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetCurrentKeyResponse](../../models/operations/getcurrentkeyresponse.md)\>** +**Promise\<[operations.UpdateKeysResponse](../../models/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 bebcd579..b36b2ad6 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -26,16 +26,18 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.chat.send({ chatRequest: { + maxTokens: 150, messages: [ { - role: "system", content: "You are a helpful assistant.", + role: "system", }, { - role: "user", content: "What is the capital of France?", + role: "user", }, ], + model: "openai/gpt-4", temperature: 0.7, }, }); @@ -66,16 +68,18 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await chatSend(openRouter, { chatRequest: { + maxTokens: 150, messages: [ { - role: "system", content: "You are a helpful assistant.", + role: "system", }, { - role: "user", content: "What is the capital of France?", + role: "user", }, ], + model: "openai/gpt-4", temperature: 0.7, }, }); diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md index ee5a6600..a902be6f 100644 --- a/docs/sdks/credits/README.md +++ b/docs/sdks/credits/README.md @@ -7,7 +7,6 @@ Credit management endpoints ### Available Operations * [getCredits](#getcredits) - Get remaining credits -* [createCoinbaseCharge](#createcoinbasecharge) - Create a Coinbase charge for crypto payment ## getCredits @@ -85,98 +84,4 @@ run(); | errors.UnauthorizedResponseError | 401 | application/json | | errors.ForbiddenResponseError | 403 | application/json | | errors.InternalServerResponseError | 500 | application/json | -| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | - -## createCoinbaseCharge - -Create a Coinbase charge for crypto payment - -### Example Usage - - -```typescript -import { OpenRouter } from "@openrouter/sdk"; - -const openRouter = new OpenRouter({ - httpReferer: "", - appTitle: "", - appCategories: "", -}); - -async function run() { - const result = await openRouter.credits.createCoinbaseCharge({ - bearer: process.env["OPENROUTER_BEARER"] ?? "", - }, { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, - }); - - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { creditsCreateCoinbaseCharge } from "@openrouter/sdk/funcs/creditsCreateCoinbaseCharge.js"; - -// Use `OpenRouterCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const openRouter = new OpenRouterCore({ - httpReferer: "", - appTitle: "", - appCategories: "", -}); - -async function run() { - const res = await creditsCreateCoinbaseCharge(openRouter, { - bearer: process.env["OPENROUTER_BEARER"] ?? "", - }, { - createChargeRequest: { - amount: 100, - sender: "0x1234567890123456789012345678901234567890", - chainId: 1, - }, - }); - if (res.ok) { - const { value: result } = res; - console.log(result); - } else { - console.log("creditsCreateCoinbaseCharge failed:", res.error); - } -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateCoinbaseChargeRequest](../../models/operations/createcoinbasechargerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `security` | [operations.CreateCoinbaseChargeSecurity](../../models/operations/createcoinbasechargesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateCoinbaseChargeResponse](../../models/operations/createcoinbasechargeresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.BadRequestResponseError | 400 | application/json | -| errors.UnauthorizedResponseError | 401 | application/json | -| errors.TooManyRequestsResponseError | 429 | application/json | -| errors.InternalServerResponseError | 500 | 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 286acc1a..835b2250 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -29,8 +29,8 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.embeddings.generate({ requestBody: { - input: "", - model: "Taurus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }); @@ -60,8 +60,8 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await embeddingsGenerate(openRouter, { requestBody: { - input: "", - model: "Taurus", + input: "The quick brown fox jumps over the lazy dog", + model: "openai/text-embedding-3-small", }, }); if (res.ok) { diff --git a/docs/sdks/endpoints/README.md b/docs/sdks/endpoints/README.md index 6e24546b..a06c00ed 100644 --- a/docs/sdks/endpoints/README.md +++ b/docs/sdks/endpoints/README.md @@ -6,16 +6,16 @@ Endpoint information ### Available Operations -* [list](#list) - List all endpoints for a model * [listZdrEndpoints](#listzdrendpoints) - Preview the impact of ZDR on the available endpoints +* [list](#list) - List all endpoints for a model -## list +## listZdrEndpoints -List all endpoints for a model +Preview the impact of ZDR on the available endpoints ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -27,10 +27,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.endpoints.list({ - author: "", - slug: "", - }); + const result = await openRouter.endpoints.listZdrEndpoints(); console.log(result); } @@ -44,7 +41,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { endpointsList } from "@openrouter/sdk/funcs/endpointsList.js"; +import { endpointsListZdrEndpoints } from "@openrouter/sdk/funcs/endpointsListZdrEndpoints.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -56,15 +53,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await endpointsList(openRouter, { - author: "", - slug: "", - }); + const res = await endpointsListZdrEndpoints(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("endpointsList failed:", res.error); + console.log("endpointsListZdrEndpoints failed:", res.error); } } @@ -75,30 +69,29 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListEndpointsRequest](../../models/operations/listendpointsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListEndpointsZdrRequest](../../models/operations/listendpointszdrrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListEndpointsResponse](../../models/operations/listendpointsresponse.md)\>** +**Promise\<[operations.ListEndpointsZdrResponse](../../models/operations/listendpointszdrresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.NotFoundResponseError | 404 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## listZdrEndpoints +## list -Preview the impact of ZDR on the available endpoints +List all endpoints for a model ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -110,7 +103,10 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.endpoints.listZdrEndpoints(); + const result = await openRouter.endpoints.list({ + author: "", + slug: "", + }); console.log(result); } @@ -124,7 +120,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { endpointsListZdrEndpoints } from "@openrouter/sdk/funcs/endpointsListZdrEndpoints.js"; +import { endpointsList } from "@openrouter/sdk/funcs/endpointsList.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -136,12 +132,15 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await endpointsListZdrEndpoints(openRouter); + const res = await endpointsList(openRouter, { + author: "", + slug: "", + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("endpointsListZdrEndpoints failed:", res.error); + console.log("endpointsList failed:", res.error); } } @@ -152,18 +151,19 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListEndpointsZdrRequest](../../models/operations/listendpointszdrrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListEndpointsRequest](../../models/operations/listendpointsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListEndpointsZdrResponse](../../models/operations/listendpointszdrresponse.md)\>** +**Promise\<[operations.ListEndpointsResponse](../../models/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/guardrails/README.md b/docs/sdks/guardrails/README.md index e55ef8b0..ad218683 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 -* [listKeyAssignments](#listkeyassignments) - List all key assignments -* [listMemberAssignments](#listmemberassignments) - List all member assignments * [listGuardrailKeyAssignments](#listguardrailkeyassignments) - List key assignments for a guardrail * [bulkAssignKeys](#bulkassignkeys) - Bulk assign keys to a guardrail +* [bulkUnassignKeys](#bulkunassignkeys) - Bulk unassign keys from a guardrail * [listGuardrailMemberAssignments](#listguardrailmemberassignments) - List member assignments for a guardrail * [bulkAssignMembers](#bulkassignmembers) - Bulk assign members to a guardrail -* [bulkUnassignKeys](#bulkunassignkeys) - Bulk unassign keys from a guardrail * [bulkUnassignMembers](#bulkunassignmembers) - Bulk unassign members from a guardrail +* [listKeyAssignments](#listkeyassignments) - List all key assignments +* [listMemberAssignments](#listmemberassignments) - List all member assignments ## list @@ -40,7 +40,9 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.list(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -67,7 +69,9 @@ async function run() { const res = await guardrailsList(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { console.log("guardrailsList failed:", res.error); } @@ -116,8 +120,19 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.guardrails.create({ - requestBody: { + createGuardrailRequest: { + allowedModels: null, + allowedProviders: [ + "openai", + "anthropic", + "deepseek", + ], + description: "A guardrail for limiting API usage", + enforceZdr: false, + ignoredProviders: null, + limitUsd: 50, name: "My New Guardrail", + resetInterval: "monthly", }, }); @@ -146,8 +161,19 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await guardrailsCreate(openRouter, { - requestBody: { + createGuardrailRequest: { + allowedModels: null, + allowedProviders: [ + "openai", + "anthropic", + "deepseek", + ], + description: "A guardrail for limiting API usage", + enforceZdr: false, + ignoredProviders: null, + limitUsd: 50, name: "My New Guardrail", + resetInterval: "monthly", }, }); if (res.ok) { @@ -172,7 +198,7 @@ run(); ### Response -**Promise\<[operations.CreateGuardrailResponse](../../models/operations/createguardrailresponse.md)\>** +**Promise\<[models.CreateGuardrailResponse](../../models/createguardrailresponse.md)\>** ### Errors @@ -183,13 +209,13 @@ run(); | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## get +## delete -Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -201,7 +227,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.get({ + const result = await openRouter.guardrails.delete({ id: "550e8400-e29b-41d4-a716-446655440000", }); @@ -217,7 +243,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsGet } from "@openrouter/sdk/funcs/guardrailsGet.js"; +import { guardrailsDelete } from "@openrouter/sdk/funcs/guardrailsDelete.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -229,14 +255,14 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsGet(openRouter, { + const res = await guardrailsDelete(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsGet failed:", res.error); + console.log("guardrailsDelete failed:", res.error); } } @@ -247,14 +273,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetGuardrailRequest](../../models/operations/getguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteGuardrailRequest](../../models/operations/deleteguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetGuardrailResponse](../../models/operations/getguardrailresponse.md)\>** +**Promise\<[models.DeleteGuardrailResponse](../../models/deleteguardrailresponse.md)\>** ### Errors @@ -265,13 +291,13 @@ run(); | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## update +## get -Update an existing guardrail. [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 - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -283,9 +309,8 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.update({ + const result = await openRouter.guardrails.get({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, }); console.log(result); @@ -300,7 +325,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsUpdate } from "@openrouter/sdk/funcs/guardrailsUpdate.js"; +import { guardrailsGet } from "@openrouter/sdk/funcs/guardrailsGet.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -312,15 +337,14 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsUpdate(openRouter, { + const res = await guardrailsGet(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsUpdate failed:", res.error); + console.log("guardrailsGet failed:", res.error); } } @@ -331,32 +355,31 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateGuardrailRequest](../../models/operations/updateguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetGuardrailRequest](../../models/operations/getguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.UpdateGuardrailResponse](../../models/operations/updateguardrailresponse.md)\>** +**Promise\<[models.GetGuardrailResponse](../../models/getguardrailresponse.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 | \*/\* | -## delete +## update -Delete an existing guardrail. [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 - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -368,8 +391,14 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.delete({ + const result = await openRouter.guardrails.update({ id: "550e8400-e29b-41d4-a716-446655440000", + updateGuardrailRequest: { + description: "Updated description", + limitUsd: 75, + name: "Updated Guardrail Name", + resetInterval: "weekly", + }, }); console.log(result); @@ -384,7 +413,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsDelete } from "@openrouter/sdk/funcs/guardrailsDelete.js"; +import { guardrailsUpdate } from "@openrouter/sdk/funcs/guardrailsUpdate.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -396,14 +425,20 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsDelete(openRouter, { + const res = await guardrailsUpdate(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", + updateGuardrailRequest: { + description: "Updated description", + limitUsd: 75, + name: "Updated Guardrail Name", + resetInterval: "weekly", + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsDelete failed:", res.error); + console.log("guardrailsUpdate failed:", res.error); } } @@ -414,31 +449,32 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteGuardrailRequest](../../models/operations/deleteguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateGuardrailRequest](../../models/operations/updateguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.DeleteGuardrailResponse](../../models/operations/deleteguardrailresponse.md)\>** +**Promise\<[models.UpdateGuardrailResponse](../../models/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 | \*/\* | -## listKeyAssignments +## listGuardrailKeyAssignments -List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -450,9 +486,13 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.listKeyAssignments(); + const result = await openRouter.guardrails.listGuardrailKeyAssignments({ + id: "550e8400-e29b-41d4-a716-446655440000", + }); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -464,7 +504,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsListKeyAssignments } from "@openrouter/sdk/funcs/guardrailsListKeyAssignments.js"; +import { guardrailsListGuardrailKeyAssignments } from "@openrouter/sdk/funcs/guardrailsListGuardrailKeyAssignments.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -476,12 +516,16 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsListKeyAssignments(openRouter); + const res = await guardrailsListGuardrailKeyAssignments(openRouter, { + id: "550e8400-e29b-41d4-a716-446655440000", + }); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { - console.log("guardrailsListKeyAssignments failed:", res.error); + console.log("guardrailsListGuardrailKeyAssignments failed:", res.error); } } @@ -492,30 +536,31 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListKeyAssignmentsRequest](../../models/operations/listkeyassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListGuardrailKeyAssignmentsRequest](../../models/operations/listguardrailkeyassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListKeyAssignmentsResponse](../../models/operations/listkeyassignmentsresponse.md)\>** +**Promise\<[operations.ListGuardrailKeyAssignmentsResponse](../../models/operations/listguardrailkeyassignmentsresponse.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 | \*/\* | -## listMemberAssignments +## bulkAssignKeys -List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -527,7 +572,14 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.listMemberAssignments(); + const result = await openRouter.guardrails.bulkAssignKeys({ + id: "550e8400-e29b-41d4-a716-446655440000", + bulkAssignKeysRequest: { + keyHashes: [ + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + ], + }, + }); console.log(result); } @@ -541,7 +593,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsListMemberAssignments } from "@openrouter/sdk/funcs/guardrailsListMemberAssignments.js"; +import { guardrailsBulkAssignKeys } from "@openrouter/sdk/funcs/guardrailsBulkAssignKeys.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -553,12 +605,19 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsListMemberAssignments(openRouter); + const res = await guardrailsBulkAssignKeys(openRouter, { + id: "550e8400-e29b-41d4-a716-446655440000", + bulkAssignKeysRequest: { + keyHashes: [ + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + ], + }, + }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsListMemberAssignments failed:", res.error); + console.log("guardrailsBulkAssignKeys failed:", res.error); } } @@ -569,30 +628,32 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListMemberAssignmentsRequest](../../models/operations/listmemberassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.BulkAssignKeysToGuardrailRequest](../../models/operations/bulkassignkeystoguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListMemberAssignmentsResponse](../../models/operations/listmemberassignmentsresponse.md)\>** +**Promise\<[models.BulkAssignKeysResponse](../../models/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 | \*/\* | -## listGuardrailKeyAssignments +## bulkUnassignKeys -List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -604,8 +665,13 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.listGuardrailKeyAssignments({ + const result = await openRouter.guardrails.bulkUnassignKeys({ id: "550e8400-e29b-41d4-a716-446655440000", + bulkUnassignKeysRequest: { + keyHashes: [ + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + ], + }, }); console.log(result); @@ -620,7 +686,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsListGuardrailKeyAssignments } from "@openrouter/sdk/funcs/guardrailsListGuardrailKeyAssignments.js"; +import { guardrailsBulkUnassignKeys } from "@openrouter/sdk/funcs/guardrailsBulkUnassignKeys.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -632,14 +698,19 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsListGuardrailKeyAssignments(openRouter, { + const res = await guardrailsBulkUnassignKeys(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", + bulkUnassignKeysRequest: { + keyHashes: [ + "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", + ], + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsListGuardrailKeyAssignments failed:", res.error); + console.log("guardrailsBulkUnassignKeys failed:", res.error); } } @@ -650,31 +721,32 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListGuardrailKeyAssignmentsRequest](../../models/operations/listguardrailkeyassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.BulkUnassignKeysFromGuardrailRequest](../../models/operations/bulkunassignkeysfromguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListGuardrailKeyAssignmentsResponse](../../models/operations/listguardrailkeyassignmentsresponse.md)\>** +**Promise\<[models.BulkUnassignKeysResponse](../../models/bulkunassignkeysresponse.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 | \*/\* | -## bulkAssignKeys +## listGuardrailMemberAssignments -Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -686,16 +758,13 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.bulkAssignKeys({ + const result = await openRouter.guardrails.listGuardrailMemberAssignments({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], - }, }); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -707,7 +776,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsBulkAssignKeys } from "@openrouter/sdk/funcs/guardrailsBulkAssignKeys.js"; +import { guardrailsListGuardrailMemberAssignments } from "@openrouter/sdk/funcs/guardrailsListGuardrailMemberAssignments.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -719,19 +788,16 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsBulkAssignKeys(openRouter, { + const res = await guardrailsListGuardrailMemberAssignments(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], - }, }); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { - console.log("guardrailsBulkAssignKeys failed:", res.error); + console.log("guardrailsListGuardrailMemberAssignments failed:", res.error); } } @@ -742,32 +808,31 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.BulkAssignKeysToGuardrailRequest](../../models/operations/bulkassignkeystoguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListGuardrailMemberAssignmentsRequest](../../models/operations/listguardrailmemberassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.BulkAssignKeysToGuardrailResponse](../../models/operations/bulkassignkeystoguardrailresponse.md)\>** +**Promise\<[operations.ListGuardrailMemberAssignmentsResponse](../../models/operations/listguardrailmemberassignmentsresponse.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 | \*/\* | -## listGuardrailMemberAssignments +## bulkAssignMembers -List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -779,8 +844,14 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.listGuardrailMemberAssignments({ + const result = await openRouter.guardrails.bulkAssignMembers({ id: "550e8400-e29b-41d4-a716-446655440000", + bulkAssignMembersRequest: { + memberUserIds: [ + "user_abc123", + "user_def456", + ], + }, }); console.log(result); @@ -795,7 +866,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsListGuardrailMemberAssignments } from "@openrouter/sdk/funcs/guardrailsListGuardrailMemberAssignments.js"; +import { guardrailsBulkAssignMembers } from "@openrouter/sdk/funcs/guardrailsBulkAssignMembers.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -807,14 +878,20 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsListGuardrailMemberAssignments(openRouter, { + const res = await guardrailsBulkAssignMembers(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", + bulkAssignMembersRequest: { + memberUserIds: [ + "user_abc123", + "user_def456", + ], + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("guardrailsListGuardrailMemberAssignments failed:", res.error); + console.log("guardrailsBulkAssignMembers failed:", res.error); } } @@ -825,31 +902,32 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListGuardrailMemberAssignmentsRequest](../../models/operations/listguardrailmemberassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.BulkAssignMembersToGuardrailRequest](../../models/operations/bulkassignmemberstoguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListGuardrailMemberAssignmentsResponse](../../models/operations/listguardrailmemberassignmentsresponse.md)\>** +**Promise\<[models.BulkAssignMembersResponse](../../models/bulkassignmembersresponse.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 | \*/\* | -## bulkAssignMembers +## bulkUnassignMembers -Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -861,9 +939,9 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.bulkAssignMembers({ + const result = await openRouter.guardrails.bulkUnassignMembers({ id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -883,7 +961,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsBulkAssignMembers } from "@openrouter/sdk/funcs/guardrailsBulkAssignMembers.js"; +import { guardrailsBulkUnassignMembers } from "@openrouter/sdk/funcs/guardrailsBulkUnassignMembers.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -895,9 +973,9 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsBulkAssignMembers(openRouter, { + const res = await guardrailsBulkUnassignMembers(openRouter, { id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { + bulkUnassignMembersRequest: { memberUserIds: [ "user_abc123", "user_def456", @@ -908,7 +986,7 @@ async function run() { const { value: result } = res; console.log(result); } else { - console.log("guardrailsBulkAssignMembers failed:", res.error); + console.log("guardrailsBulkUnassignMembers failed:", res.error); } } @@ -919,14 +997,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.BulkAssignMembersToGuardrailRequest](../../models/operations/bulkassignmemberstoguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.BulkUnassignMembersFromGuardrailRequest](../../models/operations/bulkunassignmembersfromguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.BulkAssignMembersToGuardrailResponse](../../models/operations/bulkassignmemberstoguardrailresponse.md)\>** +**Promise\<[models.BulkUnassignMembersResponse](../../models/bulkunassignmembersresponse.md)\>** ### Errors @@ -938,13 +1016,13 @@ run(); | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## bulkUnassignKeys +## listKeyAssignments -Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -956,16 +1034,11 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.bulkUnassignKeys({ - id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], - }, - }); + const result = await openRouter.guardrails.listKeyAssignments(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -977,7 +1050,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsBulkUnassignKeys } from "@openrouter/sdk/funcs/guardrailsBulkUnassignKeys.js"; +import { guardrailsListKeyAssignments } from "@openrouter/sdk/funcs/guardrailsListKeyAssignments.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -989,19 +1062,14 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsBulkUnassignKeys(openRouter, { - id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - keyHashes: [ - "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", - ], - }, - }); + const res = await guardrailsListKeyAssignments(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { - console.log("guardrailsBulkUnassignKeys failed:", res.error); + console.log("guardrailsListKeyAssignments failed:", res.error); } } @@ -1012,32 +1080,30 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.BulkUnassignKeysFromGuardrailRequest](../../models/operations/bulkunassignkeysfromguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListKeyAssignmentsRequest](../../models/operations/listkeyassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.BulkUnassignKeysFromGuardrailResponse](../../models/operations/bulkunassignkeysfromguardrailresponse.md)\>** +**Promise\<[operations.ListKeyAssignmentsResponse](../../models/operations/listkeyassignmentsresponse.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 | \*/\* | -## bulkUnassignMembers +## listMemberAssignments -Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -1049,17 +1115,11 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.guardrails.bulkUnassignMembers({ - id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - memberUserIds: [ - "user_abc123", - "user_def456", - ], - }, - }); + const result = await openRouter.guardrails.listMemberAssignments(); - console.log(result); + for await (const page of result) { + console.log(page); + } } run(); @@ -1071,7 +1131,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { guardrailsBulkUnassignMembers } from "@openrouter/sdk/funcs/guardrailsBulkUnassignMembers.js"; +import { guardrailsListMemberAssignments } from "@openrouter/sdk/funcs/guardrailsListMemberAssignments.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1083,20 +1143,14 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await guardrailsBulkUnassignMembers(openRouter, { - id: "550e8400-e29b-41d4-a716-446655440000", - requestBody: { - memberUserIds: [ - "user_abc123", - "user_def456", - ], - }, - }); + const res = await guardrailsListMemberAssignments(openRouter); if (res.ok) { const { value: result } = res; - console.log(result); + for await (const page of result) { + console.log(page); + } } else { - console.log("guardrailsBulkUnassignMembers failed:", res.error); + console.log("guardrailsListMemberAssignments failed:", res.error); } } @@ -1107,21 +1161,19 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.BulkUnassignMembersFromGuardrailRequest](../../models/operations/bulkunassignmembersfromguardrailrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListMemberAssignmentsRequest](../../models/operations/listmemberassignmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.BulkUnassignMembersFromGuardrailResponse](../../models/operations/bulkunassignmembersfromguardrailresponse.md)\>** +**Promise\<[operations.ListMemberAssignmentsResponse](../../models/operations/listmemberassignmentsresponse.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 | \*/\* | \ No newline at end of file diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 2e4d0e64..c2d128e7 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -6,17 +6,17 @@ 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 * [listForUser](#listforuser) - List models filtered by user provider preferences, privacy settings, and guardrails -## count +## list -Get total count of available models +List all models and their properties ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -28,7 +28,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.models.count(); + const result = await openRouter.models.list(); console.log(result); } @@ -42,7 +42,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { modelsCount } from "@openrouter/sdk/funcs/modelsCount.js"; +import { modelsList } from "@openrouter/sdk/funcs/modelsList.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -54,12 +54,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await modelsCount(openRouter); + const res = await modelsList(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("modelsCount failed:", res.error); + console.log("modelsList failed:", res.error); } } @@ -70,14 +70,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListModelsCountRequest](../../models/operations/listmodelscountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetModelsRequest](../../models/operations/getmodelsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[models.ModelsCountResponse](../../models/modelscountresponse.md)\>** +**Promise\<[models.ModelsListResponse](../../models/modelslistresponse.md)\>** ### Errors @@ -87,13 +87,13 @@ run(); | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | -## list +## count -List all models and their properties +Get total count of available models ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -105,7 +105,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.models.list(); + const result = await openRouter.models.count(); console.log(result); } @@ -119,7 +119,7 @@ The standalone function version of this method: ```typescript import { OpenRouterCore } from "@openrouter/sdk/core.js"; -import { modelsList } from "@openrouter/sdk/funcs/modelsList.js"; +import { modelsCount } from "@openrouter/sdk/funcs/modelsCount.js"; // Use `OpenRouterCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -131,12 +131,12 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await modelsList(openRouter); + const res = await modelsCount(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("modelsList failed:", res.error); + console.log("modelsCount failed:", res.error); } } @@ -147,14 +147,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetModelsRequest](../../models/operations/getmodelsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListModelsCountRequest](../../models/operations/listmodelscountrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[models.ModelsListResponse](../../models/modelslistresponse.md)\>** +**Promise\<[models.ModelsCountResponse](../../models/modelscountresponse.md)\>** ### Errors @@ -166,7 +166,7 @@ run(); ## listForUser -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 c3e6fb2b..7d2b462e 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -30,6 +30,8 @@ async function run() { const result = await openRouter.oAuth.exchangeAuthCodeForAPIKey({ requestBody: { code: "auth_code_abc123def456", + codeChallengeMethod: "S256", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", }, }); @@ -60,6 +62,8 @@ async function run() { const res = await oAuthExchangeAuthCodeForAPIKey(openRouter, { requestBody: { code: "auth_code_abc123def456", + codeChallengeMethod: "S256", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", }, }); if (res.ok) { @@ -116,6 +120,9 @@ async function run() { const result = await openRouter.oAuth.createAuthCode({ requestBody: { callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, }, }); @@ -146,6 +153,9 @@ async function run() { const res = await oAuthCreateAuthCode(openRouter, { requestBody: { callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, }, }); if (res.ok) { diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index 20c266d3..7002690c 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -27,7 +27,10 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.beta.responses.send({ - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); console.log(result); @@ -55,7 +58,10 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await betaResponsesSend(openRouter, { - responsesRequest: {}, + responsesRequest: { + input: "Tell me a joke", + model: "openai/gpt-4o", + }, }); if (res.ok) { const { value: result } = res; diff --git a/examples/betaResponsesSend.example.ts b/examples/analyticsGetUserActivity.example.ts similarity index 74% rename from examples/betaResponsesSend.example.ts rename to examples/analyticsGetUserActivity.example.ts index b14adcbe..6dffcab2 100644 --- a/examples/betaResponsesSend.example.ts +++ b/examples/analyticsGetUserActivity.example.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 66896eb477c6 + * @generated-id: 7ccac02a65ba */ import dotenv from "dotenv"; @@ -9,7 +9,7 @@ dotenv.config(); * Example usage of the @openrouter/sdk SDK * * To run this example from the examples directory: - * npm run build && npx tsx betaResponsesSend.example.ts + * npm run build && npx tsx analyticsGetUserActivity.example.ts */ import { OpenRouter } from "@openrouter/sdk"; @@ -22,9 +22,7 @@ const openRouter = new OpenRouter({ }); async function main() { - const result = await openRouter.beta.responses.send({ - responsesRequest: {}, - }); + const result = await openRouter.analytics.getUserActivity(); console.log(result); } diff --git a/jsr.json b/jsr.json index 701d990f..b88f6d3b 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.11.2", + "version": "0.12.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index b1d5bfbd..d439275a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.11.2", + "version": "0.12.0", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ @@ -61,19 +61,23 @@ } }, "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/OpenRouterTeam/typescript-sdk.git" + }, "scripts": { "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build", - "compile": "tsc", "postinstall": "node scripts/check-types.js || true", + "prepare": "npm run build", "test": "vitest --run --project unit", - "test:e2e": "vitest --run --project e2e", "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", "typecheck:transit": "exit 0", - "test:transit": "exit 0", - "prepare": "npm run build" + "compile": "tsc", + "test:e2e": "vitest --run --project e2e", + "test:transit": "exit 0" }, "peerDependencies": {}, "devDependencies": { diff --git a/src/funcs/analyticsGetUserActivity.ts b/src/funcs/analyticsGetUserActivity.ts index 3fb172c2..ff4692c7 100644 --- a/src/funcs/analyticsGetUserActivity.ts +++ b/src/funcs/analyticsGetUserActivity.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,10 +39,11 @@ export function analyticsGetUserActivity( options?: RequestOptions, ): APIPromise< Result< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -67,10 +69,11 @@ async function $do( ): Promise< [ Result< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -99,7 +102,9 @@ async function $do( const path = pathToFunc("/activity")(); const query = encodeFormQuery({ + "api_key_hash": payload?.api_key_hash, "date": payload?.date, + "user_id": payload?.user_id, }); const headers = new Headers(compactMap({ @@ -136,8 +141,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -158,7 +173,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "403", "4XX", "500", "5XX"], + errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -172,10 +187,11 @@ async function $do( }; const [result] = await M.match< - operations.GetUserActivityResponse, + models.ActivityResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError + | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -186,10 +202,11 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.GetUserActivityResponse$inboundSchema), + M.json(200, models.ActivityResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), diff --git a/src/funcs/apiKeysCreate.ts b/src/funcs/apiKeysCreate.ts index 15302b5b..b0e0b488 100644 --- a/src/funcs/apiKeysCreate.ts +++ b/src/funcs/apiKeysCreate.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysDelete.ts b/src/funcs/apiKeysDelete.ts index 65e8e4d2..ce7428d9 100644 --- a/src/funcs/apiKeysDelete.ts +++ b/src/funcs/apiKeysDelete.ts @@ -137,8 +137,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysGet.ts b/src/funcs/apiKeysGet.ts index 48102f93..a8c7fa6c 100644 --- a/src/funcs/apiKeysGet.ts +++ b/src/funcs/apiKeysGet.ts @@ -137,8 +137,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysGetCurrentKeyMetadata.ts b/src/funcs/apiKeysGetCurrentKeyMetadata.ts index 56890099..d953da31 100644 --- a/src/funcs/apiKeysGetCurrentKeyMetadata.ts +++ b/src/funcs/apiKeysGetCurrentKeyMetadata.ts @@ -128,8 +128,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysList.ts b/src/funcs/apiKeysList.ts index 8b2d00b5..96a1d04f 100644 --- a/src/funcs/apiKeysList.ts +++ b/src/funcs/apiKeysList.ts @@ -134,8 +134,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/apiKeysUpdate.ts b/src/funcs/apiKeysUpdate.ts index b971db8b..baba4cd7 100644 --- a/src/funcs/apiKeysUpdate.ts +++ b/src/funcs/apiKeysUpdate.ts @@ -140,8 +140,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/betaResponsesSend.ts b/src/funcs/betaResponsesSend.ts index 9bfaa837..753f20ec 100644 --- a/src/funcs/betaResponsesSend.ts +++ b/src/funcs/betaResponsesSend.ts @@ -248,8 +248,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/chatSend.ts b/src/funcs/chatSend.ts index e6dc03e8..a77f61dd 100644 --- a/src/funcs/chatSend.ts +++ b/src/funcs/chatSend.ts @@ -249,8 +249,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/creditsGetCredits.ts b/src/funcs/creditsGetCredits.ts index 81708b67..fd128513 100644 --- a/src/funcs/creditsGetCredits.ts +++ b/src/funcs/creditsGetCredits.ts @@ -130,8 +130,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/embeddingsGenerate.ts b/src/funcs/embeddingsGenerate.ts index 0b51ab86..1cf355c9 100644 --- a/src/funcs/embeddingsGenerate.ts +++ b/src/funcs/embeddingsGenerate.ts @@ -144,8 +144,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/embeddingsListModels.ts b/src/funcs/embeddingsListModels.ts index 03ed629f..edb75a8d 100644 --- a/src/funcs/embeddingsListModels.ts +++ b/src/funcs/embeddingsListModels.ts @@ -131,8 +131,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/endpointsList.ts b/src/funcs/endpointsList.ts index 5934a726..207bee76 100644 --- a/src/funcs/endpointsList.ts +++ b/src/funcs/endpointsList.ts @@ -134,8 +134,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/endpointsListZdrEndpoints.ts b/src/funcs/endpointsListZdrEndpoints.ts index 2b319a71..8346d4fd 100644 --- a/src/funcs/endpointsListZdrEndpoints.ts +++ b/src/funcs/endpointsListZdrEndpoints.ts @@ -123,8 +123,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/generationsGetGeneration.ts b/src/funcs/generationsGetGeneration.ts index 8e6648d6..88f41e8a 100644 --- a/src/funcs/generationsGetGeneration.ts +++ b/src/funcs/generationsGetGeneration.ts @@ -140,8 +140,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/guardrailsBulkAssignKeys.ts b/src/funcs/guardrailsBulkAssignKeys.ts index 7c26b9a8..cc0ef63b 100644 --- a/src/funcs/guardrailsBulkAssignKeys.ts +++ b/src/funcs/guardrailsBulkAssignKeys.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkAssignKeys( options?: RequestOptions, ): APIPromise< Result< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -94,7 +95,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkAssignKeysRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -139,8 +142,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -174,7 +187,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkAssignKeysToGuardrailResponse, + models.BulkAssignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -188,7 +201,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkAssignKeysToGuardrailResponse$inboundSchema), + M.json(200, models.BulkAssignKeysResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkAssignMembers.ts b/src/funcs/guardrailsBulkAssignMembers.ts index 9dc855c6..74ca9327 100644 --- a/src/funcs/guardrailsBulkAssignMembers.ts +++ b/src/funcs/guardrailsBulkAssignMembers.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkAssignMembers( options?: RequestOptions, ): APIPromise< Result< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkAssignMembersRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -141,8 +144,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -176,7 +189,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkAssignMembersToGuardrailResponse, + models.BulkAssignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -190,7 +203,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkAssignMembersToGuardrailResponse$inboundSchema), + M.json(200, models.BulkAssignMembersResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkUnassignKeys.ts b/src/funcs/guardrailsBulkUnassignKeys.ts index b9fa7e71..67e7a75f 100644 --- a/src/funcs/guardrailsBulkUnassignKeys.ts +++ b/src/funcs/guardrailsBulkUnassignKeys.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkUnassignKeys( options?: RequestOptions, ): APIPromise< Result< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkUnassignKeysRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -143,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -178,7 +191,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkUnassignKeysFromGuardrailResponse, + models.BulkUnassignKeysResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -192,7 +205,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.BulkUnassignKeysFromGuardrailResponse$inboundSchema), + M.json(200, models.BulkUnassignKeysResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsBulkUnassignMembers.ts b/src/funcs/guardrailsBulkUnassignMembers.ts index 16939d93..d0ec8d8b 100644 --- a/src/funcs/guardrailsBulkUnassignMembers.ts +++ b/src/funcs/guardrailsBulkUnassignMembers.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsBulkUnassignMembers( options?: RequestOptions, ): APIPromise< Result< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -96,7 +97,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.BulkUnassignMembersRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -143,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -178,7 +191,7 @@ async function $do( }; const [result] = await M.match< - operations.BulkUnassignMembersFromGuardrailResponse, + models.BulkUnassignMembersResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -192,10 +205,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json( - 200, - operations.BulkUnassignMembersFromGuardrailResponse$inboundSchema, - ), + M.json(200, models.BulkUnassignMembersResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/guardrailsCreate.ts b/src/funcs/guardrailsCreate.ts index ec426bd1..57dc9e00 100644 --- a/src/funcs/guardrailsCreate.ts +++ b/src/funcs/guardrailsCreate.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsCreate( options?: RequestOptions, ): APIPromise< Result< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -91,7 +92,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.CreateGuardrailRequest, { + explode: true, + }); const path = pathToFunc("/guardrails")(); @@ -130,8 +133,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -165,7 +178,7 @@ async function $do( }; const [result] = await M.match< - operations.CreateGuardrailResponse, + models.CreateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -178,7 +191,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(201, operations.CreateGuardrailResponse$inboundSchema), + M.json(201, models.CreateGuardrailResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsDelete.ts b/src/funcs/guardrailsDelete.ts index ce2562e8..1f983138 100644 --- a/src/funcs/guardrailsDelete.ts +++ b/src/funcs/guardrailsDelete.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsDelete( options?: RequestOptions, ): APIPromise< Result< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -135,8 +136,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -170,7 +181,7 @@ async function $do( }; const [result] = await M.match< - operations.DeleteGuardrailResponse, + models.DeleteGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -183,7 +194,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.DeleteGuardrailResponse$inboundSchema), + M.json(200, models.DeleteGuardrailResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsGet.ts b/src/funcs/guardrailsGet.ts index ff2003a1..bed357f5 100644 --- a/src/funcs/guardrailsGet.ts +++ b/src/funcs/guardrailsGet.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsGet( options?: RequestOptions, ): APIPromise< Result< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -66,7 +67,7 @@ async function $do( ): Promise< [ Result< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -135,8 +136,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -170,7 +181,7 @@ async function $do( }; const [result] = await M.match< - operations.GetGuardrailResponse, + models.GetGuardrailResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError @@ -183,7 +194,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.GetGuardrailResponse$inboundSchema), + M.json(200, models.GetGuardrailResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), diff --git a/src/funcs/guardrailsList.ts b/src/funcs/guardrailsList.ts index e181e7f4..78bd226b 100644 --- a/src/funcs/guardrailsList.ts +++ b/src/funcs/guardrailsList.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List guardrails @@ -37,18 +44,21 @@ export function guardrailsList( request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -87,7 +100,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -133,8 +146,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -149,7 +172,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -160,7 +183,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -168,7 +191,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -181,15 +204,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListGuardrailsResponse$inboundSchema), + M.json(200, operations.ListGuardrailsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsList( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListGuardrailKeyAssignments.ts b/src/funcs/guardrailsListGuardrailKeyAssignments.ts index 39da0b68..72bf3125 100644 --- a/src/funcs/guardrailsListGuardrailKeyAssignments.ts +++ b/src/funcs/guardrailsListGuardrailKeyAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List key assignments for a guardrail @@ -37,19 +44,22 @@ export function guardrailsListGuardrailKeyAssignments( request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -65,19 +75,22 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -141,8 +154,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -157,7 +180,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -168,7 +191,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -176,7 +199,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailKeyAssignmentsResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -190,7 +213,9 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListGuardrailKeyAssignmentsResponse$inboundSchema), + M.json(200, operations.ListGuardrailKeyAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), @@ -198,8 +223,66 @@ async function $do( M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListGuardrailKeyAssignments( + client, + { + ...request, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListGuardrailMemberAssignments.ts b/src/funcs/guardrailsListGuardrailMemberAssignments.ts index a4d6a854..88cbd772 100644 --- a/src/funcs/guardrailsListGuardrailMemberAssignments.ts +++ b/src/funcs/guardrailsListGuardrailMemberAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List member assignments for a guardrail @@ -37,19 +44,22 @@ export function guardrailsListGuardrailMemberAssignments( request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions, ): APIPromise< - Result< - operations.ListGuardrailMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -65,19 +75,22 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListGuardrailMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.NotFoundResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -91,7 +104,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -143,8 +156,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -159,7 +182,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -170,7 +193,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -178,7 +201,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListGuardrailMemberAssignmentsResponse, | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -195,6 +218,7 @@ async function $do( M.json( 200, operations.ListGuardrailMemberAssignmentsResponse$inboundSchema, + { key: "Result" }, ), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), @@ -203,8 +227,66 @@ async function $do( M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListGuardrailMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListGuardrailMemberAssignments( + client, + { + ...request, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListKeyAssignments.ts b/src/funcs/guardrailsListKeyAssignments.ts index b1f56504..2f9ce0e1 100644 --- a/src/funcs/guardrailsListKeyAssignments.ts +++ b/src/funcs/guardrailsListKeyAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List all key assignments @@ -37,18 +44,21 @@ export function guardrailsListKeyAssignments( request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListKeyAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -135,8 +148,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -151,7 +174,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -162,7 +185,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -170,7 +193,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListKeyAssignmentsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -183,15 +206,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListKeyAssignmentsResponse$inboundSchema), + M.json(200, operations.ListKeyAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListKeyAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListKeyAssignments( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsListMemberAssignments.ts b/src/funcs/guardrailsListMemberAssignments.ts index 44f3e6f2..2d1e79ab 100644 --- a/src/funcs/guardrailsListMemberAssignments.ts +++ b/src/funcs/guardrailsListMemberAssignments.ts @@ -4,6 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -25,6 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List all member assignments @@ -37,18 +44,21 @@ export function guardrailsListMemberAssignments( request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions, ): APIPromise< - Result< - operations.ListMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } > > { return new APIPromise($do( @@ -64,18 +74,21 @@ async function $do( options?: RequestOptions, ): Promise< [ - Result< - operations.ListMemberAssignmentsResponse, - | errors.UnauthorizedResponseError - | errors.InternalServerResponseError - | OpenRouterError - | ResponseValidationError - | ConnectionError - | RequestAbortedError - | RequestTimeoutError - | InvalidRequestError - | UnexpectedClientError - | SDKValidationError + PageIterator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } >, APICall, ] @@ -89,7 +102,7 @@ async function $do( "Input validation failed", ); if (!parsed.ok) { - return [parsed, { status: "invalid" }]; + return [haltIterator(parsed), { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -135,8 +148,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -151,7 +174,7 @@ async function $do( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return [requestRes, { status: "invalid" }]; + return [haltIterator(requestRes), { status: "invalid" }]; } const req = requestRes.value; @@ -162,7 +185,7 @@ async function $do( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return [doResult, { status: "request-error", request: req }]; + return [haltIterator(doResult), { status: "request-error", request: req }]; } const response = doResult.value; @@ -170,7 +193,7 @@ async function $do( HttpMeta: { Response: response, Request: req }, }; - const [result] = await M.match< + const [result, raw] = await M.match< operations.ListMemberAssignmentsResponse, | errors.UnauthorizedResponseError | errors.InternalServerResponseError @@ -183,15 +206,74 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.ListMemberAssignmentsResponse$inboundSchema), + M.json(200, operations.ListMemberAssignmentsResponse$inboundSchema, { + key: "Result", + }), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { - return [result, { status: "complete", request: req, response }]; + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; } - return [result, { status: "complete", request: req, response }]; + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListMemberAssignmentsResponse, + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + guardrailsListMemberAssignments( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; } diff --git a/src/funcs/guardrailsUpdate.ts b/src/funcs/guardrailsUpdate.ts index 47262b78..5187613c 100644 --- a/src/funcs/guardrailsUpdate.ts +++ b/src/funcs/guardrailsUpdate.ts @@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,7 +39,7 @@ export function guardrailsUpdate( options?: RequestOptions, ): APIPromise< Result< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -67,7 +68,7 @@ async function $do( ): Promise< [ Result< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -93,7 +94,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload.UpdateGuardrailRequest, { + explode: true, + }); const pathParams = { id: encodeSimple("id", payload.id, { @@ -138,8 +141,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -173,7 +186,7 @@ async function $do( }; const [result] = await M.match< - operations.UpdateGuardrailResponse, + models.UpdateGuardrailResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError @@ -187,7 +200,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.UpdateGuardrailResponse$inboundSchema), + M.json(200, models.UpdateGuardrailResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), diff --git a/src/funcs/modelsCount.ts b/src/funcs/modelsCount.ts index 37341fe9..0d1f8b2a 100644 --- a/src/funcs/modelsCount.ts +++ b/src/funcs/modelsCount.ts @@ -130,8 +130,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/modelsList.ts b/src/funcs/modelsList.ts index fcae3864..926d79e6 100644 --- a/src/funcs/modelsList.ts +++ b/src/funcs/modelsList.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/modelsListForUser.ts b/src/funcs/modelsListForUser.ts index 9b406a7f..55abe513 100644 --- a/src/funcs/modelsListForUser.ts +++ b/src/funcs/modelsListForUser.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * List models filtered by user provider preferences, privacy settings, and guardrails * * @remarks - * 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). */ export function modelsListForUser( client: OpenRouterCore, @@ -140,8 +140,18 @@ async function $do( securitySource: security, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/oAuthCreateAuthCode.ts b/src/funcs/oAuthCreateAuthCode.ts index deb51c7d..7f7c14a3 100644 --- a/src/funcs/oAuthCreateAuthCode.ts +++ b/src/funcs/oAuthCreateAuthCode.ts @@ -132,8 +132,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts index ba520ded..c4720a20 100644 --- a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts +++ b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts @@ -131,8 +131,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/organizationListMembers.ts b/src/funcs/organizationListMembers.ts new file mode 100644 index 00000000..4ef0a3fa --- /dev/null +++ b/src/funcs/organizationListMembers.ts @@ -0,0 +1,284 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dc6644106a4d + */ + +import { OpenRouterCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; + +/** + * List organization members + * + * @remarks + * List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function organizationListMembers( + client: OpenRouterCore, + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, +): APIPromise< + PageIterator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, +): Promise< + [ + PageIterator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + { offset: number } + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListOrganizationMembersRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [haltIterator(parsed), { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/organization/members")(); + + const query = encodeFormQuery({ + "limit": payload?.limit, + "offset": payload?.offset, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload?.["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listOrganizationMembers", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [haltIterator(requestRes), { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [haltIterator(doResult), { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result, raw] = await M.match< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ListOrganizationMembersResponse$inboundSchema, { + key: "Result", + }), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [haltIterator(result), { + status: "complete", + request: req, + response, + }]; + } + + const nextFunc = ( + responseData: unknown, + ): { + next: Paginator< + Result< + operations.ListOrganizationMembersResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > + >; + "~next"?: { offset: number }; + } => { + const offset = request?.offset ?? 0; + + if (!responseData) { + return { next: () => null }; + } + const results = dlv(responseData, "data"); + if (!Array.isArray(results) || !results.length) { + return { next: () => null }; + } + const limit = request?.limit ?? 0; + if (results.length < limit) { + return { next: () => null }; + } + const nextOffset = offset + results.length; + + const nextVal = () => + organizationListMembers( + client, + { + ...request!, + offset: nextOffset, + }, + options, + ); + + return { next: nextVal, "~next": { offset: nextOffset } }; + }; + + const page = { ...result, ...nextFunc(raw) }; + return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, { + status: "complete", + request: req, + response, + }]; +} diff --git a/src/funcs/providersList.ts b/src/funcs/providersList.ts index f37022cd..503bef3d 100644 --- a/src/funcs/providersList.ts +++ b/src/funcs/providersList.ts @@ -123,8 +123,18 @@ async function $do( securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { diff --git a/src/funcs/rerankRerank.ts b/src/funcs/rerankRerank.ts new file mode 100644 index 00000000..f39c3bac --- /dev/null +++ b/src/funcs/rerankRerank.ts @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 915c20e147a4 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Submit a rerank request + * + * @remarks + * Submits a rerank request to the rerank router + */ +export function rerankRerank( + client: OpenRouterCore, + request: operations.CreateRerankRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateRerankResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.CreateRerankRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateRerankResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateRerankRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const path = pathToFunc("/rerank")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json;q=1, text/event-stream;q=0", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createRerank", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "402", + "404", + "429", + "4XX", + "500", + "502", + "503", + "524", + "529", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateRerankResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.ServiceUnavailableResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateRerankResponse$inboundSchema), + M.text(200, operations.CreateRerankResponse$inboundSchema, { + ctype: "text/event-stream", + }), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), + M.jsonErr(524, errors.EdgeNetworkTimeoutResponseError$inboundSchema), + M.jsonErr(529, errors.ProviderOverloadedResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/creditsCreateCoinbaseCharge.ts b/src/funcs/videoGenerationGenerate.ts similarity index 73% rename from src/funcs/creditsCreateCoinbaseCharge.ts rename to src/funcs/videoGenerationGenerate.ts index 702ad6f5..8022b80e 100644 --- a/src/funcs/creditsCreateCoinbaseCharge.ts +++ b/src/funcs/videoGenerationGenerate.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: e07ee6831da3 + * @generated-id: 6f3650ac9f5e */ import { OpenRouterCore } from "../core.js"; @@ -9,7 +9,7 @@ import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; -import { resolveSecurity } from "../lib/security.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { ConnectionError, @@ -22,26 +22,28 @@ import * as errors from "../models/errors/index.js"; import { OpenRouterError } from "../models/errors/openroutererror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Create a Coinbase charge for crypto payment + * Submit a video generation request * * @remarks - * Create a Coinbase charge for crypto payment + * Submits a video generation request and returns a polling URL to check status */ -export function creditsCreateCoinbaseCharge( +export function videoGenerationGenerate( client: OpenRouterCore, - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, + request: operations.CreateVideosRequest, options?: RequestOptions, ): APIPromise< Result< - operations.CreateCoinbaseChargeResponse, + models.VideoGenerationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError @@ -56,7 +58,6 @@ export function creditsCreateCoinbaseCharge( > { return new APIPromise($do( client, - security, request, options, )); @@ -64,15 +65,16 @@ export function creditsCreateCoinbaseCharge( async function $do( client: OpenRouterCore, - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, + request: operations.CreateVideosRequest, options?: RequestOptions, ): Promise< [ Result< - operations.CreateCoinbaseChargeResponse, + models.VideoGenerationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError @@ -89,19 +91,18 @@ async function $do( > { const parsed = safeParse( request, - (value) => - operations.CreateCoinbaseChargeRequest$outboundSchema.parse(value), + (value) => operations.CreateVideosRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.CreateChargeRequest, { + const body = encodeJSON("body", payload.VideoGenerationRequest, { explode: true, }); - const path = pathToFunc("/credits/coinbase")(); + const path = pathToFunc("/videos")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", @@ -123,29 +124,33 @@ async function $do( ), })); - const requestSecurity = resolveSecurity( - [ - { - fieldName: "Authorization", - type: "http:bearer", - value: security?.bearer, - }, - ], - ); + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "createCoinbaseCharge", + operationID: "createVideos", oAuth2Scopes: null, resolvedSecurity: requestSecurity, - securitySource: security, + securitySource: client._options.apiKey, retryConfig: options?.retries || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryCodes: options?.retryCodes || ["5XX"], }; const requestRes = client._createRequest(context, { @@ -165,7 +170,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "429", "4XX", "500", "5XX"], + errorCodes: ["400", "401", "402", "404", "429", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -179,9 +184,11 @@ async function $do( }; const [result] = await M.match< - operations.CreateCoinbaseChargeResponse, + models.VideoGenerationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError @@ -193,9 +200,11 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.CreateCoinbaseChargeResponse$inboundSchema), + M.json(202, models.VideoGenerationResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), diff --git a/src/funcs/videoGenerationGetGeneration.ts b/src/funcs/videoGenerationGetGeneration.ts new file mode 100644 index 00000000..8d028ce1 --- /dev/null +++ b/src/funcs/videoGenerationGetGeneration.ts @@ -0,0 +1,209 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 02c7e430a829 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Poll video generation status + * + * @remarks + * Returns job status and content URLs when completed + */ +export function videoGenerationGetGeneration( + client: OpenRouterCore, + request: operations.GetVideosRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.VideoGenerationResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.GetVideosRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.VideoGenerationResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetVideosRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + jobId: encodeSimple("jobId", payload.jobId, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/videos/{jobId}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getVideos", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.VideoGenerationResponse, + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.VideoGenerationResponse$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/videoGenerationGetVideoContent.ts b/src/funcs/videoGenerationGetVideoContent.ts new file mode 100644 index 00000000..66b533d9 --- /dev/null +++ b/src/funcs/videoGenerationGetVideoContent.ts @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fcfa9e559784 + */ + +import * as z from "zod/v4"; +import { OpenRouterCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Download generated video content + * + * @remarks + * Streams the generated video content from the upstream provider + */ +export function videoGenerationGetVideoContent( + client: OpenRouterCore, + request: operations.ListVideosContentRequest, + options?: RequestOptions, +): APIPromise< + Result< + ReadableStream, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.ListVideosContentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + ReadableStream, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListVideosContentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + jobId: encodeSimple("jobId", payload.jobId, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/videos/{jobId}/content")(pathParams); + + const query = encodeFormQuery({ + "index": payload.index, + }); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listVideosContent", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "404", "4XX", "500", "502", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + ReadableStream, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream( + 200, + z.custom>(x => x instanceof ReadableStream), + ), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/videoGenerationListVideosModels.ts b/src/funcs/videoGenerationListVideosModels.ts new file mode 100644 index 00000000..d71becdd --- /dev/null +++ b/src/funcs/videoGenerationListVideosModels.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c46f1fcd7679 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List all video generation models + * + * @remarks + * Returns a list of all available video generation models and their properties + */ +export function videoGenerationListVideosModels( + client: OpenRouterCore, + request?: operations.ListVideosModelsRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.VideoModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request?: operations.ListVideosModelsRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.VideoModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListVideosModelsRequest$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/videos/models")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload?.["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listVideosModels", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.VideoModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.VideoModelsListResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index ad74991a..591743c2 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -75,7 +75,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.11.2", + sdkVersion: "0.12.0", genVersion: "2.879.1", - userAgent: "speakeasy-sdk/typescript 0.11.2 2.879.1 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.12.0 2.879.1 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/activityitem.ts b/src/models/activityitem.ts index c13ce725..df27da30 100644 --- a/src/models/activityitem.ts +++ b/src/models/activityitem.ts @@ -10,10 +10,22 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ActivityItem = { + /** + * BYOK inference cost in USD (external credits spent) + */ + byokUsageInference: number; + /** + * Total completion tokens generated + */ + completionTokens: number; /** * Date of the activity (YYYY-MM-DD format) */ date: string; + /** + * Unique identifier for the endpoint + */ + endpointId: string; /** * Model slug (e.g., "openai/gpt-4.1") */ @@ -23,61 +35,49 @@ export type ActivityItem = { */ modelPermaslug: string; /** - * Unique identifier for the endpoint + * Total prompt tokens used */ - endpointId: string; + promptTokens: number; /** * Name of the provider serving this endpoint */ providerName: string; /** - * Total cost in USD (OpenRouter credits spent) - */ - usage: number; - /** - * BYOK inference cost in USD (external credits spent) + * Total reasoning tokens used */ - byokUsageInference: number; + reasoningTokens: number; /** * Number of requests made */ requests: number; /** - * Total prompt tokens used - */ - promptTokens: number; - /** - * Total completion tokens generated - */ - completionTokens: number; - /** - * Total reasoning tokens used + * Total cost in USD (OpenRouter credits spent) */ - reasoningTokens: number; + usage: number; }; /** @internal */ export const ActivityItem$inboundSchema: z.ZodType = z .object({ + byok_usage_inference: z.number(), + completion_tokens: z.int(), date: z.string(), + endpoint_id: z.string(), model: z.string(), model_permaslug: z.string(), - endpoint_id: z.string(), + prompt_tokens: z.int(), provider_name: z.string(), + reasoning_tokens: z.int(), + requests: z.int(), usage: z.number(), - byok_usage_inference: z.number(), - requests: z.number(), - prompt_tokens: z.number(), - completion_tokens: z.number(), - reasoning_tokens: z.number(), }).transform((v) => { return remap$(v, { - "model_permaslug": "modelPermaslug", - "endpoint_id": "endpointId", - "provider_name": "providerName", "byok_usage_inference": "byokUsageInference", - "prompt_tokens": "promptTokens", "completion_tokens": "completionTokens", + "endpoint_id": "endpointId", + "model_permaslug": "modelPermaslug", + "prompt_tokens": "promptTokens", + "provider_name": "providerName", "reasoning_tokens": "reasoningTokens", }); }); diff --git a/src/models/activityresponse.ts b/src/models/activityresponse.ts new file mode 100644 index 00000000..41223fe4 --- /dev/null +++ b/src/models/activityresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c535306a4318 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { ActivityItem, ActivityItem$inboundSchema } from "./activityitem.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type ActivityResponse = { + /** + * List of activity items + */ + data: Array; +}; + +/** @internal */ +export const ActivityResponse$inboundSchema: z.ZodType< + ActivityResponse, + unknown +> = z.object({ + data: z.array(ActivityItem$inboundSchema), +}); + +export function activityResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActivityResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActivityResponse' from JSON`, + ); +} diff --git a/src/models/annotationaddedevent.ts b/src/models/annotationaddedevent.ts index 5a81c33b..42c4ab2a 100644 --- a/src/models/annotationaddedevent.ts +++ b/src/models/annotationaddedevent.ts @@ -17,13 +17,13 @@ import { * Event emitted when a text annotation is added to output */ export type AnnotationAddedEvent = { - type: "response.output_text.annotation.added"; - outputIndex: number; - itemId: string; + annotation: OpenAIResponsesAnnotation; + annotationIndex: number; contentIndex: number; + itemId: string; + outputIndex: number; sequenceNumber: number; - annotationIndex: number; - annotation: OpenAIResponsesAnnotation; + type: "response.output_text.annotation.added"; }; /** @internal */ @@ -31,20 +31,20 @@ export const AnnotationAddedEvent$inboundSchema: z.ZodType< AnnotationAddedEvent, unknown > = z.object({ - type: z.literal("response.output_text.annotation.added"), - output_index: z.number(), - item_id: z.string(), - content_index: z.number(), - sequence_number: z.number(), - annotation_index: z.number(), annotation: OpenAIResponsesAnnotation$inboundSchema, + annotation_index: z.int(), + content_index: z.int(), + item_id: z.string(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.output_text.annotation.added"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", + "annotation_index": "annotationIndex", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", - "annotation_index": "annotationIndex", }); }); diff --git a/src/models/anthropiccachecontroldirective.ts b/src/models/anthropiccachecontroldirective.ts new file mode 100644 index 00000000..1cf91715 --- /dev/null +++ b/src/models/anthropiccachecontroldirective.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e8b49d71cdd5 + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; +import { + AnthropicCacheControlTtl, + AnthropicCacheControlTtl$outboundSchema, +} from "./anthropiccachecontrolttl.js"; + +export const AnthropicCacheControlDirectiveType = { + Ephemeral: "ephemeral", +} as const; +export type AnthropicCacheControlDirectiveType = ClosedEnum< + typeof AnthropicCacheControlDirectiveType +>; + +/** + * 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. + */ +export type AnthropicCacheControlDirective = { + ttl?: AnthropicCacheControlTtl | undefined; + type: AnthropicCacheControlDirectiveType; +}; + +/** @internal */ +export const AnthropicCacheControlDirectiveType$outboundSchema: z.ZodEnum< + typeof AnthropicCacheControlDirectiveType +> = z.enum(AnthropicCacheControlDirectiveType); + +/** @internal */ +export type AnthropicCacheControlDirective$Outbound = { + ttl?: string | undefined; + type: string; +}; + +/** @internal */ +export const AnthropicCacheControlDirective$outboundSchema: z.ZodType< + AnthropicCacheControlDirective$Outbound, + AnthropicCacheControlDirective +> = z.object({ + ttl: AnthropicCacheControlTtl$outboundSchema.optional(), + type: AnthropicCacheControlDirectiveType$outboundSchema, +}); + +export function anthropicCacheControlDirectiveToJSON( + anthropicCacheControlDirective: AnthropicCacheControlDirective, +): string { + return JSON.stringify( + AnthropicCacheControlDirective$outboundSchema.parse( + anthropicCacheControlDirective, + ), + ); +} diff --git a/src/models/anthropiccachecontrolttl.ts b/src/models/anthropiccachecontrolttl.ts new file mode 100644 index 00000000..1e06de28 --- /dev/null +++ b/src/models/anthropiccachecontrolttl.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d6c8b6f13cb1 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const AnthropicCacheControlTtl = { + Fivem: "5m", + Oneh: "1h", +} as const; +export type AnthropicCacheControlTtl = OpenEnum< + typeof AnthropicCacheControlTtl +>; + +/** @internal */ +export const AnthropicCacheControlTtl$inboundSchema: z.ZodType< + AnthropicCacheControlTtl, + unknown +> = openEnums.inboundSchema(AnthropicCacheControlTtl); +/** @internal */ +export const AnthropicCacheControlTtl$outboundSchema: z.ZodType< + string, + AnthropicCacheControlTtl +> = openEnums.outboundSchema(AnthropicCacheControlTtl); diff --git a/src/models/autorouterplugin.ts b/src/models/autorouterplugin.ts new file mode 100644 index 00000000..113a0e82 --- /dev/null +++ b/src/models/autorouterplugin.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e3853c83720d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type AutoRouterPlugin = { + /** + * 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. + */ + allowedModels?: Array | undefined; + /** + * Set to false to disable the auto-router plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + id: "auto-router"; +}; + +/** @internal */ +export type AutoRouterPlugin$Outbound = { + allowed_models?: Array | undefined; + enabled?: boolean | undefined; + id: "auto-router"; +}; + +/** @internal */ +export const AutoRouterPlugin$outboundSchema: z.ZodType< + AutoRouterPlugin$Outbound, + AutoRouterPlugin +> = z.object({ + allowedModels: z.array(z.string()).optional(), + enabled: z.boolean().optional(), + id: z.literal("auto-router"), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + }); +}); + +export function autoRouterPluginToJSON( + autoRouterPlugin: AutoRouterPlugin, +): string { + return JSON.stringify( + AutoRouterPlugin$outboundSchema.parse(autoRouterPlugin), + ); +} diff --git a/src/models/baseinputsunion.ts b/src/models/baseinputsunion.ts index 36e5c40d..852a9de4 100644 --- a/src/models/baseinputsunion.ts +++ b/src/models/baseinputsunion.ts @@ -4,8 +4,9 @@ */ import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -13,110 +14,65 @@ import { InputAudio, InputAudio$inboundSchema } from "./inputaudio.js"; import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; import { InputText, InputText$inboundSchema } from "./inputtext.js"; +import { + OpenAIResponseFunctionToolCall, + OpenAIResponseFunctionToolCall$inboundSchema, +} from "./openairesponsefunctiontoolcall.js"; +import { + OpenAIResponseFunctionToolCallOutput, + OpenAIResponseFunctionToolCallOutput$inboundSchema, +} from "./openairesponsefunctiontoolcalloutput.js"; +import { + OpenAIResponseInputMessageItem, + OpenAIResponseInputMessageItem$inboundSchema, +} from "./openairesponseinputmessageitem.js"; import { OutputItemImageGenerationCall, OutputItemImageGenerationCall$inboundSchema, } from "./outputitemimagegenerationcall.js"; import { OutputMessage, OutputMessage$inboundSchema } from "./outputmessage.js"; -import { - ToolCallStatusEnum, - ToolCallStatusEnum$inboundSchema, -} from "./toolcallstatusenum.js"; - -export const BaseInputsTypeFunctionCall = { - FunctionCall: "function_call", -} as const; -export type BaseInputsTypeFunctionCall = ClosedEnum< - typeof BaseInputsTypeFunctionCall ->; - -export type BaseInputsFunctionCall = { - type: BaseInputsTypeFunctionCall; - callId: string; - name: string; - arguments: string; - id?: string | undefined; - status?: ToolCallStatusEnum | null | undefined; -}; -export const BaseInputsTypeFunctionCallOutput = { - FunctionCallOutput: "function_call_output", -} as const; -export type BaseInputsTypeFunctionCallOutput = ClosedEnum< - typeof BaseInputsTypeFunctionCallOutput ->; - -export type BaseInputsOutput1 = - | InputText +export type BaseInputsContent1 = + | InputAudio + | InputFile | (InputImage & { type: "input_image" }) - | InputFile; - -export type BaseInputsOutput2 = - | string - | Array; - -export type BaseInputsFunctionCallOutput = { - type: BaseInputsTypeFunctionCallOutput; - id?: string | null | undefined; - callId: string; - output: - | string - | Array; - status?: ToolCallStatusEnum | null | undefined; -}; + | InputText + | discriminatedUnionTypes.Unknown<"type">; -export const BaseInputsTypeMessage2 = { - Message: "message", -} as const; -export type BaseInputsTypeMessage2 = ClosedEnum; +export type BaseInputsContent2 = + | Array< + | InputAudio + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type"> + > + | string; -export const BaseInputsRoleDeveloper2 = { - Developer: "developer", +export const BaseInputsPhaseFinalAnswer = { + FinalAnswer: "final_answer", } as const; -export type BaseInputsRoleDeveloper2 = ClosedEnum< - typeof BaseInputsRoleDeveloper2 +export type BaseInputsPhaseFinalAnswer = ClosedEnum< + typeof BaseInputsPhaseFinalAnswer >; -export const BaseInputsRoleSystem2 = { - System: "system", -} as const; -export type BaseInputsRoleSystem2 = ClosedEnum; - -export const BaseInputsRoleUser2 = { - User: "user", +export const BaseInputsPhaseCommentary = { + Commentary: "commentary", } as const; -export type BaseInputsRoleUser2 = ClosedEnum; - -export type BaseInputsRoleUnion2 = - | BaseInputsRoleUser2 - | BaseInputsRoleSystem2 - | BaseInputsRoleDeveloper2; - -export type BaseInputsContent3 = - | InputText - | (InputImage & { type: "input_image" }) - | InputFile - | InputAudio; - -export type BaseInputsMessage2 = { - id: string; - type?: BaseInputsTypeMessage2 | undefined; - role: BaseInputsRoleUser2 | BaseInputsRoleSystem2 | BaseInputsRoleDeveloper2; - content: Array< - InputText | (InputImage & { type: "input_image" }) | InputFile | InputAudio - >; -}; +export type BaseInputsPhaseCommentary = ClosedEnum< + typeof BaseInputsPhaseCommentary +>; -export const BaseInputsTypeMessage1 = { - Message: "message", -} as const; -export type BaseInputsTypeMessage1 = ClosedEnum; +export type BaseInputsPhaseUnion = + | BaseInputsPhaseCommentary + | BaseInputsPhaseFinalAnswer + | any; -export const BaseInputsRoleDeveloper1 = { +export const BaseInputsRoleDeveloper = { Developer: "developer", } as const; -export type BaseInputsRoleDeveloper1 = ClosedEnum< - typeof BaseInputsRoleDeveloper1 +export type BaseInputsRoleDeveloper = ClosedEnum< + typeof BaseInputsRoleDeveloper >; export const BaseInputsRoleAssistant = { @@ -126,66 +82,35 @@ export type BaseInputsRoleAssistant = ClosedEnum< typeof BaseInputsRoleAssistant >; -export const BaseInputsRoleSystem1 = { +export const BaseInputsRoleSystem = { System: "system", } as const; -export type BaseInputsRoleSystem1 = ClosedEnum; +export type BaseInputsRoleSystem = ClosedEnum; -export const BaseInputsRoleUser1 = { +export const BaseInputsRoleUser = { User: "user", } as const; -export type BaseInputsRoleUser1 = ClosedEnum; +export type BaseInputsRoleUser = ClosedEnum; -export type BaseInputsRoleUnion1 = - | BaseInputsRoleUser1 - | BaseInputsRoleSystem1 +export type BaseInputsRoleUnion = + | BaseInputsRoleUser + | BaseInputsRoleSystem | BaseInputsRoleAssistant - | BaseInputsRoleDeveloper1; - -export type BaseInputsContent1 = - | InputText - | (InputImage & { type: "input_image" }) - | InputFile - | InputAudio; - -export type BaseInputsContent2 = - | Array< - InputText | (InputImage & { type: "input_image" }) | InputFile | InputAudio - > - | string; - -export const BaseInputsPhaseFinalAnswer = { - FinalAnswer: "final_answer", -} as const; -export type BaseInputsPhaseFinalAnswer = ClosedEnum< - typeof BaseInputsPhaseFinalAnswer ->; + | BaseInputsRoleDeveloper; -export const BaseInputsPhaseCommentary = { - Commentary: "commentary", +export const BaseInputsType = { + Message: "message", } as const; -export type BaseInputsPhaseCommentary = ClosedEnum< - typeof BaseInputsPhaseCommentary ->; +export type BaseInputsType = ClosedEnum; -export type BaseInputsPhaseUnion = - | BaseInputsPhaseCommentary - | BaseInputsPhaseFinalAnswer - | any; - -export type BaseInputsMessage1 = { - type?: BaseInputsTypeMessage1 | undefined; - role: - | BaseInputsRoleUser1 - | BaseInputsRoleSystem1 - | BaseInputsRoleAssistant - | BaseInputsRoleDeveloper1; +export type BaseInputsMessage = { content: | Array< - | InputText - | (InputImage & { type: "input_image" }) - | InputFile | InputAudio + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type"> > | string; phase?: @@ -194,300 +119,46 @@ export type BaseInputsMessage1 = { | any | null | undefined; + role: + | BaseInputsRoleUser + | BaseInputsRoleSystem + | BaseInputsRoleAssistant + | BaseInputsRoleDeveloper; + type?: BaseInputsType | undefined; }; export type BaseInputsUnion1 = - | BaseInputsFunctionCall + | OpenAIResponseFunctionToolCall | OutputMessage - | BaseInputsMessage2 - | BaseInputsFunctionCallOutput + | OpenAIResponseInputMessageItem + | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall - | BaseInputsMessage1; + | BaseInputsMessage; export type BaseInputsUnion = | string | Array< - | BaseInputsFunctionCall + | OpenAIResponseFunctionToolCall | OutputMessage - | BaseInputsMessage2 - | BaseInputsFunctionCallOutput + | OpenAIResponseInputMessageItem + | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall - | BaseInputsMessage1 + | BaseInputsMessage > | any; -/** @internal */ -export const BaseInputsTypeFunctionCall$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeFunctionCall -> = z.enum(BaseInputsTypeFunctionCall); - -/** @internal */ -export const BaseInputsFunctionCall$inboundSchema: z.ZodType< - BaseInputsFunctionCall, - unknown -> = z.object({ - type: BaseInputsTypeFunctionCall$inboundSchema, - call_id: z.string(), - name: z.string(), - arguments: z.string(), - id: z.string().optional(), - status: z.nullable(ToolCallStatusEnum$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); - -export function baseInputsFunctionCallFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsFunctionCall$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsFunctionCall' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeFunctionCallOutput$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeFunctionCallOutput -> = z.enum(BaseInputsTypeFunctionCallOutput); - -/** @internal */ -export const BaseInputsOutput1$inboundSchema: z.ZodType< - BaseInputsOutput1, - unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, -]); - -export function baseInputsOutput1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsOutput1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsOutput1' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsOutput2$inboundSchema: z.ZodType< - BaseInputsOutput2, - unknown -> = z.union([ - z.string(), - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - ]), - ), -]); - -export function baseInputsOutput2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsOutput2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsOutput2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsFunctionCallOutput$inboundSchema: z.ZodType< - BaseInputsFunctionCallOutput, - unknown -> = z.object({ - type: BaseInputsTypeFunctionCallOutput$inboundSchema, - id: z.nullable(z.string()).optional(), - call_id: z.string(), - output: z.union([ - z.string(), - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - ]), - ), - ]), - status: z.nullable(ToolCallStatusEnum$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); - -export function baseInputsFunctionCallOutputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsFunctionCallOutput$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsFunctionCallOutput' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeMessage2$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeMessage2 -> = z.enum(BaseInputsTypeMessage2); - -/** @internal */ -export const BaseInputsRoleDeveloper2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleDeveloper2 -> = z.enum(BaseInputsRoleDeveloper2); - -/** @internal */ -export const BaseInputsRoleSystem2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleSystem2 -> = z.enum(BaseInputsRoleSystem2); - -/** @internal */ -export const BaseInputsRoleUser2$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleUser2 -> = z.enum(BaseInputsRoleUser2); - -/** @internal */ -export const BaseInputsRoleUnion2$inboundSchema: z.ZodType< - BaseInputsRoleUnion2, - unknown -> = z.union([ - BaseInputsRoleUser2$inboundSchema, - BaseInputsRoleSystem2$inboundSchema, - BaseInputsRoleDeveloper2$inboundSchema, -]); - -export function baseInputsRoleUnion2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsRoleUnion2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsRoleUnion2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsContent3$inboundSchema: z.ZodType< - BaseInputsContent3, - unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, - InputAudio$inboundSchema, -]); - -export function baseInputsContent3FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsContent3$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsContent3' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsMessage2$inboundSchema: z.ZodType< - BaseInputsMessage2, - unknown -> = z.object({ - id: z.string(), - type: BaseInputsTypeMessage2$inboundSchema.optional(), - role: z.union([ - BaseInputsRoleUser2$inboundSchema, - BaseInputsRoleSystem2$inboundSchema, - BaseInputsRoleDeveloper2$inboundSchema, - ]), - content: z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), -}); - -export function baseInputsMessage2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsMessage2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsMessage2' from JSON`, - ); -} - -/** @internal */ -export const BaseInputsTypeMessage1$inboundSchema: z.ZodEnum< - typeof BaseInputsTypeMessage1 -> = z.enum(BaseInputsTypeMessage1); - -/** @internal */ -export const BaseInputsRoleDeveloper1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleDeveloper1 -> = z.enum(BaseInputsRoleDeveloper1); - -/** @internal */ -export const BaseInputsRoleAssistant$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleAssistant -> = z.enum(BaseInputsRoleAssistant); - -/** @internal */ -export const BaseInputsRoleSystem1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleSystem1 -> = z.enum(BaseInputsRoleSystem1); - -/** @internal */ -export const BaseInputsRoleUser1$inboundSchema: z.ZodEnum< - typeof BaseInputsRoleUser1 -> = z.enum(BaseInputsRoleUser1); - -/** @internal */ -export const BaseInputsRoleUnion1$inboundSchema: z.ZodType< - BaseInputsRoleUnion1, - unknown -> = z.union([ - BaseInputsRoleUser1$inboundSchema, - BaseInputsRoleSystem1$inboundSchema, - BaseInputsRoleAssistant$inboundSchema, - BaseInputsRoleDeveloper1$inboundSchema, -]); - -export function baseInputsRoleUnion1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BaseInputsRoleUnion1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsRoleUnion1' from JSON`, - ); -} - /** @internal */ export const BaseInputsContent1$inboundSchema: z.ZodType< BaseInputsContent1, unknown -> = z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })), - InputFile$inboundSchema, - InputAudio$inboundSchema, -]); +> = discriminatedUnion("type", { + input_audio: InputAudio$inboundSchema, + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, +}); export function baseInputsContent1FromJSON( jsonString: string, @@ -504,16 +175,14 @@ export const BaseInputsContent2$inboundSchema: z.ZodType< BaseInputsContent2, unknown > = z.union([ - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), + z.array(discriminatedUnion("type", { + input_audio: InputAudio$inboundSchema, + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + })), z.string(), ]); @@ -558,28 +227,64 @@ export function baseInputsPhaseUnionFromJSON( } /** @internal */ -export const BaseInputsMessage1$inboundSchema: z.ZodType< - BaseInputsMessage1, +export const BaseInputsRoleDeveloper$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleDeveloper +> = z.enum(BaseInputsRoleDeveloper); + +/** @internal */ +export const BaseInputsRoleAssistant$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleAssistant +> = z.enum(BaseInputsRoleAssistant); + +/** @internal */ +export const BaseInputsRoleSystem$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleSystem +> = z.enum(BaseInputsRoleSystem); + +/** @internal */ +export const BaseInputsRoleUser$inboundSchema: z.ZodEnum< + typeof BaseInputsRoleUser +> = z.enum(BaseInputsRoleUser); + +/** @internal */ +export const BaseInputsRoleUnion$inboundSchema: z.ZodType< + BaseInputsRoleUnion, + unknown +> = z.union([ + BaseInputsRoleUser$inboundSchema, + BaseInputsRoleSystem$inboundSchema, + BaseInputsRoleAssistant$inboundSchema, + BaseInputsRoleDeveloper$inboundSchema, +]); + +export function baseInputsRoleUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BaseInputsRoleUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BaseInputsRoleUnion' from JSON`, + ); +} + +/** @internal */ +export const BaseInputsType$inboundSchema: z.ZodEnum = z + .enum(BaseInputsType); + +/** @internal */ +export const BaseInputsMessage$inboundSchema: z.ZodType< + BaseInputsMessage, unknown > = z.object({ - type: BaseInputsTypeMessage1$inboundSchema.optional(), - role: z.union([ - BaseInputsRoleUser1$inboundSchema, - BaseInputsRoleSystem1$inboundSchema, - BaseInputsRoleAssistant$inboundSchema, - BaseInputsRoleDeveloper1$inboundSchema, - ]), content: z.union([ - z.array( - z.union([ - InputText$inboundSchema, - InputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - InputFile$inboundSchema, - InputAudio$inboundSchema, - ]), - ), + z.array(discriminatedUnion("type", { + input_audio: InputAudio$inboundSchema, + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + })), z.string(), ]), phase: z.nullable( @@ -589,15 +294,22 @@ export const BaseInputsMessage1$inboundSchema: z.ZodType< z.any(), ]), ).optional(), + role: z.union([ + BaseInputsRoleUser$inboundSchema, + BaseInputsRoleSystem$inboundSchema, + BaseInputsRoleAssistant$inboundSchema, + BaseInputsRoleDeveloper$inboundSchema, + ]), + type: BaseInputsType$inboundSchema.optional(), }); -export function baseInputsMessage1FromJSON( +export function baseInputsMessageFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BaseInputsMessage1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BaseInputsMessage1' from JSON`, + (x) => BaseInputsMessage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BaseInputsMessage' from JSON`, ); } @@ -606,12 +318,12 @@ export const BaseInputsUnion1$inboundSchema: z.ZodType< BaseInputsUnion1, unknown > = z.union([ - z.lazy(() => BaseInputsFunctionCall$inboundSchema), + OpenAIResponseFunctionToolCall$inboundSchema, OutputMessage$inboundSchema, - z.lazy(() => BaseInputsMessage2$inboundSchema), - z.lazy(() => BaseInputsFunctionCallOutput$inboundSchema), + OpenAIResponseInputMessageItem$inboundSchema, + OpenAIResponseFunctionToolCallOutput$inboundSchema, OutputItemImageGenerationCall$inboundSchema, - z.lazy(() => BaseInputsMessage1$inboundSchema), + z.lazy(() => BaseInputsMessage$inboundSchema), ]); export function baseInputsUnion1FromJSON( @@ -630,14 +342,16 @@ export const BaseInputsUnion$inboundSchema: z.ZodType< unknown > = z.union([ z.string(), - z.array(z.union([ - z.lazy(() => BaseInputsFunctionCall$inboundSchema), - OutputMessage$inboundSchema, - z.lazy(() => BaseInputsMessage2$inboundSchema), - z.lazy(() => BaseInputsFunctionCallOutput$inboundSchema), - OutputItemImageGenerationCall$inboundSchema, - z.lazy(() => BaseInputsMessage1$inboundSchema), - ])), + z.array( + z.union([ + OpenAIResponseFunctionToolCall$inboundSchema, + OutputMessage$inboundSchema, + OpenAIResponseInputMessageItem$inboundSchema, + OpenAIResponseFunctionToolCallOutput$inboundSchema, + OutputItemImageGenerationCall$inboundSchema, + z.lazy(() => BaseInputsMessage$inboundSchema), + ]), + ), z.any(), ]); diff --git a/src/models/basereasoningconfig.ts b/src/models/basereasoningconfig.ts index 2fe05d1b..2d487fb5 100644 --- a/src/models/basereasoningconfig.ts +++ b/src/models/basereasoningconfig.ts @@ -8,17 +8,17 @@ import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { - ReasoningEffortEnum, - ReasoningEffortEnum$inboundSchema, -} from "./reasoningeffortenum.js"; + ReasoningEffort, + ReasoningEffort$inboundSchema, +} from "./reasoningeffort.js"; import { - ReasoningSummaryVerbosityEnum, - ReasoningSummaryVerbosityEnum$inboundSchema, -} from "./reasoningsummaryverbosityenum.js"; + ReasoningSummaryVerbosity, + ReasoningSummaryVerbosity$inboundSchema, +} from "./reasoningsummaryverbosity.js"; export type BaseReasoningConfig = { - effort?: ReasoningEffortEnum | null | undefined; - summary?: ReasoningSummaryVerbosityEnum | null | undefined; + effort?: ReasoningEffort | null | undefined; + summary?: ReasoningSummaryVerbosity | null | undefined; }; /** @internal */ @@ -26,8 +26,8 @@ export const BaseReasoningConfig$inboundSchema: z.ZodType< BaseReasoningConfig, unknown > = z.object({ - effort: z.nullable(ReasoningEffortEnum$inboundSchema).optional(), - summary: z.nullable(ReasoningSummaryVerbosityEnum$inboundSchema).optional(), + effort: z.nullable(ReasoningEffort$inboundSchema).optional(), + summary: z.nullable(ReasoningSummaryVerbosity$inboundSchema).optional(), }); export function baseReasoningConfigFromJSON( diff --git a/src/models/bulkassignkeysrequest.ts b/src/models/bulkassignkeysrequest.ts new file mode 100644 index 00000000..fa499133 --- /dev/null +++ b/src/models/bulkassignkeysrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ad0c5e35d467 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkAssignKeysRequest = { + /** + * Array of API key hashes to assign to the guardrail + */ + keyHashes: Array; +}; + +/** @internal */ +export type BulkAssignKeysRequest$Outbound = { + key_hashes: Array; +}; + +/** @internal */ +export const BulkAssignKeysRequest$outboundSchema: z.ZodType< + BulkAssignKeysRequest$Outbound, + BulkAssignKeysRequest +> = z.object({ + keyHashes: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + keyHashes: "key_hashes", + }); +}); + +export function bulkAssignKeysRequestToJSON( + bulkAssignKeysRequest: BulkAssignKeysRequest, +): string { + return JSON.stringify( + BulkAssignKeysRequest$outboundSchema.parse(bulkAssignKeysRequest), + ); +} diff --git a/src/models/bulkassignkeysresponse.ts b/src/models/bulkassignkeysresponse.ts new file mode 100644 index 00000000..24c5ab30 --- /dev/null +++ b/src/models/bulkassignkeysresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c8f692e7b579 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkAssignKeysResponse = { + /** + * Number of keys successfully assigned + */ + assignedCount: number; +}; + +/** @internal */ +export const BulkAssignKeysResponse$inboundSchema: z.ZodType< + BulkAssignKeysResponse, + unknown +> = z.object({ + assigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "assigned_count": "assignedCount", + }); +}); + +export function bulkAssignKeysResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkAssignKeysResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkAssignKeysResponse' from JSON`, + ); +} diff --git a/src/models/bulkassignmembersrequest.ts b/src/models/bulkassignmembersrequest.ts new file mode 100644 index 00000000..f7710317 --- /dev/null +++ b/src/models/bulkassignmembersrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 502ee2c0e36a + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkAssignMembersRequest = { + /** + * Array of member user IDs to assign to the guardrail + */ + memberUserIds: Array; +}; + +/** @internal */ +export type BulkAssignMembersRequest$Outbound = { + member_user_ids: Array; +}; + +/** @internal */ +export const BulkAssignMembersRequest$outboundSchema: z.ZodType< + BulkAssignMembersRequest$Outbound, + BulkAssignMembersRequest +> = z.object({ + memberUserIds: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + memberUserIds: "member_user_ids", + }); +}); + +export function bulkAssignMembersRequestToJSON( + bulkAssignMembersRequest: BulkAssignMembersRequest, +): string { + return JSON.stringify( + BulkAssignMembersRequest$outboundSchema.parse(bulkAssignMembersRequest), + ); +} diff --git a/src/models/bulkassignmembersresponse.ts b/src/models/bulkassignmembersresponse.ts new file mode 100644 index 00000000..53292cf5 --- /dev/null +++ b/src/models/bulkassignmembersresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e54fe72a28b7 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkAssignMembersResponse = { + /** + * Number of members successfully assigned + */ + assignedCount: number; +}; + +/** @internal */ +export const BulkAssignMembersResponse$inboundSchema: z.ZodType< + BulkAssignMembersResponse, + unknown +> = z.object({ + assigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "assigned_count": "assignedCount", + }); +}); + +export function bulkAssignMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkAssignMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkAssignMembersResponse' from JSON`, + ); +} diff --git a/src/models/bulkunassignkeysrequest.ts b/src/models/bulkunassignkeysrequest.ts new file mode 100644 index 00000000..05516b4e --- /dev/null +++ b/src/models/bulkunassignkeysrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e773f6f68c24 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkUnassignKeysRequest = { + /** + * Array of API key hashes to unassign from the guardrail + */ + keyHashes: Array; +}; + +/** @internal */ +export type BulkUnassignKeysRequest$Outbound = { + key_hashes: Array; +}; + +/** @internal */ +export const BulkUnassignKeysRequest$outboundSchema: z.ZodType< + BulkUnassignKeysRequest$Outbound, + BulkUnassignKeysRequest +> = z.object({ + keyHashes: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + keyHashes: "key_hashes", + }); +}); + +export function bulkUnassignKeysRequestToJSON( + bulkUnassignKeysRequest: BulkUnassignKeysRequest, +): string { + return JSON.stringify( + BulkUnassignKeysRequest$outboundSchema.parse(bulkUnassignKeysRequest), + ); +} diff --git a/src/models/bulkunassignkeysresponse.ts b/src/models/bulkunassignkeysresponse.ts new file mode 100644 index 00000000..dd2278eb --- /dev/null +++ b/src/models/bulkunassignkeysresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5906bcf3a524 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkUnassignKeysResponse = { + /** + * Number of keys successfully unassigned + */ + unassignedCount: number; +}; + +/** @internal */ +export const BulkUnassignKeysResponse$inboundSchema: z.ZodType< + BulkUnassignKeysResponse, + unknown +> = z.object({ + unassigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "unassigned_count": "unassignedCount", + }); +}); + +export function bulkUnassignKeysResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkUnassignKeysResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUnassignKeysResponse' from JSON`, + ); +} diff --git a/src/models/bulkunassignmembersrequest.ts b/src/models/bulkunassignmembersrequest.ts new file mode 100644 index 00000000..e37e7553 --- /dev/null +++ b/src/models/bulkunassignmembersrequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3443354340f5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type BulkUnassignMembersRequest = { + /** + * Array of member user IDs to unassign from the guardrail + */ + memberUserIds: Array; +}; + +/** @internal */ +export type BulkUnassignMembersRequest$Outbound = { + member_user_ids: Array; +}; + +/** @internal */ +export const BulkUnassignMembersRequest$outboundSchema: z.ZodType< + BulkUnassignMembersRequest$Outbound, + BulkUnassignMembersRequest +> = z.object({ + memberUserIds: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + memberUserIds: "member_user_ids", + }); +}); + +export function bulkUnassignMembersRequestToJSON( + bulkUnassignMembersRequest: BulkUnassignMembersRequest, +): string { + return JSON.stringify( + BulkUnassignMembersRequest$outboundSchema.parse(bulkUnassignMembersRequest), + ); +} diff --git a/src/models/bulkunassignmembersresponse.ts b/src/models/bulkunassignmembersresponse.ts new file mode 100644 index 00000000..fbf53dfb --- /dev/null +++ b/src/models/bulkunassignmembersresponse.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4d3857aa5f6c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BulkUnassignMembersResponse = { + /** + * Number of members successfully unassigned + */ + unassignedCount: number; +}; + +/** @internal */ +export const BulkUnassignMembersResponse$inboundSchema: z.ZodType< + BulkUnassignMembersResponse, + unknown +> = z.object({ + unassigned_count: z.int(), +}).transform((v) => { + return remap$(v, { + "unassigned_count": "unassignedCount", + }); +}); + +export function bulkUnassignMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkUnassignMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUnassignMembersResponse' from JSON`, + ); +} diff --git a/src/models/chatassistantmessage.ts b/src/models/chatassistantmessage.ts index e6629245..306db3ea 100644 --- a/src/models/chatassistantmessage.ts +++ b/src/models/chatassistantmessage.ts @@ -40,13 +40,6 @@ import { ReasoningDetailUnion$outboundSchema, } from "./reasoningdetailunion.js"; -export const ChatAssistantMessageRole = { - Assistant: "assistant", -} as const; -export type ChatAssistantMessageRole = ClosedEnum< - typeof ChatAssistantMessageRole ->; - /** * Assistant message content */ @@ -55,27 +48,33 @@ export type ChatAssistantMessageContent = | Array | any; +export const ChatAssistantMessageRole = { + Assistant: "assistant", +} as const; +export type ChatAssistantMessageRole = ClosedEnum< + typeof ChatAssistantMessageRole +>; + /** * Assistant message for requests and responses */ export type ChatAssistantMessage = { - role: ChatAssistantMessageRole; /** - * Assistant message content + * Audio output data or reference */ - content?: string | Array | any | null | undefined; + audio?: ChatAudioOutput | undefined; /** - * Optional name for the assistant + * Assistant message content */ - name?: string | undefined; + content?: string | Array | any | null | undefined; /** - * Tool calls made by the assistant + * Generated images from image generation models */ - toolCalls?: Array | undefined; + images?: Array | undefined; /** - * Refusal message if content was refused + * Optional name for the assistant */ - refusal?: string | null | undefined; + name?: string | undefined; /** * Reasoning output */ @@ -85,24 +84,16 @@ export type ChatAssistantMessage = { */ reasoningDetails?: Array | undefined; /** - * Generated images from image generation models + * Refusal message if content was refused */ - images?: Array | undefined; + refusal?: string | null | undefined; + role: ChatAssistantMessageRole; /** - * Audio output data or reference + * Tool calls made by the assistant */ - audio?: ChatAudioOutput | undefined; + toolCalls?: Array | undefined; }; -/** @internal */ -export const ChatAssistantMessageRole$inboundSchema: z.ZodEnum< - typeof ChatAssistantMessageRole -> = z.enum(ChatAssistantMessageRole); -/** @internal */ -export const ChatAssistantMessageRole$outboundSchema: z.ZodEnum< - typeof ChatAssistantMessageRole -> = ChatAssistantMessageRole$inboundSchema; - /** @internal */ export const ChatAssistantMessageContent$inboundSchema: z.ZodType< ChatAssistantMessageContent, @@ -139,39 +130,48 @@ export function chatAssistantMessageContentFromJSON( ); } +/** @internal */ +export const ChatAssistantMessageRole$inboundSchema: z.ZodEnum< + typeof ChatAssistantMessageRole +> = z.enum(ChatAssistantMessageRole); +/** @internal */ +export const ChatAssistantMessageRole$outboundSchema: z.ZodEnum< + typeof ChatAssistantMessageRole +> = ChatAssistantMessageRole$inboundSchema; + /** @internal */ export const ChatAssistantMessage$inboundSchema: z.ZodType< ChatAssistantMessage, unknown > = z.object({ - role: ChatAssistantMessageRole$inboundSchema, + audio: ChatAudioOutput$inboundSchema.optional(), content: z.nullable( z.union([z.string(), z.array(ChatContentItems$inboundSchema), z.any()]), ).optional(), + images: z.array(ChatAssistantImages$inboundSchema).optional(), name: z.string().optional(), - tool_calls: z.array(ChatToolCall$inboundSchema).optional(), - refusal: z.nullable(z.string()).optional(), reasoning: z.nullable(z.string()).optional(), reasoning_details: z.array(ReasoningDetailUnion$inboundSchema).optional(), - images: z.array(ChatAssistantImages$inboundSchema).optional(), - audio: ChatAudioOutput$inboundSchema.optional(), + refusal: z.nullable(z.string()).optional(), + role: ChatAssistantMessageRole$inboundSchema, + tool_calls: z.array(ChatToolCall$inboundSchema).optional(), }).transform((v) => { return remap$(v, { - "tool_calls": "toolCalls", "reasoning_details": "reasoningDetails", + "tool_calls": "toolCalls", }); }); /** @internal */ export type ChatAssistantMessage$Outbound = { - role: string; + audio?: ChatAudioOutput$Outbound | undefined; content?: string | Array | any | null | undefined; + images?: Array | undefined; name?: string | undefined; - tool_calls?: Array | undefined; - refusal?: string | null | undefined; reasoning?: string | null | undefined; reasoning_details?: Array | undefined; - images?: Array | undefined; - audio?: ChatAudioOutput$Outbound | undefined; + refusal?: string | null | undefined; + role: string; + tool_calls?: Array | undefined; }; /** @internal */ @@ -179,21 +179,21 @@ export const ChatAssistantMessage$outboundSchema: z.ZodType< ChatAssistantMessage$Outbound, ChatAssistantMessage > = z.object({ - role: ChatAssistantMessageRole$outboundSchema, + audio: ChatAudioOutput$outboundSchema.optional(), content: z.nullable( z.union([z.string(), z.array(ChatContentItems$outboundSchema), z.any()]), ).optional(), + images: z.array(ChatAssistantImages$outboundSchema).optional(), name: z.string().optional(), - toolCalls: z.array(ChatToolCall$outboundSchema).optional(), - refusal: z.nullable(z.string()).optional(), reasoning: z.nullable(z.string()).optional(), reasoningDetails: z.array(ReasoningDetailUnion$outboundSchema).optional(), - images: z.array(ChatAssistantImages$outboundSchema).optional(), - audio: ChatAudioOutput$outboundSchema.optional(), + refusal: z.nullable(z.string()).optional(), + role: ChatAssistantMessageRole$outboundSchema, + toolCalls: z.array(ChatToolCall$outboundSchema).optional(), }).transform((v) => { return remap$(v, { - toolCalls: "tool_calls", reasoningDetails: "reasoning_details", + toolCalls: "tool_calls", }); }); diff --git a/src/models/chataudiooutput.ts b/src/models/chataudiooutput.ts index 848f5f6f..68f2fd5b 100644 --- a/src/models/chataudiooutput.ts +++ b/src/models/chataudiooutput.ts @@ -14,17 +14,17 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; */ export type ChatAudioOutput = { /** - * Audio output identifier + * Base64 encoded audio data */ - id?: string | undefined; + data?: string | undefined; /** * Audio expiration timestamp */ expiresAt?: number | undefined; /** - * Base64 encoded audio data + * Audio output identifier */ - data?: string | undefined; + id?: string | undefined; /** * Audio transcript */ @@ -36,9 +36,9 @@ export const ChatAudioOutput$inboundSchema: z.ZodType< ChatAudioOutput, unknown > = z.object({ - id: z.string().optional(), - expires_at: z.number().optional(), data: z.string().optional(), + expires_at: z.int().optional(), + id: z.string().optional(), transcript: z.string().optional(), }).transform((v) => { return remap$(v, { @@ -47,9 +47,9 @@ export const ChatAudioOutput$inboundSchema: z.ZodType< }); /** @internal */ export type ChatAudioOutput$Outbound = { - id?: string | undefined; - expires_at?: number | undefined; data?: string | undefined; + expires_at?: number | undefined; + id?: string | undefined; transcript?: string | undefined; }; @@ -58,9 +58,9 @@ export const ChatAudioOutput$outboundSchema: z.ZodType< ChatAudioOutput$Outbound, ChatAudioOutput > = z.object({ - id: z.string().optional(), - expiresAt: z.number().optional(), data: z.string().optional(), + expiresAt: z.int().optional(), + id: z.string().optional(), transcript: z.string().optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatchoice.ts b/src/models/chatchoice.ts index 18d99a37..529fe2df 100644 --- a/src/models/chatchoice.ts +++ b/src/models/chatchoice.ts @@ -11,6 +11,10 @@ import { ChatAssistantMessage, ChatAssistantMessage$inboundSchema, } from "./chatassistantmessage.js"; +import { + ChatFinishReasonEnum, + ChatFinishReasonEnum$inboundSchema, +} from "./chatfinishreasonenum.js"; import { ChatTokenLogprobs, ChatTokenLogprobs$inboundSchema, @@ -21,28 +25,28 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Chat completion choice */ export type ChatChoice = { - finishReason: any | null; + finishReason: ChatFinishReasonEnum | null; /** * Choice index */ index: number; - /** - * Assistant message for requests and responses - */ - message: ChatAssistantMessage; /** * Log probabilities for the completion */ logprobs?: ChatTokenLogprobs | null | undefined; + /** + * Assistant message for requests and responses + */ + message: ChatAssistantMessage; }; /** @internal */ export const ChatChoice$inboundSchema: z.ZodType = z .object({ - finish_reason: z.nullable(z.any()), - index: z.number(), - message: ChatAssistantMessage$inboundSchema, + finish_reason: z.nullable(ChatFinishReasonEnum$inboundSchema), + index: z.int(), logprobs: z.nullable(ChatTokenLogprobs$inboundSchema).optional(), + message: ChatAssistantMessage$inboundSchema, }).transform((v) => { return remap$(v, { "finish_reason": "finishReason", diff --git a/src/models/chatcontentaudio.ts b/src/models/chatcontentaudio.ts index 2719c9b9..bca814d4 100644 --- a/src/models/chatcontentaudio.ts +++ b/src/models/chatcontentaudio.ts @@ -6,15 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentAudioType = { - InputAudio: "input_audio", -} as const; -export type ChatContentAudioType = ClosedEnum; - export type ChatContentAudioInputAudio = { /** * Base64 encoded audio data @@ -30,19 +24,10 @@ export type ChatContentAudioInputAudio = { * Audio input content part. Supported audio formats vary by provider. */ export type ChatContentAudio = { - type: ChatContentAudioType; inputAudio: ChatContentAudioInputAudio; + type: "input_audio"; }; -/** @internal */ -export const ChatContentAudioType$inboundSchema: z.ZodEnum< - typeof ChatContentAudioType -> = z.enum(ChatContentAudioType); -/** @internal */ -export const ChatContentAudioType$outboundSchema: z.ZodEnum< - typeof ChatContentAudioType -> = ChatContentAudioType$inboundSchema; - /** @internal */ export const ChatContentAudioInputAudio$inboundSchema: z.ZodType< ChatContentAudioInputAudio, @@ -88,8 +73,8 @@ export const ChatContentAudio$inboundSchema: z.ZodType< ChatContentAudio, unknown > = z.object({ - type: ChatContentAudioType$inboundSchema, input_audio: z.lazy(() => ChatContentAudioInputAudio$inboundSchema), + type: z.literal("input_audio"), }).transform((v) => { return remap$(v, { "input_audio": "inputAudio", @@ -97,8 +82,8 @@ export const ChatContentAudio$inboundSchema: z.ZodType< }); /** @internal */ export type ChatContentAudio$Outbound = { - type: string; input_audio: ChatContentAudioInputAudio$Outbound; + type: "input_audio"; }; /** @internal */ @@ -106,8 +91,8 @@ export const ChatContentAudio$outboundSchema: z.ZodType< ChatContentAudio$Outbound, ChatContentAudio > = z.object({ - type: ChatContentAudioType$outboundSchema, inputAudio: z.lazy(() => ChatContentAudioInputAudio$outboundSchema), + type: z.literal("input_audio"), }).transform((v) => { return remap$(v, { inputAudio: "input_audio", diff --git a/src/models/chatcontentcachecontrol.ts b/src/models/chatcontentcachecontrol.ts index 19802719..9d3332a0 100644 --- a/src/models/chatcontentcachecontrol.ts +++ b/src/models/chatcontentcachecontrol.ts @@ -5,9 +5,13 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; +import { + AnthropicCacheControlTtl, + AnthropicCacheControlTtl$inboundSchema, + AnthropicCacheControlTtl$outboundSchema, +} from "./anthropiccachecontrolttl.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export const ChatContentCacheControlType = { @@ -17,20 +21,12 @@ export type ChatContentCacheControlType = ClosedEnum< typeof ChatContentCacheControlType >; -export const ChatContentCacheControlTtl = { - Fivem: "5m", - Oneh: "1h", -} as const; -export type ChatContentCacheControlTtl = OpenEnum< - typeof ChatContentCacheControlTtl ->; - /** * Cache control for the content part */ export type ChatContentCacheControl = { + ttl?: AnthropicCacheControlTtl | undefined; type: ChatContentCacheControlType; - ttl?: ChatContentCacheControlTtl | undefined; }; /** @internal */ @@ -42,29 +38,18 @@ export const ChatContentCacheControlType$outboundSchema: z.ZodEnum< typeof ChatContentCacheControlType > = ChatContentCacheControlType$inboundSchema; -/** @internal */ -export const ChatContentCacheControlTtl$inboundSchema: z.ZodType< - ChatContentCacheControlTtl, - unknown -> = openEnums.inboundSchema(ChatContentCacheControlTtl); -/** @internal */ -export const ChatContentCacheControlTtl$outboundSchema: z.ZodType< - string, - ChatContentCacheControlTtl -> = openEnums.outboundSchema(ChatContentCacheControlTtl); - /** @internal */ export const ChatContentCacheControl$inboundSchema: z.ZodType< ChatContentCacheControl, unknown > = z.object({ + ttl: AnthropicCacheControlTtl$inboundSchema.optional(), type: ChatContentCacheControlType$inboundSchema, - ttl: ChatContentCacheControlTtl$inboundSchema.optional(), }); /** @internal */ export type ChatContentCacheControl$Outbound = { - type: string; ttl?: string | undefined; + type: string; }; /** @internal */ @@ -72,8 +57,8 @@ export const ChatContentCacheControl$outboundSchema: z.ZodType< ChatContentCacheControl$Outbound, ChatContentCacheControl > = z.object({ + ttl: AnthropicCacheControlTtl$outboundSchema.optional(), type: ChatContentCacheControlType$outboundSchema, - ttl: ChatContentCacheControlTtl$outboundSchema.optional(), }); export function chatContentCacheControlToJSON( diff --git a/src/models/chatcontentfile.ts b/src/models/chatcontentfile.ts index 9011ad27..a1d44bc9 100644 --- a/src/models/chatcontentfile.ts +++ b/src/models/chatcontentfile.ts @@ -6,15 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentFileType = { - File: "file", -} as const; -export type ChatContentFileType = ClosedEnum; - export type FileT = { /** * File content as base64 data URL or URL @@ -34,19 +28,10 @@ export type FileT = { * File content part for document processing */ export type ChatContentFile = { - type: ChatContentFileType; file: FileT; + type: "file"; }; -/** @internal */ -export const ChatContentFileType$inboundSchema: z.ZodEnum< - typeof ChatContentFileType -> = z.enum(ChatContentFileType); -/** @internal */ -export const ChatContentFileType$outboundSchema: z.ZodEnum< - typeof ChatContentFileType -> = ChatContentFileType$inboundSchema; - /** @internal */ export const FileT$inboundSchema: z.ZodType = z.object({ file_data: z.string().optional(), @@ -95,13 +80,13 @@ export const ChatContentFile$inboundSchema: z.ZodType< ChatContentFile, unknown > = z.object({ - type: ChatContentFileType$inboundSchema, file: z.lazy(() => FileT$inboundSchema), + type: z.literal("file"), }); /** @internal */ export type ChatContentFile$Outbound = { - type: string; file: FileT$Outbound; + type: "file"; }; /** @internal */ @@ -109,8 +94,8 @@ export const ChatContentFile$outboundSchema: z.ZodType< ChatContentFile$Outbound, ChatContentFile > = z.object({ - type: ChatContentFileType$outboundSchema, file: z.lazy(() => FileT$outboundSchema), + type: z.literal("file"), }); export function chatContentFileToJSON( diff --git a/src/models/chatcontentimage.ts b/src/models/chatcontentimage.ts index 88e500bb..c4827143 100644 --- a/src/models/chatcontentimage.ts +++ b/src/models/chatcontentimage.ts @@ -7,15 +7,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatContentImageType = { - ImageUrl: "image_url", -} as const; -export type ChatContentImageType = ClosedEnum; - /** * Image detail level for vision models */ @@ -30,33 +25,24 @@ export const ChatContentImageDetail = { export type ChatContentImageDetail = OpenEnum; export type ChatContentImageImageUrl = { - /** - * URL of the image (data: URLs supported) - */ - url: string; /** * Image detail level for vision models */ detail?: ChatContentImageDetail | undefined; + /** + * URL of the image (data: URLs supported) + */ + url: string; }; /** * Image content part for vision models */ export type ChatContentImage = { - type: ChatContentImageType; imageUrl: ChatContentImageImageUrl; + type: "image_url"; }; -/** @internal */ -export const ChatContentImageType$inboundSchema: z.ZodEnum< - typeof ChatContentImageType -> = z.enum(ChatContentImageType); -/** @internal */ -export const ChatContentImageType$outboundSchema: z.ZodEnum< - typeof ChatContentImageType -> = ChatContentImageType$inboundSchema; - /** @internal */ export const ChatContentImageDetail$inboundSchema: z.ZodType< ChatContentImageDetail, @@ -73,13 +59,13 @@ export const ChatContentImageImageUrl$inboundSchema: z.ZodType< ChatContentImageImageUrl, unknown > = z.object({ - url: z.string(), detail: ChatContentImageDetail$inboundSchema.optional(), + url: z.string(), }); /** @internal */ export type ChatContentImageImageUrl$Outbound = { - url: string; detail?: string | undefined; + url: string; }; /** @internal */ @@ -87,8 +73,8 @@ export const ChatContentImageImageUrl$outboundSchema: z.ZodType< ChatContentImageImageUrl$Outbound, ChatContentImageImageUrl > = z.object({ - url: z.string(), detail: ChatContentImageDetail$outboundSchema.optional(), + url: z.string(), }); export function chatContentImageImageUrlToJSON( @@ -113,8 +99,8 @@ export const ChatContentImage$inboundSchema: z.ZodType< ChatContentImage, unknown > = z.object({ - type: ChatContentImageType$inboundSchema, image_url: z.lazy(() => ChatContentImageImageUrl$inboundSchema), + type: z.literal("image_url"), }).transform((v) => { return remap$(v, { "image_url": "imageUrl", @@ -122,8 +108,8 @@ export const ChatContentImage$inboundSchema: z.ZodType< }); /** @internal */ export type ChatContentImage$Outbound = { - type: string; image_url: ChatContentImageImageUrl$Outbound; + type: "image_url"; }; /** @internal */ @@ -131,8 +117,8 @@ export const ChatContentImage$outboundSchema: z.ZodType< ChatContentImage$Outbound, ChatContentImage > = z.object({ - type: ChatContentImageType$outboundSchema, imageUrl: z.lazy(() => ChatContentImageImageUrl$outboundSchema), + type: z.literal("image_url"), }).transform((v) => { return remap$(v, { imageUrl: "image_url", diff --git a/src/models/chatcontentitems.ts b/src/models/chatcontentitems.ts index 94b65745..13114d25 100644 --- a/src/models/chatcontentitems.ts +++ b/src/models/chatcontentitems.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { ChatContentAudio, @@ -44,79 +46,39 @@ import { LegacyChatContentVideo$outboundSchema, } from "./legacychatcontentvideo.js"; -export type ChatContentItems1 = LegacyChatContentVideo | ChatContentVideo; - /** * Content part for chat completion messages */ export type ChatContentItems = - | ChatContentText + | ChatContentFile | ChatContentImage | ChatContentAudio - | ChatContentFile | LegacyChatContentVideo - | ChatContentVideo; - -/** @internal */ -export const ChatContentItems1$inboundSchema: z.ZodType< - ChatContentItems1, - unknown -> = z.union([ - LegacyChatContentVideo$inboundSchema, - ChatContentVideo$inboundSchema, -]); -/** @internal */ -export type ChatContentItems1$Outbound = - | LegacyChatContentVideo$Outbound - | ChatContentVideo$Outbound; - -/** @internal */ -export const ChatContentItems1$outboundSchema: z.ZodType< - ChatContentItems1$Outbound, - ChatContentItems1 -> = z.union([ - LegacyChatContentVideo$outboundSchema, - ChatContentVideo$outboundSchema, -]); - -export function chatContentItems1ToJSON( - chatContentItems1: ChatContentItems1, -): string { - return JSON.stringify( - ChatContentItems1$outboundSchema.parse(chatContentItems1), - ); -} -export function chatContentItems1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChatContentItems1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatContentItems1' from JSON`, - ); -} + | (ChatContentText & { type: "text" }) + | ChatContentVideo + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const ChatContentItems$inboundSchema: z.ZodType< ChatContentItems, unknown -> = z.union([ - ChatContentText$inboundSchema, - ChatContentImage$inboundSchema, - ChatContentAudio$inboundSchema, - ChatContentFile$inboundSchema, - z.union([ - LegacyChatContentVideo$inboundSchema, - ChatContentVideo$inboundSchema, - ]), -]); +> = discriminatedUnion("type", { + file: ChatContentFile$inboundSchema, + image_url: ChatContentImage$inboundSchema, + input_audio: ChatContentAudio$inboundSchema, + input_video: LegacyChatContentVideo$inboundSchema, + text: ChatContentText$inboundSchema.and( + z.object({ type: z.literal("text") }), + ), + video_url: ChatContentVideo$inboundSchema, +}); /** @internal */ export type ChatContentItems$Outbound = - | ChatContentText$Outbound + | ChatContentFile$Outbound | ChatContentImage$Outbound | ChatContentAudio$Outbound - | ChatContentFile$Outbound | LegacyChatContentVideo$Outbound + | (ChatContentText$Outbound & { type: "text" }) | ChatContentVideo$Outbound; /** @internal */ @@ -124,14 +86,12 @@ export const ChatContentItems$outboundSchema: z.ZodType< ChatContentItems$Outbound, ChatContentItems > = z.union([ - ChatContentText$outboundSchema, + ChatContentFile$outboundSchema, ChatContentImage$outboundSchema, ChatContentAudio$outboundSchema, - ChatContentFile$outboundSchema, - z.union([ - LegacyChatContentVideo$outboundSchema, - ChatContentVideo$outboundSchema, - ]), + LegacyChatContentVideo$outboundSchema, + ChatContentText$outboundSchema.and(z.object({ type: z.literal("text") })), + ChatContentVideo$outboundSchema, ]); export function chatContentItemsToJSON( diff --git a/src/models/chatcontenttext.ts b/src/models/chatcontenttext.ts index 4a895ef3..f06d6e45 100644 --- a/src/models/chatcontenttext.ts +++ b/src/models/chatcontenttext.ts @@ -25,12 +25,12 @@ export type ChatContentTextType = ClosedEnum; * Text content part */ export type ChatContentText = { - type: ChatContentTextType; - text: string; /** * Cache control for the content part */ cacheControl?: ChatContentCacheControl | undefined; + text: string; + type: ChatContentTextType; }; /** @internal */ @@ -47,9 +47,9 @@ export const ChatContentText$inboundSchema: z.ZodType< ChatContentText, unknown > = z.object({ - type: ChatContentTextType$inboundSchema, - text: z.string(), cache_control: ChatContentCacheControl$inboundSchema.optional(), + text: z.string(), + type: ChatContentTextType$inboundSchema, }).transform((v) => { return remap$(v, { "cache_control": "cacheControl", @@ -57,9 +57,9 @@ export const ChatContentText$inboundSchema: z.ZodType< }); /** @internal */ export type ChatContentText$Outbound = { - type: string; - text: string; cache_control?: ChatContentCacheControl$Outbound | undefined; + text: string; + type: string; }; /** @internal */ @@ -67,9 +67,9 @@ export const ChatContentText$outboundSchema: z.ZodType< ChatContentText$Outbound, ChatContentText > = z.object({ - type: ChatContentTextType$outboundSchema, - text: z.string(), cacheControl: ChatContentCacheControl$outboundSchema.optional(), + text: z.string(), + type: ChatContentTextType$outboundSchema, }).transform((v) => { return remap$(v, { cacheControl: "cache_control", diff --git a/src/models/chatdevelopermessage.ts b/src/models/chatdevelopermessage.ts index 545fb2cc..3544269f 100644 --- a/src/models/chatdevelopermessage.ts +++ b/src/models/chatdevelopermessage.ts @@ -19,7 +19,6 @@ export type ChatDeveloperMessageContent = string | Array; * Developer message */ export type ChatDeveloperMessage = { - role: "developer"; /** * Developer message content */ @@ -28,6 +27,7 @@ export type ChatDeveloperMessage = { * Optional name for the developer message */ name?: string | undefined; + role: "developer"; }; /** @internal */ @@ -53,9 +53,9 @@ export function chatDeveloperMessageContentToJSON( /** @internal */ export type ChatDeveloperMessage$Outbound = { - role: "developer"; content: string | Array; name?: string | undefined; + role: "developer"; }; /** @internal */ @@ -63,9 +63,9 @@ export const ChatDeveloperMessage$outboundSchema: z.ZodType< ChatDeveloperMessage$Outbound, ChatDeveloperMessage > = z.object({ - role: z.literal("developer"), content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]), name: z.string().optional(), + role: z.literal("developer"), }); export function chatDeveloperMessageToJSON( diff --git a/src/models/chatformatgrammarconfig.ts b/src/models/chatformatgrammarconfig.ts index 29164947..a514a223 100644 --- a/src/models/chatformatgrammarconfig.ts +++ b/src/models/chatformatgrammarconfig.ts @@ -9,17 +9,17 @@ import * as z from "zod/v4"; * Custom grammar response format */ export type ChatFormatGrammarConfig = { - type: "grammar"; /** * Custom grammar for text generation */ grammar: string; + type: "grammar"; }; /** @internal */ export type ChatFormatGrammarConfig$Outbound = { - type: "grammar"; grammar: string; + type: "grammar"; }; /** @internal */ @@ -27,8 +27,8 @@ export const ChatFormatGrammarConfig$outboundSchema: z.ZodType< ChatFormatGrammarConfig$Outbound, ChatFormatGrammarConfig > = z.object({ - type: z.literal("grammar"), grammar: z.string(), + type: z.literal("grammar"), }); export function chatFormatGrammarConfigToJSON( diff --git a/src/models/chatformatjsonschemaconfig.ts b/src/models/chatformatjsonschemaconfig.ts index 6fa6fa6a..a469441a 100644 --- a/src/models/chatformatjsonschemaconfig.ts +++ b/src/models/chatformatjsonschemaconfig.ts @@ -15,17 +15,17 @@ import { * JSON Schema response format for structured outputs */ export type ChatFormatJsonSchemaConfig = { - type: "json_schema"; /** * JSON Schema configuration object */ jsonSchema: ChatJsonSchemaConfig; + type: "json_schema"; }; /** @internal */ export type ChatFormatJsonSchemaConfig$Outbound = { - type: "json_schema"; json_schema: ChatJsonSchemaConfig$Outbound; + type: "json_schema"; }; /** @internal */ @@ -33,8 +33,8 @@ export const ChatFormatJsonSchemaConfig$outboundSchema: z.ZodType< ChatFormatJsonSchemaConfig$Outbound, ChatFormatJsonSchemaConfig > = z.object({ - type: z.literal("json_schema"), jsonSchema: ChatJsonSchemaConfig$outboundSchema, + type: z.literal("json_schema"), }).transform((v) => { return remap$(v, { jsonSchema: "json_schema", diff --git a/src/models/chatfunctiontool.ts b/src/models/chatfunctiontool.ts index 01c555d7..719fcb5a 100644 --- a/src/models/chatfunctiontool.ts +++ b/src/models/chatfunctiontool.ts @@ -11,11 +11,6 @@ import { ChatContentCacheControl$Outbound, ChatContentCacheControl$outboundSchema, } from "./chatcontentcachecontrol.js"; -import { - ChatWebSearchServerTool, - ChatWebSearchServerTool$Outbound, - ChatWebSearchServerTool$outboundSchema, -} from "./chatwebsearchservertool.js"; import { ChatWebSearchShorthand, ChatWebSearchShorthand$Outbound, @@ -26,24 +21,24 @@ import { DatetimeServerTool$Outbound, DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js"; - -export const ChatFunctionToolType = { - Function: "function", -} as const; -export type ChatFunctionToolType = ClosedEnum; +import { + OpenRouterWebSearchServerTool, + OpenRouterWebSearchServerTool$Outbound, + OpenRouterWebSearchServerTool$outboundSchema, +} from "./openrouterwebsearchservertool.js"; /** * Function definition for tool calling */ export type ChatFunctionToolFunctionFunction = { - /** - * Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - */ - name: string; /** * Function description for the model */ description?: string | undefined; + /** + * Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + */ + name: string; /** * Function parameters as JSON Schema object */ @@ -54,16 +49,21 @@ export type ChatFunctionToolFunctionFunction = { strict?: boolean | null | undefined; }; +export const ChatFunctionToolType = { + Function: "function", +} as const; +export type ChatFunctionToolType = ClosedEnum; + export type ChatFunctionToolFunction = { - type: ChatFunctionToolType; - /** - * Function definition for tool calling - */ - function: ChatFunctionToolFunctionFunction; /** * Cache control for the content part */ cacheControl?: ChatContentCacheControl | undefined; + /** + * Function definition for tool calling + */ + function: ChatFunctionToolFunctionFunction; + type: ChatFunctionToolType; }; /** @@ -72,18 +72,13 @@ export type ChatFunctionToolFunction = { export type ChatFunctionTool = | ChatFunctionToolFunction | DatetimeServerTool - | ChatWebSearchServerTool + | OpenRouterWebSearchServerTool | ChatWebSearchShorthand; -/** @internal */ -export const ChatFunctionToolType$outboundSchema: z.ZodEnum< - typeof ChatFunctionToolType -> = z.enum(ChatFunctionToolType); - /** @internal */ export type ChatFunctionToolFunctionFunction$Outbound = { - name: string; description?: string | undefined; + name: string; parameters?: { [k: string]: any | null } | undefined; strict?: boolean | null | undefined; }; @@ -93,8 +88,8 @@ export const ChatFunctionToolFunctionFunction$outboundSchema: z.ZodType< ChatFunctionToolFunctionFunction$Outbound, ChatFunctionToolFunctionFunction > = z.object({ - name: z.string(), description: z.string().optional(), + name: z.string(), parameters: z.record(z.string(), z.nullable(z.any())).optional(), strict: z.nullable(z.boolean()).optional(), }); @@ -109,11 +104,16 @@ export function chatFunctionToolFunctionFunctionToJSON( ); } +/** @internal */ +export const ChatFunctionToolType$outboundSchema: z.ZodEnum< + typeof ChatFunctionToolType +> = z.enum(ChatFunctionToolType); + /** @internal */ export type ChatFunctionToolFunction$Outbound = { - type: string; - function: ChatFunctionToolFunctionFunction$Outbound; cache_control?: ChatContentCacheControl$Outbound | undefined; + function: ChatFunctionToolFunctionFunction$Outbound; + type: string; }; /** @internal */ @@ -121,9 +121,9 @@ export const ChatFunctionToolFunction$outboundSchema: z.ZodType< ChatFunctionToolFunction$Outbound, ChatFunctionToolFunction > = z.object({ - type: ChatFunctionToolType$outboundSchema, - function: z.lazy(() => ChatFunctionToolFunctionFunction$outboundSchema), cacheControl: ChatContentCacheControl$outboundSchema.optional(), + function: z.lazy(() => ChatFunctionToolFunctionFunction$outboundSchema), + type: ChatFunctionToolType$outboundSchema, }).transform((v) => { return remap$(v, { cacheControl: "cache_control", @@ -142,7 +142,7 @@ export function chatFunctionToolFunctionToJSON( export type ChatFunctionTool$Outbound = | ChatFunctionToolFunction$Outbound | DatetimeServerTool$Outbound - | ChatWebSearchServerTool$Outbound + | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound; /** @internal */ @@ -152,7 +152,7 @@ export const ChatFunctionTool$outboundSchema: z.ZodType< > = z.union([ z.lazy(() => ChatFunctionToolFunction$outboundSchema), DatetimeServerTool$outboundSchema, - ChatWebSearchServerTool$outboundSchema, + OpenRouterWebSearchServerTool$outboundSchema, ChatWebSearchShorthand$outboundSchema, ]); diff --git a/src/models/chatjsonschemaconfig.ts b/src/models/chatjsonschemaconfig.ts index 6b612242..50dc4ef5 100644 --- a/src/models/chatjsonschemaconfig.ts +++ b/src/models/chatjsonschemaconfig.ts @@ -9,14 +9,14 @@ import * as z from "zod/v4"; * JSON Schema configuration object */ export type ChatJsonSchemaConfig = { - /** - * Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - */ - name: string; /** * Schema description for the model */ description?: string | undefined; + /** + * Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + */ + name: string; /** * JSON Schema object */ @@ -29,8 +29,8 @@ export type ChatJsonSchemaConfig = { /** @internal */ export type ChatJsonSchemaConfig$Outbound = { - name: string; description?: string | undefined; + name: string; schema?: { [k: string]: any | null } | undefined; strict?: boolean | null | undefined; }; @@ -40,8 +40,8 @@ export const ChatJsonSchemaConfig$outboundSchema: z.ZodType< ChatJsonSchemaConfig$Outbound, ChatJsonSchemaConfig > = z.object({ - name: z.string(), description: z.string().optional(), + name: z.string(), schema: z.record(z.string(), z.nullable(z.any())).optional(), strict: z.nullable(z.boolean()).optional(), }); diff --git a/src/models/chatmessages.ts b/src/models/chatmessages.ts index af1e4f1b..e8ac601f 100644 --- a/src/models/chatmessages.ts +++ b/src/models/chatmessages.ts @@ -34,32 +34,32 @@ import { * Chat completion message with role-based discrimination */ export type ChatMessages = - | ChatSystemMessage - | ChatUserMessage - | ChatDeveloperMessage | (ChatAssistantMessage & { role: "assistant" }) - | ChatToolMessage; + | ChatDeveloperMessage + | ChatSystemMessage + | ChatToolMessage + | ChatUserMessage; /** @internal */ export type ChatMessages$Outbound = - | ChatSystemMessage$Outbound - | ChatUserMessage$Outbound - | ChatDeveloperMessage$Outbound | (ChatAssistantMessage$Outbound & { role: "assistant" }) - | ChatToolMessage$Outbound; + | ChatDeveloperMessage$Outbound + | ChatSystemMessage$Outbound + | ChatToolMessage$Outbound + | ChatUserMessage$Outbound; /** @internal */ export const ChatMessages$outboundSchema: z.ZodType< ChatMessages$Outbound, ChatMessages > = z.union([ - ChatSystemMessage$outboundSchema, - ChatUserMessage$outboundSchema, - ChatDeveloperMessage$outboundSchema, ChatAssistantMessage$outboundSchema.and( z.object({ role: z.literal("assistant") }), ), + ChatDeveloperMessage$outboundSchema, + ChatSystemMessage$outboundSchema, ChatToolMessage$outboundSchema, + ChatUserMessage$outboundSchema, ]); export function chatMessagesToJSON(chatMessages: ChatMessages): string { diff --git a/src/models/chatnamedtoolchoice.ts b/src/models/chatnamedtoolchoice.ts index 74cc1e3b..babb55b1 100644 --- a/src/models/chatnamedtoolchoice.ts +++ b/src/models/chatnamedtoolchoice.ts @@ -6,13 +6,6 @@ import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; -export const ChatNamedToolChoiceType = { - Function: "function", -} as const; -export type ChatNamedToolChoiceType = ClosedEnum< - typeof ChatNamedToolChoiceType ->; - export type ChatNamedToolChoiceFunction = { /** * Function name to call @@ -20,19 +13,21 @@ export type ChatNamedToolChoiceFunction = { name: string; }; +export const ChatNamedToolChoiceType = { + Function: "function", +} as const; +export type ChatNamedToolChoiceType = ClosedEnum< + typeof ChatNamedToolChoiceType +>; + /** * Named tool choice for specific function */ export type ChatNamedToolChoice = { - type: ChatNamedToolChoiceType; function: ChatNamedToolChoiceFunction; + type: ChatNamedToolChoiceType; }; -/** @internal */ -export const ChatNamedToolChoiceType$outboundSchema: z.ZodEnum< - typeof ChatNamedToolChoiceType -> = z.enum(ChatNamedToolChoiceType); - /** @internal */ export type ChatNamedToolChoiceFunction$Outbound = { name: string; @@ -56,10 +51,15 @@ export function chatNamedToolChoiceFunctionToJSON( ); } +/** @internal */ +export const ChatNamedToolChoiceType$outboundSchema: z.ZodEnum< + typeof ChatNamedToolChoiceType +> = z.enum(ChatNamedToolChoiceType); + /** @internal */ export type ChatNamedToolChoice$Outbound = { - type: string; function: ChatNamedToolChoiceFunction$Outbound; + type: string; }; /** @internal */ @@ -67,8 +67,8 @@ export const ChatNamedToolChoice$outboundSchema: z.ZodType< ChatNamedToolChoice$Outbound, ChatNamedToolChoice > = z.object({ - type: ChatNamedToolChoiceType$outboundSchema, function: z.lazy(() => ChatNamedToolChoiceFunction$outboundSchema), + type: ChatNamedToolChoiceType$outboundSchema, }); export function chatNamedToolChoiceToJSON( diff --git a/src/models/chatrequest.ts b/src/models/chatrequest.ts index fd8c3ee3..18c632c7 100644 --- a/src/models/chatrequest.ts +++ b/src/models/chatrequest.ts @@ -6,7 +6,17 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + AnthropicCacheControlDirective, + AnthropicCacheControlDirective$Outbound, + AnthropicCacheControlDirective$outboundSchema, +} from "./anthropiccachecontroldirective.js"; +import { + AutoRouterPlugin, + AutoRouterPlugin$Outbound, + AutoRouterPlugin$outboundSchema, +} from "./autorouterplugin.js"; import { ChatDebugOptions, ChatDebugOptions$Outbound, @@ -42,6 +52,10 @@ import { ChatMessages$Outbound, ChatMessages$outboundSchema, } from "./chatmessages.js"; +import { + ChatReasoningSummaryVerbosityEnum, + ChatReasoningSummaryVerbosityEnum$outboundSchema, +} from "./chatreasoningsummaryverbosityenum.js"; import { ChatStreamOptions, ChatStreamOptions$Outbound, @@ -53,304 +67,62 @@ import { ChatToolChoice$outboundSchema, } from "./chattoolchoice.js"; import { - ContextCompressionEngine, - ContextCompressionEngine$outboundSchema, -} from "./contextcompressionengine.js"; + ContextCompressionPlugin, + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin$outboundSchema, +} from "./contextcompressionplugin.js"; import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; + FileParserPlugin, + FileParserPlugin$Outbound, + FileParserPlugin$outboundSchema, +} from "./fileparserplugin.js"; import { FormatJsonObjectConfig, FormatJsonObjectConfig$Outbound, FormatJsonObjectConfig$outboundSchema, } from "./formatjsonobjectconfig.js"; import { - PDFParserOptions, - PDFParserOptions$Outbound, - PDFParserOptions$outboundSchema, -} from "./pdfparseroptions.js"; + ModerationPlugin, + ModerationPlugin$Outbound, + ModerationPlugin$outboundSchema, +} from "./moderationplugin.js"; import { - PreferredMaxLatency, - PreferredMaxLatency$Outbound, - PreferredMaxLatency$outboundSchema, -} from "./preferredmaxlatency.js"; + ProviderPreferences, + ProviderPreferences$Outbound, + ProviderPreferences$outboundSchema, +} from "./providerpreferences.js"; import { - PreferredMinThroughput, - PreferredMinThroughput$Outbound, - PreferredMinThroughput$outboundSchema, -} from "./preferredminthroughput.js"; -import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; -import { Quantization, Quantization$outboundSchema } from "./quantization.js"; + ResponseHealingPlugin, + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin$outboundSchema, +} from "./responsehealingplugin.js"; import { - WebSearchEngine, - WebSearchEngine$outboundSchema, -} from "./websearchengine.js"; - -export type ChatRequestOrder = ProviderName | string; - -export type ChatRequestOnly = ProviderName | string; - -export type ChatRequestIgnore = ProviderName | string; - -export const ChatRequestSortEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ChatRequestSortEnum = OpenEnum; - -export const ChatRequestProviderSortConfigEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ChatRequestProviderSortConfigEnum = ClosedEnum< - typeof ChatRequestProviderSortConfigEnum ->; - -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ChatRequestBy = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestBy = OpenEnum; - -/** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ -export const ChatRequestPartition = { - Model: "model", - None: "none", -} as const; -/** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ -export type ChatRequestPartition = OpenEnum; - -export type ChatRequestProviderSortConfig = { - /** - * The provider sorting strategy (price, throughput, latency) - */ - by?: ChatRequestBy | null | undefined; - /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ - partition?: ChatRequestPartition | null | undefined; -}; + TraceConfig, + TraceConfig$Outbound, + TraceConfig$outboundSchema, +} from "./traceconfig.js"; +import { + WebSearchPlugin, + WebSearchPlugin$Outbound, + WebSearchPlugin$outboundSchema, +} from "./websearchplugin.js"; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestProviderSortConfigUnion = - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum; +export type ChatRequestImageConfig = string | number | Array; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ChatRequestProviderSort = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", +export const Modality = { + Text: "text", + Image: "image", + Audio: "audio", } as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ChatRequestProviderSort = OpenEnum; - -/** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ -export type ChatRequestSortUnion = - | ChatRequestProviderSort - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum - | ChatRequestSortEnum; - -/** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ -export type ChatRequestMaxPrice = { - /** - * Price per million prompt tokens - */ - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** - * When multiple model providers are available, optionally indicate your routing preference. - */ -export type ChatRequestProvider = { - /** - * Whether to allow backup providers to serve requests - * - * @remarks - * - 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. - */ - allowFallbacks?: boolean | null | undefined; - /** - * 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. - */ - requireParameters?: boolean | null | undefined; - /** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - 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. - */ - dataCollection?: DataCollection | null | undefined; - /** - * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - */ - zdr?: boolean | null | undefined; - /** - * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. - */ - enforceDistillableText?: boolean | null | undefined; - /** - * 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. - */ - order?: Array | null | undefined; - /** - * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. - */ - only?: Array | null | undefined; - /** - * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. - */ - ignore?: Array | null | undefined; - /** - * A list of quantization levels to filter the provider by. - */ - quantizations?: Array | null | undefined; - sort?: - | ChatRequestProviderSort - | ChatRequestProviderSortConfig - | ChatRequestProviderSortConfigEnum - | ChatRequestSortEnum - | null - | undefined; - /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ - maxPrice?: ChatRequestMaxPrice | undefined; - /** - * 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. - */ - preferredMinThroughput?: PreferredMinThroughput | null | undefined; - /** - * 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. - */ - preferredMaxLatency?: PreferredMaxLatency | null | undefined; -}; - -export type ChatRequestPluginContextCompression = { - id: "context-compression"; - /** - * Set to false to disable the context-compression plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * The compression engine to use. Defaults to "middle-out". - */ - engine?: ContextCompressionEngine | undefined; -}; - -export type ChatRequestPluginResponseHealing = { - id: "response-healing"; - /** - * Set to false to disable the response-healing plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; -}; - -export type ChatRequestPluginFileParser = { - id: "file-parser"; - /** - * Set to false to disable the file-parser plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * Options for PDF parsing. - */ - pdf?: PDFParserOptions | undefined; -}; - -export type ChatRequestPluginWeb = { - id: "web"; - /** - * Set to false to disable the web-search plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - maxResults?: number | undefined; - searchPrompt?: string | undefined; - /** - * The search engine to use for web search. - */ - engine?: WebSearchEngine | undefined; - /** - * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - includeDomains?: Array | undefined; - /** - * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). - */ - excludeDomains?: Array | undefined; -}; - -export type ChatRequestPluginModeration = { - id: "moderation"; -}; - -export type ChatRequestPluginAutoRouter = { - id: "auto-router"; - /** - * Set to false to disable the auto-router plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * 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. - */ - allowedModels?: Array | undefined; -}; - -export type ChatRequestPluginUnion = - | ChatRequestPluginAutoRouter - | ChatRequestPluginModeration - | ChatRequestPluginWeb - | ChatRequestPluginFileParser - | ChatRequestPluginResponseHealing - | ChatRequestPluginContextCompression; +export type Modality = OpenEnum; -/** - * 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. - */ -export type ChatRequestTrace = { - traceId?: string | undefined; - traceName?: string | undefined; - spanName?: string | undefined; - generationName?: string | undefined; - parentSpanId?: string | undefined; - additionalProperties?: { [k: string]: any | null } | undefined; -}; +export type ChatRequestPlugin = + | AutoRouterPlugin + | ContextCompressionPlugin + | FileParserPlugin + | ModerationPlugin + | ResponseHealingPlugin + | WebSearchPlugin; /** * Constrains effort on reasoning for reasoning models @@ -376,51 +148,18 @@ export type Reasoning = { * Constrains effort on reasoning for reasoning models */ effort?: Effort | null | undefined; - summary?: any | null | undefined; + summary?: ChatReasoningSummaryVerbosityEnum | null | undefined; }; /** * Response format configuration */ export type ResponseFormat = - | ChatFormatTextConfig + | ChatFormatGrammarConfig | FormatJsonObjectConfig | ChatFormatJsonSchemaConfig - | ChatFormatGrammarConfig - | ChatFormatPythonConfig; - -/** - * Stop sequences (up to 4) - */ -export type Stop = string | Array | any; - -export type ChatRequestImageConfig = string | number | Array; - -export const Modality = { - Text: "text", - Image: "image", - Audio: "audio", -} as const; -export type Modality = OpenEnum; - -export const ChatRequestType = { - Ephemeral: "ephemeral", -} as const; -export type ChatRequestType = ClosedEnum; - -export const ChatRequestTtl = { - Fivem: "5m", - Oneh: "1h", -} as const; -export type ChatRequestTtl = OpenEnum; - -/** - * 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. - */ -export type CacheControl = { - type: ChatRequestType; - ttl?: ChatRequestTtl | undefined; -}; + | ChatFormatPythonConfig + | ChatFormatTextConfig; /** * The service tier to use for processing this request. @@ -437,83 +176,91 @@ export const ChatRequestServiceTier = { */ export type ChatRequestServiceTier = OpenEnum; +/** + * Stop sequences (up to 4) + */ +export type Stop = string | Array | any; + /** * Chat completion request parameters */ export type ChatRequest = { + cacheControl?: AnthropicCacheControlDirective | undefined; /** - * When multiple model providers are available, optionally indicate your routing preference. + * Debug options for inspecting request transformations (streaming only) */ - provider?: ChatRequestProvider | null | undefined; + debug?: ChatDebugOptions | undefined; /** - * Plugins you want to enable for this request, including their settings. + * Frequency penalty (-2.0 to 2.0) */ - plugins?: - | Array< - | ChatRequestPluginAutoRouter - | ChatRequestPluginModeration - | ChatRequestPluginWeb - | ChatRequestPluginFileParser - | ChatRequestPluginResponseHealing - | ChatRequestPluginContextCompression - > - | undefined; + frequencyPenalty?: number | undefined; /** - * Unique user identifier + * 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. */ - user?: string | undefined; + imageConfig?: + | { [k: string]: string | number | Array } + | undefined; /** - * 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. + * Token logit bias adjustments */ - sessionId?: string | undefined; + logitBias?: { [k: string]: number } | null | undefined; /** - * 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. + * Return log probabilities */ - trace?: ChatRequestTrace | undefined; + logprobs?: boolean | null | undefined; /** - * List of messages for the conversation + * Maximum tokens in completion */ - messages: Array; + maxCompletionTokens?: number | undefined; /** - * Model to use for completion + * Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. */ - model?: string | undefined; + maxTokens?: number | undefined; /** - * Models to use for completion + * List of messages for the conversation */ - models?: Array | undefined; + messages: Array; /** - * Frequency penalty (-2.0 to 2.0) + * Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) */ - frequencyPenalty?: number | null | undefined; + metadata?: { [k: string]: string } | undefined; /** - * Token logit bias adjustments + * Output modalities for the response. Supported values are "text", "image", and "audio". */ - logitBias?: { [k: string]: number } | null | undefined; + modalities?: Array | undefined; /** - * Return log probabilities + * Model to use for completion */ - logprobs?: boolean | null | undefined; + model?: string | undefined; /** - * Number of top log probabilities to return (0-20) + * Models to use for completion */ - topLogprobs?: number | null | undefined; + models?: Array | undefined; /** - * Maximum tokens in completion + * Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. */ - maxCompletionTokens?: number | null | undefined; + parallelToolCalls?: boolean | null | undefined; /** - * Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. + * Plugins you want to enable for this request, including their settings. */ - maxTokens?: number | null | undefined; + plugins?: + | Array< + | AutoRouterPlugin + | ContextCompressionPlugin + | FileParserPlugin + | ModerationPlugin + | ResponseHealingPlugin + | WebSearchPlugin + > + | undefined; /** - * Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) + * Presence penalty (-2.0 to 2.0) */ - metadata?: { [k: string]: string } | undefined; + presencePenalty?: number | undefined; /** - * Presence penalty (-2.0 to 2.0) + * When multiple model providers are available, optionally indicate your routing preference. */ - presencePenalty?: number | null | undefined; + provider?: ProviderPreferences | null | undefined; /** * Configuration options for reasoning models */ @@ -522,16 +269,24 @@ export type ChatRequest = { * Response format configuration */ responseFormat?: - | ChatFormatTextConfig + | ChatFormatGrammarConfig | FormatJsonObjectConfig | ChatFormatJsonSchemaConfig - | ChatFormatGrammarConfig | ChatFormatPythonConfig + | ChatFormatTextConfig | undefined; /** * Random seed for deterministic outputs */ - seed?: number | null | undefined; + seed?: number | undefined; + /** + * The service tier to use for processing this request. + */ + serviceTier?: ChatRequestServiceTier | null | undefined; + /** + * 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. + */ + sessionId?: string | undefined; /** * Stop sequences (up to 4) */ @@ -547,8 +302,7 @@ export type ChatRequest = { /** * Sampling temperature (0-2) */ - temperature?: number | null | undefined; - parallelToolCalls?: boolean | null | undefined; + temperature?: number | undefined; /** * Tool choice configuration */ @@ -558,534 +312,74 @@ export type ChatRequest = { */ tools?: Array | undefined; /** - * Nucleus sampling parameter (0-1) - */ - topP?: number | null | undefined; - /** - * Debug options for inspecting request transformations (streaming only) - */ - debug?: ChatDebugOptions | undefined; - /** - * 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. + * Number of top log probabilities to return (0-20) */ - imageConfig?: - | { [k: string]: string | number | Array } - | undefined; + topLogprobs?: number | undefined; /** - * Output modalities for the response. Supported values are "text", "image", and "audio". + * Nucleus sampling parameter (0-1) */ - modalities?: Array | undefined; + topP?: number | undefined; /** - * 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. + * 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. */ - cacheControl?: CacheControl | undefined; + trace?: TraceConfig | undefined; /** - * The service tier to use for processing this request. + * Unique user identifier */ - serviceTier?: ChatRequestServiceTier | null | undefined; + user?: string | undefined; }; /** @internal */ -export type ChatRequestOrder$Outbound = string | string; +export type ChatRequestImageConfig$Outbound = + | string + | number + | Array; /** @internal */ -export const ChatRequestOrder$outboundSchema: z.ZodType< - ChatRequestOrder$Outbound, - ChatRequestOrder -> = z.union([ProviderName$outboundSchema, z.string()]); +export const ChatRequestImageConfig$outboundSchema: z.ZodType< + ChatRequestImageConfig$Outbound, + ChatRequestImageConfig +> = z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]); -export function chatRequestOrderToJSON( - chatRequestOrder: ChatRequestOrder, +export function chatRequestImageConfigToJSON( + chatRequestImageConfig: ChatRequestImageConfig, ): string { return JSON.stringify( - ChatRequestOrder$outboundSchema.parse(chatRequestOrder), + ChatRequestImageConfig$outboundSchema.parse(chatRequestImageConfig), ); } /** @internal */ -export type ChatRequestOnly$Outbound = string | string; +export const Modality$outboundSchema: z.ZodType = openEnums + .outboundSchema(Modality); /** @internal */ -export const ChatRequestOnly$outboundSchema: z.ZodType< - ChatRequestOnly$Outbound, - ChatRequestOnly -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function chatRequestOnlyToJSON( - chatRequestOnly: ChatRequestOnly, -): string { - return JSON.stringify(ChatRequestOnly$outboundSchema.parse(chatRequestOnly)); -} +export type ChatRequestPlugin$Outbound = + | AutoRouterPlugin$Outbound + | ContextCompressionPlugin$Outbound + | FileParserPlugin$Outbound + | ModerationPlugin$Outbound + | ResponseHealingPlugin$Outbound + | WebSearchPlugin$Outbound; /** @internal */ -export type ChatRequestIgnore$Outbound = string | string; - -/** @internal */ -export const ChatRequestIgnore$outboundSchema: z.ZodType< - ChatRequestIgnore$Outbound, - ChatRequestIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function chatRequestIgnoreToJSON( - chatRequestIgnore: ChatRequestIgnore, -): string { - return JSON.stringify( - ChatRequestIgnore$outboundSchema.parse(chatRequestIgnore), - ); -} - -/** @internal */ -export const ChatRequestSortEnum$outboundSchema: z.ZodType< - string, - ChatRequestSortEnum -> = openEnums.outboundSchema(ChatRequestSortEnum); - -/** @internal */ -export const ChatRequestProviderSortConfigEnum$outboundSchema: z.ZodEnum< - typeof ChatRequestProviderSortConfigEnum -> = z.enum(ChatRequestProviderSortConfigEnum); - -/** @internal */ -export const ChatRequestBy$outboundSchema: z.ZodType = - openEnums.outboundSchema(ChatRequestBy); - -/** @internal */ -export const ChatRequestPartition$outboundSchema: z.ZodType< - string, - ChatRequestPartition -> = openEnums.outboundSchema(ChatRequestPartition); - -/** @internal */ -export type ChatRequestProviderSortConfig$Outbound = { - by?: string | null | undefined; - partition?: string | null | undefined; -}; - -/** @internal */ -export const ChatRequestProviderSortConfig$outboundSchema: z.ZodType< - ChatRequestProviderSortConfig$Outbound, - ChatRequestProviderSortConfig -> = z.object({ - by: z.nullable(ChatRequestBy$outboundSchema).optional(), - partition: z.nullable(ChatRequestPartition$outboundSchema).optional(), -}); - -export function chatRequestProviderSortConfigToJSON( - chatRequestProviderSortConfig: ChatRequestProviderSortConfig, -): string { - return JSON.stringify( - ChatRequestProviderSortConfig$outboundSchema.parse( - chatRequestProviderSortConfig, - ), - ); -} - -/** @internal */ -export type ChatRequestProviderSortConfigUnion$Outbound = - | ChatRequestProviderSortConfig$Outbound - | string; - -/** @internal */ -export const ChatRequestProviderSortConfigUnion$outboundSchema: z.ZodType< - ChatRequestProviderSortConfigUnion$Outbound, - ChatRequestProviderSortConfigUnion -> = z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, -]); - -export function chatRequestProviderSortConfigUnionToJSON( - chatRequestProviderSortConfigUnion: ChatRequestProviderSortConfigUnion, -): string { - return JSON.stringify( - ChatRequestProviderSortConfigUnion$outboundSchema.parse( - chatRequestProviderSortConfigUnion, - ), - ); -} - -/** @internal */ -export const ChatRequestProviderSort$outboundSchema: z.ZodType< - string, - ChatRequestProviderSort -> = openEnums.outboundSchema(ChatRequestProviderSort); - -/** @internal */ -export type ChatRequestSortUnion$Outbound = - | string - | ChatRequestProviderSortConfig$Outbound - | string - | string; - -/** @internal */ -export const ChatRequestSortUnion$outboundSchema: z.ZodType< - ChatRequestSortUnion$Outbound, - ChatRequestSortUnion +export const ChatRequestPlugin$outboundSchema: z.ZodType< + ChatRequestPlugin$Outbound, + ChatRequestPlugin > = z.union([ - ChatRequestProviderSort$outboundSchema, - z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, - ]), - ChatRequestSortEnum$outboundSchema, + AutoRouterPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, ]); -export function chatRequestSortUnionToJSON( - chatRequestSortUnion: ChatRequestSortUnion, +export function chatRequestPluginToJSON( + chatRequestPlugin: ChatRequestPlugin, ): string { return JSON.stringify( - ChatRequestSortUnion$outboundSchema.parse(chatRequestSortUnion), - ); -} - -/** @internal */ -export type ChatRequestMaxPrice$Outbound = { - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** @internal */ -export const ChatRequestMaxPrice$outboundSchema: z.ZodType< - ChatRequestMaxPrice$Outbound, - ChatRequestMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); - -export function chatRequestMaxPriceToJSON( - chatRequestMaxPrice: ChatRequestMaxPrice, -): string { - return JSON.stringify( - ChatRequestMaxPrice$outboundSchema.parse(chatRequestMaxPrice), - ); -} - -/** @internal */ -export type ChatRequestProvider$Outbound = { - allow_fallbacks?: boolean | null | undefined; - require_parameters?: boolean | null | undefined; - data_collection?: string | null | undefined; - zdr?: boolean | null | undefined; - enforce_distillable_text?: boolean | null | undefined; - order?: Array | null | undefined; - only?: Array | null | undefined; - ignore?: Array | null | undefined; - quantizations?: Array | null | undefined; - sort?: - | string - | ChatRequestProviderSortConfig$Outbound - | string - | string - | null - | undefined; - max_price?: ChatRequestMaxPrice$Outbound | undefined; - preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; - preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; -}; - -/** @internal */ -export const ChatRequestProvider$outboundSchema: z.ZodType< - ChatRequestProvider$Outbound, - ChatRequestProvider -> = z.object({ - allowFallbacks: z.nullable(z.boolean()).optional(), - requireParameters: z.nullable(z.boolean()).optional(), - dataCollection: z.nullable(DataCollection$outboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - enforceDistillableText: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - ignore: z.nullable( - z.array(z.union([ProviderName$outboundSchema, z.string()])), - ).optional(), - quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), - sort: z.nullable( - z.union([ - ChatRequestProviderSort$outboundSchema, - z.union([ - z.lazy(() => ChatRequestProviderSortConfig$outboundSchema), - ChatRequestProviderSortConfigEnum$outboundSchema, - ]), - ChatRequestSortEnum$outboundSchema, - ]), - ).optional(), - maxPrice: z.lazy(() => ChatRequestMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) - .optional(), - preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - allowFallbacks: "allow_fallbacks", - requireParameters: "require_parameters", - dataCollection: "data_collection", - enforceDistillableText: "enforce_distillable_text", - maxPrice: "max_price", - preferredMinThroughput: "preferred_min_throughput", - preferredMaxLatency: "preferred_max_latency", - }); -}); - -export function chatRequestProviderToJSON( - chatRequestProvider: ChatRequestProvider, -): string { - return JSON.stringify( - ChatRequestProvider$outboundSchema.parse(chatRequestProvider), - ); -} - -/** @internal */ -export type ChatRequestPluginContextCompression$Outbound = { - id: "context-compression"; - enabled?: boolean | undefined; - engine?: string | undefined; -}; - -/** @internal */ -export const ChatRequestPluginContextCompression$outboundSchema: z.ZodType< - ChatRequestPluginContextCompression$Outbound, - ChatRequestPluginContextCompression -> = z.object({ - id: z.literal("context-compression"), - enabled: z.boolean().optional(), - engine: ContextCompressionEngine$outboundSchema.optional(), -}); - -export function chatRequestPluginContextCompressionToJSON( - chatRequestPluginContextCompression: ChatRequestPluginContextCompression, -): string { - return JSON.stringify( - ChatRequestPluginContextCompression$outboundSchema.parse( - chatRequestPluginContextCompression, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginResponseHealing$Outbound = { - id: "response-healing"; - enabled?: boolean | undefined; -}; - -/** @internal */ -export const ChatRequestPluginResponseHealing$outboundSchema: z.ZodType< - ChatRequestPluginResponseHealing$Outbound, - ChatRequestPluginResponseHealing -> = z.object({ - id: z.literal("response-healing"), - enabled: z.boolean().optional(), -}); - -export function chatRequestPluginResponseHealingToJSON( - chatRequestPluginResponseHealing: ChatRequestPluginResponseHealing, -): string { - return JSON.stringify( - ChatRequestPluginResponseHealing$outboundSchema.parse( - chatRequestPluginResponseHealing, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginFileParser$Outbound = { - id: "file-parser"; - enabled?: boolean | undefined; - pdf?: PDFParserOptions$Outbound | undefined; -}; - -/** @internal */ -export const ChatRequestPluginFileParser$outboundSchema: z.ZodType< - ChatRequestPluginFileParser$Outbound, - ChatRequestPluginFileParser -> = z.object({ - id: z.literal("file-parser"), - enabled: z.boolean().optional(), - pdf: PDFParserOptions$outboundSchema.optional(), -}); - -export function chatRequestPluginFileParserToJSON( - chatRequestPluginFileParser: ChatRequestPluginFileParser, -): string { - return JSON.stringify( - ChatRequestPluginFileParser$outboundSchema.parse( - chatRequestPluginFileParser, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginWeb$Outbound = { - id: "web"; - enabled?: boolean | undefined; - max_results?: number | undefined; - search_prompt?: string | undefined; - engine?: string | undefined; - include_domains?: Array | undefined; - exclude_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatRequestPluginWeb$outboundSchema: z.ZodType< - ChatRequestPluginWeb$Outbound, - ChatRequestPluginWeb -> = z.object({ - id: z.literal("web"), - enabled: z.boolean().optional(), - maxResults: z.number().optional(), - searchPrompt: z.string().optional(), - engine: WebSearchEngine$outboundSchema.optional(), - includeDomains: z.array(z.string()).optional(), - excludeDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - searchPrompt: "search_prompt", - includeDomains: "include_domains", - excludeDomains: "exclude_domains", - }); -}); - -export function chatRequestPluginWebToJSON( - chatRequestPluginWeb: ChatRequestPluginWeb, -): string { - return JSON.stringify( - ChatRequestPluginWeb$outboundSchema.parse(chatRequestPluginWeb), - ); -} - -/** @internal */ -export type ChatRequestPluginModeration$Outbound = { - id: "moderation"; -}; - -/** @internal */ -export const ChatRequestPluginModeration$outboundSchema: z.ZodType< - ChatRequestPluginModeration$Outbound, - ChatRequestPluginModeration -> = z.object({ - id: z.literal("moderation"), -}); - -export function chatRequestPluginModerationToJSON( - chatRequestPluginModeration: ChatRequestPluginModeration, -): string { - return JSON.stringify( - ChatRequestPluginModeration$outboundSchema.parse( - chatRequestPluginModeration, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginAutoRouter$Outbound = { - id: "auto-router"; - enabled?: boolean | undefined; - allowed_models?: Array | undefined; -}; - -/** @internal */ -export const ChatRequestPluginAutoRouter$outboundSchema: z.ZodType< - ChatRequestPluginAutoRouter$Outbound, - ChatRequestPluginAutoRouter -> = z.object({ - id: z.literal("auto-router"), - enabled: z.boolean().optional(), - allowedModels: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - allowedModels: "allowed_models", - }); -}); - -export function chatRequestPluginAutoRouterToJSON( - chatRequestPluginAutoRouter: ChatRequestPluginAutoRouter, -): string { - return JSON.stringify( - ChatRequestPluginAutoRouter$outboundSchema.parse( - chatRequestPluginAutoRouter, - ), - ); -} - -/** @internal */ -export type ChatRequestPluginUnion$Outbound = - | ChatRequestPluginAutoRouter$Outbound - | ChatRequestPluginModeration$Outbound - | ChatRequestPluginWeb$Outbound - | ChatRequestPluginFileParser$Outbound - | ChatRequestPluginResponseHealing$Outbound - | ChatRequestPluginContextCompression$Outbound; - -/** @internal */ -export const ChatRequestPluginUnion$outboundSchema: z.ZodType< - ChatRequestPluginUnion$Outbound, - ChatRequestPluginUnion -> = z.union([ - z.lazy(() => ChatRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ChatRequestPluginModeration$outboundSchema), - z.lazy(() => ChatRequestPluginWeb$outboundSchema), - z.lazy(() => ChatRequestPluginFileParser$outboundSchema), - z.lazy(() => ChatRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ChatRequestPluginContextCompression$outboundSchema), -]); - -export function chatRequestPluginUnionToJSON( - chatRequestPluginUnion: ChatRequestPluginUnion, -): string { - return JSON.stringify( - ChatRequestPluginUnion$outboundSchema.parse(chatRequestPluginUnion), - ); -} - -/** @internal */ -export type ChatRequestTrace$Outbound = { - trace_id?: string | undefined; - trace_name?: string | undefined; - span_name?: string | undefined; - generation_name?: string | undefined; - parent_span_id?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const ChatRequestTrace$outboundSchema: z.ZodType< - ChatRequestTrace$Outbound, - ChatRequestTrace -> = z.object({ - traceId: z.string().optional(), - traceName: z.string().optional(), - spanName: z.string().optional(), - generationName: z.string().optional(), - parentSpanId: z.string().optional(), - additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), -}).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - traceId: "trace_id", - traceName: "trace_name", - spanName: "span_name", - generationName: "generation_name", - parentSpanId: "parent_span_id", - additionalProperties: null, - }), - }; -}); - -export function chatRequestTraceToJSON( - chatRequestTrace: ChatRequestTrace, -): string { - return JSON.stringify( - ChatRequestTrace$outboundSchema.parse(chatRequestTrace), + ChatRequestPlugin$outboundSchema.parse(chatRequestPlugin), ); } @@ -1096,7 +390,7 @@ export const Effort$outboundSchema: z.ZodType = openEnums /** @internal */ export type Reasoning$Outbound = { effort?: string | null | undefined; - summary?: any | null | undefined; + summary?: string | null | undefined; }; /** @internal */ @@ -1105,7 +399,8 @@ export const Reasoning$outboundSchema: z.ZodType< Reasoning > = z.object({ effort: z.nullable(Effort$outboundSchema).optional(), - summary: z.nullable(z.any()).optional(), + summary: z.nullable(ChatReasoningSummaryVerbosityEnum$outboundSchema) + .optional(), }); export function reasoningToJSON(reasoning: Reasoning): string { @@ -1114,28 +409,34 @@ export function reasoningToJSON(reasoning: Reasoning): string { /** @internal */ export type ResponseFormat$Outbound = - | ChatFormatTextConfig$Outbound + | ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound - | ChatFormatGrammarConfig$Outbound - | ChatFormatPythonConfig$Outbound; + | ChatFormatPythonConfig$Outbound + | ChatFormatTextConfig$Outbound; /** @internal */ export const ResponseFormat$outboundSchema: z.ZodType< ResponseFormat$Outbound, ResponseFormat > = z.union([ - ChatFormatTextConfig$outboundSchema, + ChatFormatGrammarConfig$outboundSchema, FormatJsonObjectConfig$outboundSchema, ChatFormatJsonSchemaConfig$outboundSchema, - ChatFormatGrammarConfig$outboundSchema, ChatFormatPythonConfig$outboundSchema, + ChatFormatTextConfig$outboundSchema, ]); export function responseFormatToJSON(responseFormat: ResponseFormat): string { return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat)); } +/** @internal */ +export const ChatRequestServiceTier$outboundSchema: z.ZodType< + string, + ChatRequestServiceTier +> = openEnums.outboundSchema(ChatRequestServiceTier); + /** @internal */ export type Stop$Outbound = string | Array | any; @@ -1150,114 +451,57 @@ export function stopToJSON(stop: Stop): string { return JSON.stringify(Stop$outboundSchema.parse(stop)); } -/** @internal */ -export type ChatRequestImageConfig$Outbound = - | string - | number - | Array; - -/** @internal */ -export const ChatRequestImageConfig$outboundSchema: z.ZodType< - ChatRequestImageConfig$Outbound, - ChatRequestImageConfig -> = z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]); - -export function chatRequestImageConfigToJSON( - chatRequestImageConfig: ChatRequestImageConfig, -): string { - return JSON.stringify( - ChatRequestImageConfig$outboundSchema.parse(chatRequestImageConfig), - ); -} - -/** @internal */ -export const Modality$outboundSchema: z.ZodType = openEnums - .outboundSchema(Modality); - -/** @internal */ -export const ChatRequestType$outboundSchema: z.ZodEnum = - z.enum(ChatRequestType); - -/** @internal */ -export const ChatRequestTtl$outboundSchema: z.ZodType = - openEnums.outboundSchema(ChatRequestTtl); - -/** @internal */ -export type CacheControl$Outbound = { - type: string; - ttl?: string | undefined; -}; - -/** @internal */ -export const CacheControl$outboundSchema: z.ZodType< - CacheControl$Outbound, - CacheControl -> = z.object({ - type: ChatRequestType$outboundSchema, - ttl: ChatRequestTtl$outboundSchema.optional(), -}); - -export function cacheControlToJSON(cacheControl: CacheControl): string { - return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl)); -} - -/** @internal */ -export const ChatRequestServiceTier$outboundSchema: z.ZodType< - string, - ChatRequestServiceTier -> = openEnums.outboundSchema(ChatRequestServiceTier); - /** @internal */ export type ChatRequest$Outbound = { - provider?: ChatRequestProvider$Outbound | null | undefined; - plugins?: - | Array< - | ChatRequestPluginAutoRouter$Outbound - | ChatRequestPluginModeration$Outbound - | ChatRequestPluginWeb$Outbound - | ChatRequestPluginFileParser$Outbound - | ChatRequestPluginResponseHealing$Outbound - | ChatRequestPluginContextCompression$Outbound - > + cache_control?: AnthropicCacheControlDirective$Outbound | undefined; + debug?: ChatDebugOptions$Outbound | undefined; + frequency_penalty?: number | undefined; + image_config?: + | { [k: string]: string | number | Array } | undefined; - user?: string | undefined; - session_id?: string | undefined; - trace?: ChatRequestTrace$Outbound | undefined; - messages: Array; - model?: string | undefined; - models?: Array | undefined; - frequency_penalty?: number | null | undefined; logit_bias?: { [k: string]: number } | null | undefined; logprobs?: boolean | null | undefined; - top_logprobs?: number | null | undefined; - max_completion_tokens?: number | null | undefined; - max_tokens?: number | null | undefined; + max_completion_tokens?: number | undefined; + max_tokens?: number | undefined; + messages: Array; metadata?: { [k: string]: string } | undefined; - presence_penalty?: number | null | undefined; + modalities?: Array | undefined; + model?: string | undefined; + models?: Array | undefined; + parallel_tool_calls?: boolean | null | undefined; + plugins?: + | Array< + | AutoRouterPlugin$Outbound + | ContextCompressionPlugin$Outbound + | FileParserPlugin$Outbound + | ModerationPlugin$Outbound + | ResponseHealingPlugin$Outbound + | WebSearchPlugin$Outbound + > + | undefined; + presence_penalty?: number | undefined; + provider?: ProviderPreferences$Outbound | null | undefined; reasoning?: Reasoning$Outbound | undefined; response_format?: - | ChatFormatTextConfig$Outbound + | ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound - | ChatFormatGrammarConfig$Outbound | ChatFormatPythonConfig$Outbound + | ChatFormatTextConfig$Outbound | undefined; - seed?: number | null | undefined; + seed?: number | undefined; + service_tier?: string | null | undefined; + session_id?: string | undefined; stop?: string | Array | any | null | undefined; stream: boolean; stream_options?: ChatStreamOptions$Outbound | null | undefined; - temperature: number | null; - parallel_tool_calls?: boolean | null | undefined; + temperature?: number | undefined; tool_choice?: ChatToolChoice$Outbound | undefined; tools?: Array | undefined; - top_p: number | null; - debug?: ChatDebugOptions$Outbound | undefined; - image_config?: - | { [k: string]: string | number | Array } - | undefined; - modalities?: Array | undefined; - cache_control?: CacheControl$Outbound | undefined; - service_tier?: string | null | undefined; + top_logprobs?: number | undefined; + top_p?: number | undefined; + trace?: TraceConfig$Outbound | undefined; + user?: string | undefined; }; /** @internal */ @@ -1265,75 +509,74 @@ export const ChatRequest$outboundSchema: z.ZodType< ChatRequest$Outbound, ChatRequest > = z.object({ - provider: z.nullable(z.lazy(() => ChatRequestProvider$outboundSchema)) - .optional(), - plugins: z.array( - z.union([ - z.lazy(() => ChatRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ChatRequestPluginModeration$outboundSchema), - z.lazy(() => ChatRequestPluginWeb$outboundSchema), - z.lazy(() => ChatRequestPluginFileParser$outboundSchema), - z.lazy(() => ChatRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ChatRequestPluginContextCompression$outboundSchema), - ]), + cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(), + debug: ChatDebugOptions$outboundSchema.optional(), + frequencyPenalty: z.number().optional(), + imageConfig: z.record( + z.string(), + z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]), ).optional(), - user: z.string().optional(), - sessionId: z.string().optional(), - trace: z.lazy(() => ChatRequestTrace$outboundSchema).optional(), - messages: z.array(ChatMessages$outboundSchema), - model: z.string().optional(), - models: z.array(z.string()).optional(), - frequencyPenalty: z.nullable(z.number()).optional(), logitBias: z.nullable(z.record(z.string(), z.number())).optional(), logprobs: z.nullable(z.boolean()).optional(), - topLogprobs: z.nullable(z.number()).optional(), - maxCompletionTokens: z.nullable(z.number()).optional(), - maxTokens: z.nullable(z.number()).optional(), + maxCompletionTokens: z.int().optional(), + maxTokens: z.int().optional(), + messages: z.array(ChatMessages$outboundSchema), metadata: z.record(z.string(), z.string()).optional(), - presencePenalty: z.nullable(z.number()).optional(), + modalities: z.array(Modality$outboundSchema).optional(), + model: z.string().optional(), + models: z.array(z.string()).optional(), + parallelToolCalls: z.nullable(z.boolean()).optional(), + plugins: z.array( + z.union([ + AutoRouterPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + ]), + ).optional(), + presencePenalty: z.number().optional(), + provider: z.nullable(ProviderPreferences$outboundSchema).optional(), reasoning: z.lazy(() => Reasoning$outboundSchema).optional(), responseFormat: z.union([ - ChatFormatTextConfig$outboundSchema, + ChatFormatGrammarConfig$outboundSchema, FormatJsonObjectConfig$outboundSchema, ChatFormatJsonSchemaConfig$outboundSchema, - ChatFormatGrammarConfig$outboundSchema, ChatFormatPythonConfig$outboundSchema, + ChatFormatTextConfig$outboundSchema, ]).optional(), - seed: z.nullable(z.int()).optional(), + seed: z.int().optional(), + serviceTier: z.nullable(ChatRequestServiceTier$outboundSchema).optional(), + sessionId: z.string().optional(), stop: z.nullable(z.union([z.string(), z.array(z.string()), z.any()])) .optional(), stream: z.boolean().default(false), streamOptions: z.nullable(ChatStreamOptions$outboundSchema).optional(), - temperature: z.nullable(z.number().default(1)), - parallelToolCalls: z.nullable(z.boolean()).optional(), + temperature: z.number().optional(), toolChoice: ChatToolChoice$outboundSchema.optional(), tools: z.array(ChatFunctionTool$outboundSchema).optional(), - topP: z.nullable(z.number().default(1)), - debug: ChatDebugOptions$outboundSchema.optional(), - imageConfig: z.record( - z.string(), - z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]), - ).optional(), - modalities: z.array(Modality$outboundSchema).optional(), - cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(), - serviceTier: z.nullable(ChatRequestServiceTier$outboundSchema).optional(), + topLogprobs: z.int().optional(), + topP: z.number().optional(), + trace: TraceConfig$outboundSchema.optional(), + user: z.string().optional(), }).transform((v) => { return remap$(v, { - sessionId: "session_id", + cacheControl: "cache_control", frequencyPenalty: "frequency_penalty", + imageConfig: "image_config", logitBias: "logit_bias", - topLogprobs: "top_logprobs", maxCompletionTokens: "max_completion_tokens", maxTokens: "max_tokens", + parallelToolCalls: "parallel_tool_calls", presencePenalty: "presence_penalty", responseFormat: "response_format", + serviceTier: "service_tier", + sessionId: "session_id", streamOptions: "stream_options", - parallelToolCalls: "parallel_tool_calls", toolChoice: "tool_choice", + topLogprobs: "top_logprobs", topP: "top_p", - imageConfig: "image_config", - cacheControl: "cache_control", - serviceTier: "service_tier", }); }); diff --git a/src/models/chatresult.ts b/src/models/chatresult.ts index c5a18849..c7ba2b22 100644 --- a/src/models/chatresult.ts +++ b/src/models/chatresult.ts @@ -21,10 +21,6 @@ export type ChatResultObject = ClosedEnum; * Chat completion response */ export type ChatResult = { - /** - * Unique completion identifier - */ - id: string; /** * List of completion choices */ @@ -33,19 +29,23 @@ export type ChatResult = { * Unix timestamp of creation */ created: number; + /** + * Unique completion identifier + */ + id: string; /** * Model used for completion */ model: string; object: ChatResultObject; - /** - * System fingerprint - */ - systemFingerprint: string | null; /** * The service tier used by the upstream provider for this request */ serviceTier?: string | null | undefined; + /** + * System fingerprint + */ + systemFingerprint: string | null; /** * Token usage statistics */ @@ -60,18 +60,18 @@ export const ChatResultObject$inboundSchema: z.ZodEnum< /** @internal */ export const ChatResult$inboundSchema: z.ZodType = z .object({ - id: z.string(), choices: z.array(ChatChoice$inboundSchema), - created: z.number(), + created: z.int(), + id: z.string(), model: z.string(), object: ChatResultObject$inboundSchema, - system_fingerprint: z.nullable(z.string()), service_tier: z.nullable(z.string()).optional(), + system_fingerprint: z.nullable(z.string()), usage: ChatUsage$inboundSchema.optional(), }).transform((v) => { return remap$(v, { - "system_fingerprint": "systemFingerprint", "service_tier": "serviceTier", + "system_fingerprint": "systemFingerprint", }); }); diff --git a/src/models/chatstreamchoice.ts b/src/models/chatstreamchoice.ts index ca617a80..a31c5fa9 100644 --- a/src/models/chatstreamchoice.ts +++ b/src/models/chatstreamchoice.ts @@ -7,6 +7,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; +import { + ChatFinishReasonEnum, + ChatFinishReasonEnum$inboundSchema, +} from "./chatfinishreasonenum.js"; import { ChatStreamDelta, ChatStreamDelta$inboundSchema, @@ -25,7 +29,7 @@ export type ChatStreamChoice = { * Delta changes in streaming response */ delta: ChatStreamDelta; - finishReason: any | null; + finishReason: ChatFinishReasonEnum | null; /** * Choice index */ @@ -42,8 +46,8 @@ export const ChatStreamChoice$inboundSchema: z.ZodType< unknown > = z.object({ delta: ChatStreamDelta$inboundSchema, - finish_reason: z.nullable(z.any()), - index: z.number(), + finish_reason: z.nullable(ChatFinishReasonEnum$inboundSchema), + index: z.int(), logprobs: z.nullable(ChatTokenLogprobs$inboundSchema).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatstreamchunk.ts b/src/models/chatstreamchunk.ts index f1503f3f..97b802ea 100644 --- a/src/models/chatstreamchunk.ts +++ b/src/models/chatstreamchunk.ts @@ -15,33 +15,29 @@ import { import { ChatUsage, ChatUsage$inboundSchema } from "./chatusage.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatStreamChunkObject = { - ChatCompletionChunk: "chat.completion.chunk", -} as const; -export type ChatStreamChunkObject = ClosedEnum; - /** * Error information */ export type ErrorT = { - /** - * Error message - */ - message: string; /** * Error code */ code: number; + /** + * Error message + */ + message: string; }; +export const ChatStreamChunkObject = { + ChatCompletionChunk: "chat.completion.chunk", +} as const; +export type ChatStreamChunkObject = ClosedEnum; + /** * Streaming chat completion chunk */ export type ChatStreamChunk = { - /** - * Unique chunk identifier - */ - id: string; /** * List of streaming chunk choices */ @@ -50,38 +46,37 @@ export type ChatStreamChunk = { * Unix timestamp of creation */ created: number; + /** + * Error information + */ + error?: ErrorT | undefined; + /** + * Unique chunk identifier + */ + id: string; /** * Model used for completion */ model: string; object: ChatStreamChunkObject; - /** - * System fingerprint - */ - systemFingerprint?: string | undefined; /** * The service tier used by the upstream provider for this request */ serviceTier?: string | null | undefined; /** - * Error information + * System fingerprint */ - error?: ErrorT | undefined; + systemFingerprint?: string | undefined; /** * Token usage statistics */ usage?: ChatUsage | undefined; }; -/** @internal */ -export const ChatStreamChunkObject$inboundSchema: z.ZodEnum< - typeof ChatStreamChunkObject -> = z.enum(ChatStreamChunkObject); - /** @internal */ export const ErrorT$inboundSchema: z.ZodType = z.object({ + code: z.int(), message: z.string(), - code: z.number(), }); export function errorFromJSON( @@ -94,24 +89,29 @@ export function errorFromJSON( ); } +/** @internal */ +export const ChatStreamChunkObject$inboundSchema: z.ZodEnum< + typeof ChatStreamChunkObject +> = z.enum(ChatStreamChunkObject); + /** @internal */ export const ChatStreamChunk$inboundSchema: z.ZodType< ChatStreamChunk, unknown > = z.object({ - id: z.string(), choices: z.array(ChatStreamChoice$inboundSchema), - created: z.number(), + created: z.int(), + error: z.lazy(() => ErrorT$inboundSchema).optional(), + id: z.string(), model: z.string(), object: ChatStreamChunkObject$inboundSchema, - system_fingerprint: z.string().optional(), service_tier: z.nullable(z.string()).optional(), - error: z.lazy(() => ErrorT$inboundSchema).optional(), + system_fingerprint: z.string().optional(), usage: ChatUsage$inboundSchema.optional(), }).transform((v) => { return remap$(v, { - "system_fingerprint": "systemFingerprint", "service_tier": "serviceTier", + "system_fingerprint": "systemFingerprint", }); }); diff --git a/src/models/chatstreamdelta.ts b/src/models/chatstreamdelta.ts index 5d7ef4cd..42494af7 100644 --- a/src/models/chatstreamdelta.ts +++ b/src/models/chatstreamdelta.ts @@ -37,10 +37,7 @@ export type ChatStreamDeltaRole = ClosedEnum; * Delta changes in streaming response */ export type ChatStreamDelta = { - /** - * The role of the message author - */ - role?: ChatStreamDeltaRole | undefined; + audio?: ChatAudioOutput | undefined; /** * Message content delta */ @@ -49,19 +46,22 @@ export type ChatStreamDelta = { * Reasoning content delta */ reasoning?: string | null | undefined; + /** + * Reasoning details for extended thinking models + */ + reasoningDetails?: Array | undefined; /** * Refusal message delta */ refusal?: string | null | undefined; /** - * Tool calls delta + * The role of the message author */ - toolCalls?: Array | undefined; + role?: ChatStreamDeltaRole | undefined; /** - * Reasoning details for extended thinking models + * Tool calls delta */ - reasoningDetails?: Array | undefined; - audio?: ChatAudioOutput | undefined; + toolCalls?: Array | undefined; }; /** @internal */ @@ -74,17 +74,17 @@ export const ChatStreamDelta$inboundSchema: z.ZodType< ChatStreamDelta, unknown > = z.object({ - role: ChatStreamDeltaRole$inboundSchema.optional(), + audio: ChatAudioOutput$inboundSchema.optional(), content: z.nullable(z.string()).optional(), reasoning: z.nullable(z.string()).optional(), + reasoning_details: z.array(ReasoningDetailUnion$inboundSchema).optional(), refusal: z.nullable(z.string()).optional(), + role: ChatStreamDeltaRole$inboundSchema.optional(), tool_calls: z.array(ChatStreamToolCall$inboundSchema).optional(), - reasoning_details: z.array(ReasoningDetailUnion$inboundSchema).optional(), - audio: ChatAudioOutput$inboundSchema.optional(), }).transform((v) => { return remap$(v, { - "tool_calls": "toolCalls", "reasoning_details": "reasoningDetails", + "tool_calls": "toolCalls", }); }); diff --git a/src/models/chatstreamtoolcall.ts b/src/models/chatstreamtoolcall.ts index f46ead55..619f760c 100644 --- a/src/models/chatstreamtoolcall.ts +++ b/src/models/chatstreamtoolcall.ts @@ -9,6 +9,20 @@ import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +/** + * Function call details + */ +export type ChatStreamToolCallFunction = { + /** + * Function arguments as JSON string + */ + arguments?: string | undefined; + /** + * Function name + */ + name?: string | undefined; +}; + /** * Tool call type */ @@ -20,54 +34,35 @@ export const ChatStreamToolCallType = { */ export type ChatStreamToolCallType = ClosedEnum; -/** - * Function call details - */ -export type ChatStreamToolCallFunction = { - /** - * Function name - */ - name?: string | undefined; - /** - * Function arguments as JSON string - */ - arguments?: string | undefined; -}; - /** * Tool call delta for streaming responses */ export type ChatStreamToolCall = { /** - * Tool call index in the array + * Function call details */ - index: number; + function?: ChatStreamToolCallFunction | undefined; /** * Tool call identifier */ id?: string | undefined; /** - * Tool call type + * Tool call index in the array */ - type?: ChatStreamToolCallType | undefined; + index: number; /** - * Function call details + * Tool call type */ - function?: ChatStreamToolCallFunction | undefined; + type?: ChatStreamToolCallType | undefined; }; -/** @internal */ -export const ChatStreamToolCallType$inboundSchema: z.ZodEnum< - typeof ChatStreamToolCallType -> = z.enum(ChatStreamToolCallType); - /** @internal */ export const ChatStreamToolCallFunction$inboundSchema: z.ZodType< ChatStreamToolCallFunction, unknown > = z.object({ - name: z.string().optional(), arguments: z.string().optional(), + name: z.string().optional(), }); export function chatStreamToolCallFunctionFromJSON( @@ -80,15 +75,20 @@ export function chatStreamToolCallFunctionFromJSON( ); } +/** @internal */ +export const ChatStreamToolCallType$inboundSchema: z.ZodEnum< + typeof ChatStreamToolCallType +> = z.enum(ChatStreamToolCallType); + /** @internal */ export const ChatStreamToolCall$inboundSchema: z.ZodType< ChatStreamToolCall, unknown > = z.object({ - index: z.number(), + function: z.lazy(() => ChatStreamToolCallFunction$inboundSchema).optional(), id: z.string().optional(), + index: z.int(), type: ChatStreamToolCallType$inboundSchema.optional(), - function: z.lazy(() => ChatStreamToolCallFunction$inboundSchema).optional(), }); export function chatStreamToolCallFromJSON( diff --git a/src/models/chatsystemmessage.ts b/src/models/chatsystemmessage.ts index c053a9a8..1c9eef12 100644 --- a/src/models/chatsystemmessage.ts +++ b/src/models/chatsystemmessage.ts @@ -19,7 +19,6 @@ export type ChatSystemMessageContent = string | Array; * System message for setting behavior */ export type ChatSystemMessage = { - role: "system"; /** * System message content */ @@ -28,6 +27,7 @@ export type ChatSystemMessage = { * Optional name for the system message */ name?: string | undefined; + role: "system"; }; /** @internal */ @@ -51,9 +51,9 @@ export function chatSystemMessageContentToJSON( /** @internal */ export type ChatSystemMessage$Outbound = { - role: "system"; content: string | Array; name?: string | undefined; + role: "system"; }; /** @internal */ @@ -61,9 +61,9 @@ export const ChatSystemMessage$outboundSchema: z.ZodType< ChatSystemMessage$Outbound, ChatSystemMessage > = z.object({ - role: z.literal("system"), content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]), name: z.string().optional(), + role: z.literal("system"), }); export function chatSystemMessageToJSON( diff --git a/src/models/chattokenlogprob.ts b/src/models/chattokenlogprob.ts index c99af343..2f78eaa7 100644 --- a/src/models/chattokenlogprob.ts +++ b/src/models/chattokenlogprob.ts @@ -10,9 +10,9 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ChatTokenLogprobTopLogprob = { - token: string; - logprob: number; bytes: Array | null; + logprob: number; + token: string; }; /** @@ -20,17 +20,17 @@ export type ChatTokenLogprobTopLogprob = { */ export type ChatTokenLogprob = { /** - * The token + * UTF-8 bytes of the token */ - token: string; + bytes: Array | null; /** * Log probability of the token */ logprob: number; /** - * UTF-8 bytes of the token + * The token */ - bytes: Array | null; + token: string; /** * Top alternative tokens with probabilities */ @@ -42,9 +42,9 @@ export const ChatTokenLogprobTopLogprob$inboundSchema: z.ZodType< ChatTokenLogprobTopLogprob, unknown > = z.object({ - token: z.string(), + bytes: z.nullable(z.array(z.int())), logprob: z.number(), - bytes: z.nullable(z.array(z.number())), + token: z.string(), }); export function chatTokenLogprobTopLogprobFromJSON( @@ -62,9 +62,9 @@ export const ChatTokenLogprob$inboundSchema: z.ZodType< ChatTokenLogprob, unknown > = z.object({ - token: z.string(), + bytes: z.nullable(z.array(z.int())), logprob: z.number(), - bytes: z.nullable(z.array(z.number())), + token: z.string(), top_logprobs: z.array(z.lazy(() => ChatTokenLogprobTopLogprob$inboundSchema)), }).transform((v) => { return remap$(v, { diff --git a/src/models/chattoolcall.ts b/src/models/chattoolcall.ts index 27111a24..40125411 100644 --- a/src/models/chattoolcall.ts +++ b/src/models/chattoolcall.ts @@ -9,55 +9,46 @@ import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ChatToolCallType = { - Function: "function", -} as const; -export type ChatToolCallType = ClosedEnum; - export type ChatToolCallFunction = { - /** - * Function name to call - */ - name: string; /** * Function arguments as JSON string */ arguments: string; + /** + * Function name to call + */ + name: string; }; +export const ChatToolCallType = { + Function: "function", +} as const; +export type ChatToolCallType = ClosedEnum; + /** * Tool call made by the assistant */ export type ChatToolCall = { + function: ChatToolCallFunction; /** * Tool call identifier */ id: string; type: ChatToolCallType; - function: ChatToolCallFunction; }; -/** @internal */ -export const ChatToolCallType$inboundSchema: z.ZodEnum< - typeof ChatToolCallType -> = z.enum(ChatToolCallType); -/** @internal */ -export const ChatToolCallType$outboundSchema: z.ZodEnum< - typeof ChatToolCallType -> = ChatToolCallType$inboundSchema; - /** @internal */ export const ChatToolCallFunction$inboundSchema: z.ZodType< ChatToolCallFunction, unknown > = z.object({ - name: z.string(), arguments: z.string(), + name: z.string(), }); /** @internal */ export type ChatToolCallFunction$Outbound = { - name: string; arguments: string; + name: string; }; /** @internal */ @@ -65,8 +56,8 @@ export const ChatToolCallFunction$outboundSchema: z.ZodType< ChatToolCallFunction$Outbound, ChatToolCallFunction > = z.object({ - name: z.string(), arguments: z.string(), + name: z.string(), }); export function chatToolCallFunctionToJSON( @@ -86,18 +77,27 @@ export function chatToolCallFunctionFromJSON( ); } +/** @internal */ +export const ChatToolCallType$inboundSchema: z.ZodEnum< + typeof ChatToolCallType +> = z.enum(ChatToolCallType); +/** @internal */ +export const ChatToolCallType$outboundSchema: z.ZodEnum< + typeof ChatToolCallType +> = ChatToolCallType$inboundSchema; + /** @internal */ export const ChatToolCall$inboundSchema: z.ZodType = z .object({ + function: z.lazy(() => ChatToolCallFunction$inboundSchema), id: z.string(), type: ChatToolCallType$inboundSchema, - function: z.lazy(() => ChatToolCallFunction$inboundSchema), }); /** @internal */ export type ChatToolCall$Outbound = { + function: ChatToolCallFunction$Outbound; id: string; type: string; - function: ChatToolCallFunction$Outbound; }; /** @internal */ @@ -105,9 +105,9 @@ export const ChatToolCall$outboundSchema: z.ZodType< ChatToolCall$Outbound, ChatToolCall > = z.object({ + function: z.lazy(() => ChatToolCallFunction$outboundSchema), id: z.string(), type: ChatToolCallType$outboundSchema, - function: z.lazy(() => ChatToolCallFunction$outboundSchema), }); export function chatToolCallToJSON(chatToolCall: ChatToolCall): string { diff --git a/src/models/chattoolmessage.ts b/src/models/chattoolmessage.ts index 35a6c2e6..0ecb42a7 100644 --- a/src/models/chattoolmessage.ts +++ b/src/models/chattoolmessage.ts @@ -20,11 +20,11 @@ export type ChatToolMessageContent = string | Array; * Tool response message */ export type ChatToolMessage = { - role: "tool"; /** * Tool response content */ content: string | Array; + role: "tool"; /** * ID of the assistant message tool call this message responds to */ @@ -52,8 +52,8 @@ export function chatToolMessageContentToJSON( /** @internal */ export type ChatToolMessage$Outbound = { - role: "tool"; content: string | Array; + role: "tool"; tool_call_id: string; }; @@ -62,8 +62,8 @@ export const ChatToolMessage$outboundSchema: z.ZodType< ChatToolMessage$Outbound, ChatToolMessage > = z.object({ - role: z.literal("tool"), content: z.union([z.string(), z.array(ChatContentItems$outboundSchema)]), + role: z.literal("tool"), toolCallId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatusage.ts b/src/models/chatusage.ts index 439206d0..28551b72 100644 --- a/src/models/chatusage.ts +++ b/src/models/chatusage.ts @@ -14,21 +14,21 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; */ export type CompletionTokensDetails = { /** - * Tokens used for reasoning + * Accepted prediction tokens */ - reasoningTokens?: number | null | undefined; + acceptedPredictionTokens?: number | undefined; /** * Tokens used for audio output */ - audioTokens?: number | null | undefined; + audioTokens?: number | undefined; /** - * Accepted prediction tokens + * Tokens used for reasoning */ - acceptedPredictionTokens?: number | null | undefined; + reasoningTokens?: number | undefined; /** * Rejected prediction tokens */ - rejectedPredictionTokens?: number | null | undefined; + rejectedPredictionTokens?: number | undefined; }; /** @@ -36,17 +36,17 @@ export type CompletionTokensDetails = { */ export type PromptTokensDetails = { /** - * Cached prompt tokens + * Audio input tokens */ - cachedTokens?: number | undefined; + audioTokens?: number | undefined; /** * Tokens written to cache. Only returned for models with explicit caching and cache write pricing. */ cacheWriteTokens?: number | undefined; /** - * Audio input tokens + * Cached prompt tokens */ - audioTokens?: number | undefined; + cachedTokens?: number | undefined; /** * Video input tokens */ @@ -61,22 +61,22 @@ export type ChatUsage = { * Number of tokens in the completion */ completionTokens: number; - /** - * Number of tokens in the prompt - */ - promptTokens: number; - /** - * Total number of tokens - */ - totalTokens: number; /** * Detailed completion token usage */ completionTokensDetails?: CompletionTokensDetails | null | undefined; + /** + * Number of tokens in the prompt + */ + promptTokens: number; /** * Detailed prompt token usage */ promptTokensDetails?: PromptTokensDetails | null | undefined; + /** + * Total number of tokens + */ + totalTokens: number; }; /** @internal */ @@ -84,15 +84,15 @@ export const CompletionTokensDetails$inboundSchema: z.ZodType< CompletionTokensDetails, unknown > = z.object({ - reasoning_tokens: z.nullable(z.number()).optional(), - audio_tokens: z.nullable(z.number()).optional(), - accepted_prediction_tokens: z.nullable(z.number()).optional(), - rejected_prediction_tokens: z.nullable(z.number()).optional(), + accepted_prediction_tokens: z.int().optional(), + audio_tokens: z.int().optional(), + reasoning_tokens: z.int().optional(), + rejected_prediction_tokens: z.int().optional(), }).transform((v) => { return remap$(v, { - "reasoning_tokens": "reasoningTokens", - "audio_tokens": "audioTokens", "accepted_prediction_tokens": "acceptedPredictionTokens", + "audio_tokens": "audioTokens", + "reasoning_tokens": "reasoningTokens", "rejected_prediction_tokens": "rejectedPredictionTokens", }); }); @@ -112,15 +112,15 @@ export const PromptTokensDetails$inboundSchema: z.ZodType< PromptTokensDetails, unknown > = z.object({ - cached_tokens: z.number().optional(), - cache_write_tokens: z.number().optional(), - audio_tokens: z.number().optional(), - video_tokens: z.number().optional(), + audio_tokens: z.int().optional(), + cache_write_tokens: z.int().optional(), + cached_tokens: z.int().optional(), + video_tokens: z.int().optional(), }).transform((v) => { return remap$(v, { - "cached_tokens": "cachedTokens", - "cache_write_tokens": "cacheWriteTokens", "audio_tokens": "audioTokens", + "cache_write_tokens": "cacheWriteTokens", + "cached_tokens": "cachedTokens", "video_tokens": "videoTokens", }); }); @@ -137,22 +137,22 @@ export function promptTokensDetailsFromJSON( /** @internal */ export const ChatUsage$inboundSchema: z.ZodType = z.object({ - completion_tokens: z.number(), - prompt_tokens: z.number(), - total_tokens: z.number(), + completion_tokens: z.int(), completion_tokens_details: z.nullable( z.lazy(() => CompletionTokensDetails$inboundSchema), ).optional(), + prompt_tokens: z.int(), prompt_tokens_details: z.nullable( z.lazy(() => PromptTokensDetails$inboundSchema), ).optional(), + total_tokens: z.int(), }).transform((v) => { return remap$(v, { "completion_tokens": "completionTokens", - "prompt_tokens": "promptTokens", - "total_tokens": "totalTokens", "completion_tokens_details": "completionTokensDetails", + "prompt_tokens": "promptTokens", "prompt_tokens_details": "promptTokensDetails", + "total_tokens": "totalTokens", }); }); diff --git a/src/models/chatusermessage.ts b/src/models/chatusermessage.ts index 49794171..682f02b8 100644 --- a/src/models/chatusermessage.ts +++ b/src/models/chatusermessage.ts @@ -19,7 +19,6 @@ export type ChatUserMessageContent = string | Array; * User message */ export type ChatUserMessage = { - role: "user"; /** * User message content */ @@ -28,6 +27,7 @@ export type ChatUserMessage = { * Optional name for the user */ name?: string | undefined; + role: "user"; }; /** @internal */ @@ -51,9 +51,9 @@ export function chatUserMessageContentToJSON( /** @internal */ export type ChatUserMessage$Outbound = { - role: "user"; content: string | Array; name?: string | undefined; + role: "user"; }; /** @internal */ @@ -61,9 +61,9 @@ export const ChatUserMessage$outboundSchema: z.ZodType< ChatUserMessage$Outbound, ChatUserMessage > = z.object({ - role: z.literal("user"), content: z.union([z.string(), z.array(ChatContentItems$outboundSchema)]), name: z.string().optional(), + role: z.literal("user"), }); export function chatUserMessageToJSON( diff --git a/src/models/chatwebsearchservertool.ts b/src/models/chatwebsearchservertool.ts deleted file mode 100644 index 34a2183b..00000000 --- a/src/models/chatwebsearchservertool.ts +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: ae822f875178 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; - -export const ChatWebSearchServerToolTypeOpenrouterWebSearch = { - OpenrouterWebSearch: "openrouter:web_search", -} as const; -export type ChatWebSearchServerToolTypeOpenrouterWebSearch = ClosedEnum< - typeof ChatWebSearchServerToolTypeOpenrouterWebSearch ->; - -/** - * 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. - */ -export const ChatWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type ChatWebSearchServerToolEngine = OpenEnum< - typeof ChatWebSearchServerToolEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchServerToolSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchServerToolSearchContextSize = OpenEnum< - typeof ChatWebSearchServerToolSearchContextSize ->; - -export const ChatWebSearchServerToolParametersType = { - Approximate: "approximate", -} as const; -export type ChatWebSearchServerToolParametersType = ClosedEnum< - typeof ChatWebSearchServerToolParametersType ->; - -/** - * Approximate user location for location-biased results. - */ -export type ChatWebSearchServerToolUserLocation = { - type?: ChatWebSearchServerToolParametersType | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -export type ChatWebSearchServerToolParameters = { - /** - * 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. - */ - engine?: ChatWebSearchServerToolEngine | undefined; - /** - * 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. - */ - maxResults?: number | undefined; - /** - * 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. - */ - maxTotalResults?: number | undefined; - /** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ - searchContextSize?: ChatWebSearchServerToolSearchContextSize | undefined; - /** - * Approximate user location for location-biased results. - */ - userLocation?: ChatWebSearchServerToolUserLocation | undefined; - /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - allowedDomains?: Array | undefined; - /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - excludedDomains?: Array | undefined; -}; - -/** - * OpenRouter built-in server tool: searches the web for current information - */ -export type ChatWebSearchServerTool = { - type: ChatWebSearchServerToolTypeOpenrouterWebSearch; - parameters?: ChatWebSearchServerToolParameters | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolTypeOpenrouterWebSearch$outboundSchema: - z.ZodEnum = z.enum( - ChatWebSearchServerToolTypeOpenrouterWebSearch, - ); - -/** @internal */ -export const ChatWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchServerToolEngine -> = openEnums.outboundSchema(ChatWebSearchServerToolEngine); - -/** @internal */ -export const ChatWebSearchServerToolSearchContextSize$outboundSchema: z.ZodType< - string, - ChatWebSearchServerToolSearchContextSize -> = openEnums.outboundSchema(ChatWebSearchServerToolSearchContextSize); - -/** @internal */ -export const ChatWebSearchServerToolParametersType$outboundSchema: z.ZodEnum< - typeof ChatWebSearchServerToolParametersType -> = z.enum(ChatWebSearchServerToolParametersType); - -/** @internal */ -export type ChatWebSearchServerToolUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolUserLocation$outboundSchema: z.ZodType< - ChatWebSearchServerToolUserLocation$Outbound, - ChatWebSearchServerToolUserLocation -> = z.object({ - type: ChatWebSearchServerToolParametersType$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), -}); - -export function chatWebSearchServerToolUserLocationToJSON( - chatWebSearchServerToolUserLocation: ChatWebSearchServerToolUserLocation, -): string { - return JSON.stringify( - ChatWebSearchServerToolUserLocation$outboundSchema.parse( - chatWebSearchServerToolUserLocation, - ), - ); -} - -/** @internal */ -export type ChatWebSearchServerToolParameters$Outbound = { - engine?: string | undefined; - max_results?: number | undefined; - max_total_results?: number | undefined; - search_context_size?: string | undefined; - user_location?: ChatWebSearchServerToolUserLocation$Outbound | undefined; - allowed_domains?: Array | undefined; - excluded_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerToolParameters$outboundSchema: z.ZodType< - ChatWebSearchServerToolParameters$Outbound, - ChatWebSearchServerToolParameters -> = z.object({ - engine: ChatWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: ChatWebSearchServerToolSearchContextSize$outboundSchema - .optional(), - userLocation: z.lazy(() => ChatWebSearchServerToolUserLocation$outboundSchema) - .optional(), - allowedDomains: z.array(z.string()).optional(), - excludedDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - maxTotalResults: "max_total_results", - searchContextSize: "search_context_size", - userLocation: "user_location", - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function chatWebSearchServerToolParametersToJSON( - chatWebSearchServerToolParameters: ChatWebSearchServerToolParameters, -): string { - return JSON.stringify( - ChatWebSearchServerToolParameters$outboundSchema.parse( - chatWebSearchServerToolParameters, - ), - ); -} - -/** @internal */ -export type ChatWebSearchServerTool$Outbound = { - type: string; - parameters?: ChatWebSearchServerToolParameters$Outbound | undefined; -}; - -/** @internal */ -export const ChatWebSearchServerTool$outboundSchema: z.ZodType< - ChatWebSearchServerTool$Outbound, - ChatWebSearchServerTool -> = z.object({ - type: ChatWebSearchServerToolTypeOpenrouterWebSearch$outboundSchema, - parameters: z.lazy(() => ChatWebSearchServerToolParameters$outboundSchema) - .optional(), -}); - -export function chatWebSearchServerToolToJSON( - chatWebSearchServerTool: ChatWebSearchServerTool, -): string { - return JSON.stringify( - ChatWebSearchServerTool$outboundSchema.parse(chatWebSearchServerTool), - ); -} diff --git a/src/models/chatwebsearchshorthand.ts b/src/models/chatwebsearchshorthand.ts index 9ba2ce00..b91fc96b 100644 --- a/src/models/chatwebsearchshorthand.ts +++ b/src/models/chatwebsearchshorthand.ts @@ -6,7 +6,25 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + SearchQualityLevel, + SearchQualityLevel$outboundSchema, +} from "./searchqualitylevel.js"; +import { + WebSearchConfig, + WebSearchConfig$Outbound, + WebSearchConfig$outboundSchema, +} from "./websearchconfig.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; +import { + WebSearchUserLocationServerTool, + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool$outboundSchema, +} from "./websearchuserlocationservertool.js"; export const ChatWebSearchShorthandType = { WebSearch: "web_search", @@ -19,147 +37,21 @@ export type ChatWebSearchShorthandType = OpenEnum< >; /** - * 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. - */ -export const ChatWebSearchShorthandEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type ChatWebSearchShorthandEngine = OpenEnum< - typeof ChatWebSearchShorthandEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchShorthandSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchShorthandSearchContextSize = OpenEnum< - typeof ChatWebSearchShorthandSearchContextSize ->; - -export const ChatWebSearchShorthandTypeApproximate = { - Approximate: "approximate", -} as const; -export type ChatWebSearchShorthandTypeApproximate = ClosedEnum< - typeof ChatWebSearchShorthandTypeApproximate ->; - -/** - * Approximate user location for location-biased results. - */ -export type ChatWebSearchShorthandUserLocation = { - type?: ChatWebSearchShorthandTypeApproximate | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** - * 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. - */ -export const ChatWebSearchShorthandParametersEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type ChatWebSearchShorthandParametersEngine = OpenEnum< - typeof ChatWebSearchShorthandParametersEngine ->; - -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export const ChatWebSearchShorthandParametersSearchContextSize = { - Low: "low", - Medium: "medium", - High: "high", -} as const; -/** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ -export type ChatWebSearchShorthandParametersSearchContextSize = OpenEnum< - typeof ChatWebSearchShorthandParametersSearchContextSize ->; - -export const ChatWebSearchShorthandParametersType = { - Approximate: "approximate", -} as const; -export type ChatWebSearchShorthandParametersType = ClosedEnum< - typeof ChatWebSearchShorthandParametersType ->; - -/** - * Approximate user location for location-biased results. + * Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. */ -export type ChatWebSearchShorthandParametersUserLocation = { - type?: ChatWebSearchShorthandParametersType | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -export type ChatWebSearchShorthandParameters = { - /** - * 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. - */ - engine?: ChatWebSearchShorthandParametersEngine | undefined; - /** - * 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. - */ - maxResults?: number | undefined; - /** - * 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. - */ - maxTotalResults?: number | undefined; - /** - * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. - */ - searchContextSize?: - | ChatWebSearchShorthandParametersSearchContextSize - | undefined; - /** - * Approximate user location for location-biased results. - */ - userLocation?: ChatWebSearchShorthandParametersUserLocation | undefined; +export type ChatWebSearchShorthand = { /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + * Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. */ allowedDomains?: Array | undefined; /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + * 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. */ - excludedDomains?: Array | undefined; -}; - -/** - * Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. - */ -export type ChatWebSearchShorthand = { - type: ChatWebSearchShorthandType; + engine?: WebSearchEngineEnum | undefined; /** - * 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. + * Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. */ - engine?: ChatWebSearchShorthandEngine | undefined; + excludedDomains?: Array | undefined; /** * 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. */ @@ -168,23 +60,16 @@ export type ChatWebSearchShorthand = { * 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. */ maxTotalResults?: number | undefined; + parameters?: WebSearchConfig | undefined; /** * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. */ - searchContextSize?: ChatWebSearchShorthandSearchContextSize | undefined; + searchContextSize?: SearchQualityLevel | undefined; + type: ChatWebSearchShorthandType; /** * Approximate user location for location-biased results. */ - userLocation?: ChatWebSearchShorthandUserLocation | undefined; - /** - * Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - allowedDomains?: Array | undefined; - /** - * Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. - */ - excludedDomains?: Array | undefined; - parameters?: ChatWebSearchShorthandParameters | undefined; + userLocation?: WebSearchUserLocationServerTool | undefined; }; /** @internal */ @@ -193,163 +78,17 @@ export const ChatWebSearchShorthandType$outboundSchema: z.ZodType< ChatWebSearchShorthandType > = openEnums.outboundSchema(ChatWebSearchShorthandType); -/** @internal */ -export const ChatWebSearchShorthandEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandEngine -> = openEnums.outboundSchema(ChatWebSearchShorthandEngine); - -/** @internal */ -export const ChatWebSearchShorthandSearchContextSize$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandSearchContextSize -> = openEnums.outboundSchema(ChatWebSearchShorthandSearchContextSize); - -/** @internal */ -export const ChatWebSearchShorthandTypeApproximate$outboundSchema: z.ZodEnum< - typeof ChatWebSearchShorthandTypeApproximate -> = z.enum(ChatWebSearchShorthandTypeApproximate); - -/** @internal */ -export type ChatWebSearchShorthandUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandUserLocation$outboundSchema: z.ZodType< - ChatWebSearchShorthandUserLocation$Outbound, - ChatWebSearchShorthandUserLocation -> = z.object({ - type: ChatWebSearchShorthandTypeApproximate$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), -}); - -export function chatWebSearchShorthandUserLocationToJSON( - chatWebSearchShorthandUserLocation: ChatWebSearchShorthandUserLocation, -): string { - return JSON.stringify( - ChatWebSearchShorthandUserLocation$outboundSchema.parse( - chatWebSearchShorthandUserLocation, - ), - ); -} - -/** @internal */ -export const ChatWebSearchShorthandParametersEngine$outboundSchema: z.ZodType< - string, - ChatWebSearchShorthandParametersEngine -> = openEnums.outboundSchema(ChatWebSearchShorthandParametersEngine); - -/** @internal */ -export const ChatWebSearchShorthandParametersSearchContextSize$outboundSchema: - z.ZodType = - openEnums.outboundSchema(ChatWebSearchShorthandParametersSearchContextSize); - -/** @internal */ -export const ChatWebSearchShorthandParametersType$outboundSchema: z.ZodEnum< - typeof ChatWebSearchShorthandParametersType -> = z.enum(ChatWebSearchShorthandParametersType); - -/** @internal */ -export type ChatWebSearchShorthandParametersUserLocation$Outbound = { - type?: string | undefined; - city?: string | undefined; - region?: string | undefined; - country?: string | undefined; - timezone?: string | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandParametersUserLocation$outboundSchema: - z.ZodType< - ChatWebSearchShorthandParametersUserLocation$Outbound, - ChatWebSearchShorthandParametersUserLocation - > = z.object({ - type: ChatWebSearchShorthandParametersType$outboundSchema.optional(), - city: z.string().optional(), - region: z.string().optional(), - country: z.string().optional(), - timezone: z.string().optional(), - }); - -export function chatWebSearchShorthandParametersUserLocationToJSON( - chatWebSearchShorthandParametersUserLocation: - ChatWebSearchShorthandParametersUserLocation, -): string { - return JSON.stringify( - ChatWebSearchShorthandParametersUserLocation$outboundSchema.parse( - chatWebSearchShorthandParametersUserLocation, - ), - ); -} - -/** @internal */ -export type ChatWebSearchShorthandParameters$Outbound = { - engine?: string | undefined; - max_results?: number | undefined; - max_total_results?: number | undefined; - search_context_size?: string | undefined; - user_location?: - | ChatWebSearchShorthandParametersUserLocation$Outbound - | undefined; - allowed_domains?: Array | undefined; - excluded_domains?: Array | undefined; -}; - -/** @internal */ -export const ChatWebSearchShorthandParameters$outboundSchema: z.ZodType< - ChatWebSearchShorthandParameters$Outbound, - ChatWebSearchShorthandParameters -> = z.object({ - engine: ChatWebSearchShorthandParametersEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: - ChatWebSearchShorthandParametersSearchContextSize$outboundSchema.optional(), - userLocation: z.lazy(() => - ChatWebSearchShorthandParametersUserLocation$outboundSchema - ).optional(), - allowedDomains: z.array(z.string()).optional(), - excludedDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - maxTotalResults: "max_total_results", - searchContextSize: "search_context_size", - userLocation: "user_location", - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function chatWebSearchShorthandParametersToJSON( - chatWebSearchShorthandParameters: ChatWebSearchShorthandParameters, -): string { - return JSON.stringify( - ChatWebSearchShorthandParameters$outboundSchema.parse( - chatWebSearchShorthandParameters, - ), - ); -} - /** @internal */ export type ChatWebSearchShorthand$Outbound = { - type: string; + allowed_domains?: Array | undefined; engine?: string | undefined; + excluded_domains?: Array | undefined; max_results?: number | undefined; max_total_results?: number | undefined; + parameters?: WebSearchConfig$Outbound | undefined; search_context_size?: string | undefined; - user_location?: ChatWebSearchShorthandUserLocation$Outbound | undefined; - allowed_domains?: Array | undefined; - excluded_domains?: Array | undefined; - parameters?: ChatWebSearchShorthandParameters$Outbound | undefined; + type: string; + user_location?: WebSearchUserLocationServerTool$Outbound | undefined; }; /** @internal */ @@ -357,26 +96,23 @@ export const ChatWebSearchShorthand$outboundSchema: z.ZodType< ChatWebSearchShorthand$Outbound, ChatWebSearchShorthand > = z.object({ - type: ChatWebSearchShorthandType$outboundSchema, - engine: ChatWebSearchShorthandEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), - searchContextSize: ChatWebSearchShorthandSearchContextSize$outboundSchema - .optional(), - userLocation: z.lazy(() => ChatWebSearchShorthandUserLocation$outboundSchema) - .optional(), allowedDomains: z.array(z.string()).optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), excludedDomains: z.array(z.string()).optional(), - parameters: z.lazy(() => ChatWebSearchShorthandParameters$outboundSchema) - .optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), + parameters: WebSearchConfig$outboundSchema.optional(), + searchContextSize: SearchQualityLevel$outboundSchema.optional(), + type: ChatWebSearchShorthandType$outboundSchema, + userLocation: WebSearchUserLocationServerTool$outboundSchema.optional(), }).transform((v) => { return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", maxResults: "max_results", maxTotalResults: "max_total_results", searchContextSize: "search_context_size", userLocation: "user_location", - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", }); }); diff --git a/src/models/codeinterpreterservertool.ts b/src/models/codeinterpreterservertool.ts index 3f47f0ea..d31b6b73 100644 --- a/src/models/codeinterpreterservertool.ts +++ b/src/models/codeinterpreterservertool.ts @@ -11,11 +11,6 @@ import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ContainerType = { - Auto: "auto", -} as const; -export type ContainerType = ClosedEnum; - export const MemoryLimit = { Oneg: "1g", Fourg: "4g", @@ -24,10 +19,15 @@ export const MemoryLimit = { } as const; export type MemoryLimit = OpenEnum; +export const ContainerType = { + Auto: "auto", +} as const; +export type ContainerType = ClosedEnum; + export type ContainerAuto = { - type: ContainerType; fileIds?: Array | undefined; memoryLimit?: MemoryLimit | null | undefined; + type: ContainerType; }; export type Container = ContainerAuto | string; @@ -36,17 +36,10 @@ export type Container = ContainerAuto | string; * Code interpreter tool configuration */ export type CodeInterpreterServerTool = { - type: "code_interpreter"; container: ContainerAuto | string; + type: "code_interpreter"; }; -/** @internal */ -export const ContainerType$inboundSchema: z.ZodEnum = z - .enum(ContainerType); -/** @internal */ -export const ContainerType$outboundSchema: z.ZodEnum = - ContainerType$inboundSchema; - /** @internal */ export const MemoryLimit$inboundSchema: z.ZodType = openEnums.inboundSchema(MemoryLimit); @@ -54,12 +47,19 @@ export const MemoryLimit$inboundSchema: z.ZodType = export const MemoryLimit$outboundSchema: z.ZodType = openEnums.outboundSchema(MemoryLimit); +/** @internal */ +export const ContainerType$inboundSchema: z.ZodEnum = z + .enum(ContainerType); +/** @internal */ +export const ContainerType$outboundSchema: z.ZodEnum = + ContainerType$inboundSchema; + /** @internal */ export const ContainerAuto$inboundSchema: z.ZodType = z .object({ - type: ContainerType$inboundSchema, file_ids: z.array(z.string()).optional(), memory_limit: z.nullable(MemoryLimit$inboundSchema).optional(), + type: ContainerType$inboundSchema, }).transform((v) => { return remap$(v, { "file_ids": "fileIds", @@ -68,9 +68,9 @@ export const ContainerAuto$inboundSchema: z.ZodType = z }); /** @internal */ export type ContainerAuto$Outbound = { - type: string; file_ids?: Array | undefined; memory_limit?: string | null | undefined; + type: string; }; /** @internal */ @@ -78,9 +78,9 @@ export const ContainerAuto$outboundSchema: z.ZodType< ContainerAuto$Outbound, ContainerAuto > = z.object({ - type: ContainerType$outboundSchema, fileIds: z.array(z.string()).optional(), memoryLimit: z.nullable(MemoryLimit$outboundSchema).optional(), + type: ContainerType$outboundSchema, }).transform((v) => { return remap$(v, { fileIds: "file_ids", @@ -133,13 +133,13 @@ export const CodeInterpreterServerTool$inboundSchema: z.ZodType< CodeInterpreterServerTool, unknown > = z.object({ - type: z.literal("code_interpreter"), container: z.union([z.lazy(() => ContainerAuto$inboundSchema), z.string()]), + type: z.literal("code_interpreter"), }); /** @internal */ export type CodeInterpreterServerTool$Outbound = { - type: "code_interpreter"; container: ContainerAuto$Outbound | string; + type: "code_interpreter"; }; /** @internal */ @@ -147,8 +147,8 @@ export const CodeInterpreterServerTool$outboundSchema: z.ZodType< CodeInterpreterServerTool$Outbound, CodeInterpreterServerTool > = z.object({ - type: z.literal("code_interpreter"), container: z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]), + type: z.literal("code_interpreter"), }); export function codeInterpreterServerToolToJSON( diff --git a/src/models/compoundfilter.ts b/src/models/compoundfilter.ts index addc6873..e4951477 100644 --- a/src/models/compoundfilter.ts +++ b/src/models/compoundfilter.ts @@ -20,8 +20,8 @@ export type CompoundFilterType = OpenEnum; * A compound filter that combines multiple comparison or compound filters */ export type CompoundFilter = { - type: CompoundFilterType; filters: Array<{ [k: string]: any | null }>; + type: CompoundFilterType; }; /** @internal */ @@ -38,13 +38,13 @@ export const CompoundFilterType$outboundSchema: z.ZodType< /** @internal */ export const CompoundFilter$inboundSchema: z.ZodType = z.object({ - type: CompoundFilterType$inboundSchema, filters: z.array(z.record(z.string(), z.nullable(z.any()))), + type: CompoundFilterType$inboundSchema, }); /** @internal */ export type CompoundFilter$Outbound = { - type: string; filters: Array<{ [k: string]: any | null }>; + type: string; }; /** @internal */ @@ -52,8 +52,8 @@ export const CompoundFilter$outboundSchema: z.ZodType< CompoundFilter$Outbound, CompoundFilter > = z.object({ - type: CompoundFilterType$outboundSchema, filters: z.array(z.record(z.string(), z.nullable(z.any()))), + type: CompoundFilterType$outboundSchema, }); export function compoundFilterToJSON(compoundFilter: CompoundFilter): string { diff --git a/src/models/computeruseservertool.ts b/src/models/computeruseservertool.ts index 3af58e15..a6b9ce48 100644 --- a/src/models/computeruseservertool.ts +++ b/src/models/computeruseservertool.ts @@ -24,10 +24,10 @@ export type Environment = OpenEnum; * Computer use preview tool configuration */ export type ComputerUseServerTool = { - type: "computer_use_preview"; displayHeight: number; displayWidth: number; environment: Environment; + type: "computer_use_preview"; }; /** @internal */ @@ -42,10 +42,10 @@ export const ComputerUseServerTool$inboundSchema: z.ZodType< ComputerUseServerTool, unknown > = z.object({ - type: z.literal("computer_use_preview"), - display_height: z.number(), - display_width: z.number(), + display_height: z.int(), + display_width: z.int(), environment: Environment$inboundSchema, + type: z.literal("computer_use_preview"), }).transform((v) => { return remap$(v, { "display_height": "displayHeight", @@ -54,10 +54,10 @@ export const ComputerUseServerTool$inboundSchema: z.ZodType< }); /** @internal */ export type ComputerUseServerTool$Outbound = { - type: "computer_use_preview"; display_height: number; display_width: number; environment: string; + type: "computer_use_preview"; }; /** @internal */ @@ -65,10 +65,10 @@ export const ComputerUseServerTool$outboundSchema: z.ZodType< ComputerUseServerTool$Outbound, ComputerUseServerTool > = z.object({ - type: z.literal("computer_use_preview"), - displayHeight: z.number(), - displayWidth: z.number(), + displayHeight: z.int(), + displayWidth: z.int(), environment: Environment$outboundSchema, + type: z.literal("computer_use_preview"), }).transform((v) => { return remap$(v, { displayHeight: "display_height", diff --git a/src/models/contentpartaddedevent.ts b/src/models/contentpartaddedevent.ts index 3bad02f6..aa47c9af 100644 --- a/src/models/contentpartaddedevent.ts +++ b/src/models/contentpartaddedevent.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -24,34 +26,36 @@ import { export type ContentPartAddedEventPart = | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; /** * Event emitted when a new content part is added to an output item */ export type ContentPartAddedEvent = { - type: "response.content_part.added"; - outputIndex: number; - itemId: string; contentIndex: number; + itemId: string; + outputIndex: number; part: | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; sequenceNumber: number; + type: "response.content_part.added"; }; /** @internal */ export const ContentPartAddedEventPart$inboundSchema: z.ZodType< ContentPartAddedEventPart, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, -]); + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function contentPartAddedEventPartFromJSON( jsonString: string, @@ -68,23 +72,23 @@ export const ContentPartAddedEvent$inboundSchema: z.ZodType< ContentPartAddedEvent, unknown > = z.object({ - type: z.literal("response.content_part.added"), - output_index: z.number(), + content_index: z.int(), item_id: z.string(), - content_index: z.number(), - part: z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( + output_index: z.int(), + part: discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, - ]), - sequence_number: z.number(), + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), + sequence_number: z.int(), + type: z.literal("response.content_part.added"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/contentpartdoneevent.ts b/src/models/contentpartdoneevent.ts index ced429f9..ab860600 100644 --- a/src/models/contentpartdoneevent.ts +++ b/src/models/contentpartdoneevent.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -24,34 +26,36 @@ import { export type ContentPartDoneEventPart = | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; /** * Event emitted when a content part is complete */ export type ContentPartDoneEvent = { - type: "response.content_part.done"; - outputIndex: number; - itemId: string; contentIndex: number; + itemId: string; + outputIndex: number; part: | ResponseOutputText | (ReasoningTextContent & { type: "reasoning_text" }) - | OpenAIResponsesRefusalContent; + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; sequenceNumber: number; + type: "response.content_part.done"; }; /** @internal */ export const ContentPartDoneEventPart$inboundSchema: z.ZodType< ContentPartDoneEventPart, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, -]); + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function contentPartDoneEventPartFromJSON( jsonString: string, @@ -68,23 +72,23 @@ export const ContentPartDoneEvent$inboundSchema: z.ZodType< ContentPartDoneEvent, unknown > = z.object({ - type: z.literal("response.content_part.done"), - output_index: z.number(), + content_index: z.int(), item_id: z.string(), - content_index: z.number(), - part: z.union([ - ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema.and( + output_index: z.int(), + part: discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + reasoning_text: ReasoningTextContent$inboundSchema.and( z.object({ type: z.literal("reasoning_text") }), ), - OpenAIResponsesRefusalContent$inboundSchema, - ]), - sequence_number: z.number(), + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), + sequence_number: z.int(), + type: z.literal("response.content_part.done"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/contentpartimage.ts b/src/models/contentpartimage.ts new file mode 100644 index 00000000..2b26b4e8 --- /dev/null +++ b/src/models/contentpartimage.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6b4d72ed5ae8 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { ClosedEnum } from "../types/enums.js"; + +export type ContentPartImageImageUrl = { + url: string; +}; + +export const ContentPartImageType = { + ImageUrl: "image_url", +} as const; +export type ContentPartImageType = ClosedEnum; + +export type ContentPartImage = { + imageUrl: ContentPartImageImageUrl; + type: ContentPartImageType; +}; + +/** @internal */ +export type ContentPartImageImageUrl$Outbound = { + url: string; +}; + +/** @internal */ +export const ContentPartImageImageUrl$outboundSchema: z.ZodType< + ContentPartImageImageUrl$Outbound, + ContentPartImageImageUrl +> = z.object({ + url: z.string(), +}); + +export function contentPartImageImageUrlToJSON( + contentPartImageImageUrl: ContentPartImageImageUrl, +): string { + return JSON.stringify( + ContentPartImageImageUrl$outboundSchema.parse(contentPartImageImageUrl), + ); +} + +/** @internal */ +export const ContentPartImageType$outboundSchema: z.ZodEnum< + typeof ContentPartImageType +> = z.enum(ContentPartImageType); + +/** @internal */ +export type ContentPartImage$Outbound = { + image_url: ContentPartImageImageUrl$Outbound; + type: string; +}; + +/** @internal */ +export const ContentPartImage$outboundSchema: z.ZodType< + ContentPartImage$Outbound, + ContentPartImage +> = z.object({ + imageUrl: z.lazy(() => ContentPartImageImageUrl$outboundSchema), + type: ContentPartImageType$outboundSchema, +}).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + }); +}); + +export function contentPartImageToJSON( + contentPartImage: ContentPartImage, +): string { + return JSON.stringify( + ContentPartImage$outboundSchema.parse(contentPartImage), + ); +} diff --git a/src/models/contextcompressionplugin.ts b/src/models/contextcompressionplugin.ts new file mode 100644 index 00000000..a604de27 --- /dev/null +++ b/src/models/contextcompressionplugin.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e3e073b472a1 + */ + +import * as z from "zod/v4"; +import { + ContextCompressionEngine, + ContextCompressionEngine$outboundSchema, +} from "./contextcompressionengine.js"; + +export type ContextCompressionPlugin = { + /** + * Set to false to disable the context-compression plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * The compression engine to use. Defaults to "middle-out". + */ + engine?: ContextCompressionEngine | undefined; + id: "context-compression"; +}; + +/** @internal */ +export type ContextCompressionPlugin$Outbound = { + enabled?: boolean | undefined; + engine?: string | undefined; + id: "context-compression"; +}; + +/** @internal */ +export const ContextCompressionPlugin$outboundSchema: z.ZodType< + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin +> = z.object({ + enabled: z.boolean().optional(), + engine: ContextCompressionEngine$outboundSchema.optional(), + id: z.literal("context-compression"), +}); + +export function contextCompressionPluginToJSON( + contextCompressionPlugin: ContextCompressionPlugin, +): string { + return JSON.stringify( + ContextCompressionPlugin$outboundSchema.parse(contextCompressionPlugin), + ); +} diff --git a/src/models/createchargerequest.ts b/src/models/createchargerequest.ts deleted file mode 100644 index bd6860c3..00000000 --- a/src/models/createchargerequest.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: c342dc72d1f4 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ChainId = { - One: 1, - OneHundredAndThirtySeven: 137, - EightThousandFourHundredAndFiftyThree: 8453, -} as const; -export type ChainId = OpenEnum; - -/** - * Create a Coinbase charge for crypto payment - */ -export type CreateChargeRequest = { - amount: number; - sender: string; - chainId: ChainId; -}; - -/** @internal */ -export const ChainId$outboundSchema: z.ZodType = openEnums - .outboundSchemaInt(ChainId); - -/** @internal */ -export type CreateChargeRequest$Outbound = { - amount: number; - sender: string; - chain_id: number; -}; - -/** @internal */ -export const CreateChargeRequest$outboundSchema: z.ZodType< - CreateChargeRequest$Outbound, - CreateChargeRequest -> = z.object({ - amount: z.number(), - sender: z.string(), - chainId: ChainId$outboundSchema, -}).transform((v) => { - return remap$(v, { - chainId: "chain_id", - }); -}); - -export function createChargeRequestToJSON( - createChargeRequest: CreateChargeRequest, -): string { - return JSON.stringify( - CreateChargeRequest$outboundSchema.parse(createChargeRequest), - ); -} diff --git a/src/models/createguardrailrequest.ts b/src/models/createguardrailrequest.ts new file mode 100644 index 00000000..158a64a5 --- /dev/null +++ b/src/models/createguardrailrequest.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fbf07f1435fd + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + GuardrailInterval, + GuardrailInterval$outboundSchema, +} from "./guardrailinterval.js"; + +export type CreateGuardrailRequest = { + /** + * Array of model identifiers (slug or canonical_slug accepted) + */ + allowedModels?: Array | null | undefined; + /** + * List of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * Description of the guardrail + */ + description?: string | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * Spending limit in USD + */ + limitUsd?: number | undefined; + /** + * Name for the new guardrail + */ + name: string; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; +}; + +/** @internal */ +export type CreateGuardrailRequest$Outbound = { + allowed_models?: Array | null | undefined; + allowed_providers?: Array | null | undefined; + description?: string | null | undefined; + enforce_zdr?: boolean | null | undefined; + ignored_providers?: Array | null | undefined; + limit_usd?: number | undefined; + name: string; + reset_interval?: string | null | undefined; +}; + +/** @internal */ +export const CreateGuardrailRequest$outboundSchema: z.ZodType< + CreateGuardrailRequest$Outbound, + CreateGuardrailRequest +> = z.object({ + allowedModels: z.nullable(z.array(z.string())).optional(), + allowedProviders: z.nullable(z.array(z.string())).optional(), + description: z.nullable(z.string()).optional(), + enforceZdr: z.nullable(z.boolean()).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), + limitUsd: z.number().optional(), + name: z.string(), + resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + allowedProviders: "allowed_providers", + enforceZdr: "enforce_zdr", + ignoredProviders: "ignored_providers", + limitUsd: "limit_usd", + resetInterval: "reset_interval", + }); +}); + +export function createGuardrailRequestToJSON( + createGuardrailRequest: CreateGuardrailRequest, +): string { + return JSON.stringify( + CreateGuardrailRequest$outboundSchema.parse(createGuardrailRequest), + ); +} diff --git a/src/models/createguardrailresponse.ts b/src/models/createguardrailresponse.ts new file mode 100644 index 00000000..2329ce81 --- /dev/null +++ b/src/models/createguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f0b6f29656b5 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type CreateGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const CreateGuardrailResponse$inboundSchema: z.ZodType< + CreateGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function createGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/customtool.ts b/src/models/customtool.ts index c9dc3b4f..4733251a 100644 --- a/src/models/customtool.ts +++ b/src/models/customtool.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; @@ -17,25 +19,32 @@ export const Syntax = { export type Syntax = OpenEnum; export type FormatGrammar = { - type: "grammar"; definition: string; syntax: Syntax; + type: "grammar"; }; export type FormatText = { type: "text"; }; -export type Format = FormatText | FormatGrammar; +export type Format = + | FormatText + | FormatGrammar + | discriminatedUnionTypes.Unknown<"type">; /** * Custom tool configuration */ export type CustomTool = { - type: "custom"; - name: string; description?: string | undefined; - format?: FormatText | FormatGrammar | undefined; + format?: + | FormatText + | FormatGrammar + | discriminatedUnionTypes.Unknown<"type"> + | undefined; + name: string; + type: "custom"; }; /** @internal */ @@ -48,15 +57,15 @@ export const Syntax$outboundSchema: z.ZodType = openEnums /** @internal */ export const FormatGrammar$inboundSchema: z.ZodType = z .object({ - type: z.literal("grammar"), definition: z.string(), syntax: Syntax$inboundSchema, + type: z.literal("grammar"), }); /** @internal */ export type FormatGrammar$Outbound = { - type: "grammar"; definition: string; syntax: string; + type: "grammar"; }; /** @internal */ @@ -64,9 +73,9 @@ export const FormatGrammar$outboundSchema: z.ZodType< FormatGrammar$Outbound, FormatGrammar > = z.object({ - type: z.literal("grammar"), definition: z.string(), syntax: Syntax$outboundSchema, + type: z.literal("grammar"), }); export function formatGrammarToJSON(formatGrammar: FormatGrammar): string { @@ -114,10 +123,11 @@ export function formatTextFromJSON( } /** @internal */ -export const Format$inboundSchema: z.ZodType = z.union([ - z.lazy(() => FormatText$inboundSchema), - z.lazy(() => FormatGrammar$inboundSchema), -]); +export const Format$inboundSchema: z.ZodType = + discriminatedUnion("type", { + text: z.lazy(() => FormatText$inboundSchema), + grammar: z.lazy(() => FormatGrammar$inboundSchema), + }); /** @internal */ export type Format$Outbound = FormatText$Outbound | FormatGrammar$Outbound; @@ -144,20 +154,20 @@ export function formatFromJSON( /** @internal */ export const CustomTool$inboundSchema: z.ZodType = z .object({ - type: z.literal("custom"), - name: z.string(), description: z.string().optional(), - format: z.union([ - z.lazy(() => FormatText$inboundSchema), - z.lazy(() => FormatGrammar$inboundSchema), - ]).optional(), + format: discriminatedUnion("type", { + text: z.lazy(() => FormatText$inboundSchema), + grammar: z.lazy(() => FormatGrammar$inboundSchema), + }).optional(), + name: z.string(), + type: z.literal("custom"), }); /** @internal */ export type CustomTool$Outbound = { - type: "custom"; - name: string; description?: string | undefined; format?: FormatText$Outbound | FormatGrammar$Outbound | undefined; + name: string; + type: "custom"; }; /** @internal */ @@ -165,13 +175,13 @@ export const CustomTool$outboundSchema: z.ZodType< CustomTool$Outbound, CustomTool > = z.object({ - type: z.literal("custom"), - name: z.string(), description: z.string().optional(), format: z.union([ z.lazy(() => FormatText$outboundSchema), z.lazy(() => FormatGrammar$outboundSchema), ]).optional(), + name: z.string(), + type: z.literal("custom"), }); export function customToolToJSON(customTool: CustomTool): string { diff --git a/src/models/datacollection.ts b/src/models/datacollection.ts deleted file mode 100644 index e075ba95..00000000 --- a/src/models/datacollection.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: fa417e9ad79a - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -/** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - 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. - */ -export const DataCollection = { - Deny: "deny", - Allow: "allow", -} as const; -/** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - 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. - */ -export type DataCollection = OpenEnum; - -/** @internal */ -export const DataCollection$outboundSchema: z.ZodType = - openEnums.outboundSchema(DataCollection); diff --git a/src/models/datetimeservertool.ts b/src/models/datetimeservertool.ts index 042c1388..cb2f4c61 100644 --- a/src/models/datetimeservertool.ts +++ b/src/models/datetimeservertool.ts @@ -5,25 +5,26 @@ import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; +import { + DatetimeServerToolConfig, + DatetimeServerToolConfig$Outbound, + DatetimeServerToolConfig$outboundSchema, +} from "./datetimeservertoolconfig.js"; export const DatetimeServerToolType = { OpenrouterDatetime: "openrouter:datetime", } as const; export type DatetimeServerToolType = ClosedEnum; -export type DatetimeServerToolParameters = { - /** - * IANA timezone name (e.g. "America/New_York"). Defaults to UTC. - */ - timezone?: string | undefined; -}; - /** * OpenRouter built-in server tool: returns the current date and time */ export type DatetimeServerTool = { + /** + * Configuration for the openrouter:datetime server tool + */ + parameters?: DatetimeServerToolConfig | undefined; type: DatetimeServerToolType; - parameters?: DatetimeServerToolParameters | undefined; }; /** @internal */ @@ -31,33 +32,10 @@ export const DatetimeServerToolType$outboundSchema: z.ZodEnum< typeof DatetimeServerToolType > = z.enum(DatetimeServerToolType); -/** @internal */ -export type DatetimeServerToolParameters$Outbound = { - timezone?: string | undefined; -}; - -/** @internal */ -export const DatetimeServerToolParameters$outboundSchema: z.ZodType< - DatetimeServerToolParameters$Outbound, - DatetimeServerToolParameters -> = z.object({ - timezone: z.string().optional(), -}); - -export function datetimeServerToolParametersToJSON( - datetimeServerToolParameters: DatetimeServerToolParameters, -): string { - return JSON.stringify( - DatetimeServerToolParameters$outboundSchema.parse( - datetimeServerToolParameters, - ), - ); -} - /** @internal */ export type DatetimeServerTool$Outbound = { + parameters?: DatetimeServerToolConfig$Outbound | undefined; type: string; - parameters?: DatetimeServerToolParameters$Outbound | undefined; }; /** @internal */ @@ -65,9 +43,8 @@ export const DatetimeServerTool$outboundSchema: z.ZodType< DatetimeServerTool$Outbound, DatetimeServerTool > = z.object({ + parameters: DatetimeServerToolConfig$outboundSchema.optional(), type: DatetimeServerToolType$outboundSchema, - parameters: z.lazy(() => DatetimeServerToolParameters$outboundSchema) - .optional(), }); export function datetimeServerToolToJSON( diff --git a/src/models/datetimeservertoolconfig.ts b/src/models/datetimeservertoolconfig.ts new file mode 100644 index 00000000..058ae695 --- /dev/null +++ b/src/models/datetimeservertoolconfig.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e0faf7e437d1 + */ + +import * as z from "zod/v4"; + +/** + * Configuration for the openrouter:datetime server tool + */ +export type DatetimeServerToolConfig = { + /** + * IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + */ + timezone?: string | undefined; +}; + +/** @internal */ +export type DatetimeServerToolConfig$Outbound = { + timezone?: string | undefined; +}; + +/** @internal */ +export const DatetimeServerToolConfig$outboundSchema: z.ZodType< + DatetimeServerToolConfig$Outbound, + DatetimeServerToolConfig +> = z.object({ + timezone: z.string().optional(), +}); + +export function datetimeServerToolConfigToJSON( + datetimeServerToolConfig: DatetimeServerToolConfig, +): string { + return JSON.stringify( + DatetimeServerToolConfig$outboundSchema.parse(datetimeServerToolConfig), + ); +} diff --git a/src/models/defaultparameters.ts b/src/models/defaultparameters.ts index b2603a4d..46dd6cc5 100644 --- a/src/models/defaultparameters.ts +++ b/src/models/defaultparameters.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Default parameters for this model */ export type DefaultParameters = { - temperature?: number | null | undefined; - topP?: number | null | undefined; + frequencyPenalty?: number | undefined; + presencePenalty?: number | undefined; + repetitionPenalty?: number | undefined; + temperature?: number | undefined; topK?: number | null | undefined; - frequencyPenalty?: number | null | undefined; - presencePenalty?: number | null | undefined; - repetitionPenalty?: number | null | undefined; + topP?: number | undefined; }; /** @internal */ @@ -26,19 +26,19 @@ export const DefaultParameters$inboundSchema: z.ZodType< DefaultParameters, unknown > = z.object({ - temperature: z.nullable(z.number()).optional(), - top_p: z.nullable(z.number()).optional(), + frequency_penalty: z.number().optional(), + presence_penalty: z.number().optional(), + repetition_penalty: z.number().optional(), + temperature: z.number().optional(), top_k: z.nullable(z.int()).optional(), - frequency_penalty: z.nullable(z.number()).optional(), - presence_penalty: z.nullable(z.number()).optional(), - repetition_penalty: z.nullable(z.number()).optional(), + top_p: z.number().optional(), }).transform((v) => { return remap$(v, { - "top_p": "topP", - "top_k": "topK", "frequency_penalty": "frequencyPenalty", "presence_penalty": "presencePenalty", "repetition_penalty": "repetitionPenalty", + "top_k": "topK", + "top_p": "topP", }); }); diff --git a/src/models/deleteguardrailresponse.ts b/src/models/deleteguardrailresponse.ts new file mode 100644 index 00000000..943415e3 --- /dev/null +++ b/src/models/deleteguardrailresponse.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1369f013fe1a + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DeleteGuardrailResponse = { + /** + * Confirmation that the guardrail was deleted + */ + deleted: true; +}; + +/** @internal */ +export const DeleteGuardrailResponse$inboundSchema: z.ZodType< + DeleteGuardrailResponse, + unknown +> = z.object({ + deleted: z.literal(true), +}); + +export function deleteGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/easyinputmessage.ts b/src/models/easyinputmessage.ts index ca1d8315..fdad30af 100644 --- a/src/models/easyinputmessage.ts +++ b/src/models/easyinputmessage.ts @@ -28,47 +28,6 @@ import { InputVideo$outboundSchema, } from "./inputvideo.js"; -export const EasyInputMessageTypeMessage = { - Message: "message", -} as const; -export type EasyInputMessageTypeMessage = ClosedEnum< - typeof EasyInputMessageTypeMessage ->; - -export const EasyInputMessageRoleDeveloper = { - Developer: "developer", -} as const; -export type EasyInputMessageRoleDeveloper = ClosedEnum< - typeof EasyInputMessageRoleDeveloper ->; - -export const EasyInputMessageRoleAssistant = { - Assistant: "assistant", -} as const; -export type EasyInputMessageRoleAssistant = ClosedEnum< - typeof EasyInputMessageRoleAssistant ->; - -export const EasyInputMessageRoleSystem = { - System: "system", -} as const; -export type EasyInputMessageRoleSystem = ClosedEnum< - typeof EasyInputMessageRoleSystem ->; - -export const EasyInputMessageRoleUser = { - User: "user", -} as const; -export type EasyInputMessageRoleUser = ClosedEnum< - typeof EasyInputMessageRoleUser ->; - -export type EasyInputMessageRoleUnion = - | EasyInputMessageRoleUser - | EasyInputMessageRoleSystem - | EasyInputMessageRoleAssistant - | EasyInputMessageRoleDeveloper; - export const EasyInputMessageDetail = { Auto: "auto", High: "high", @@ -80,9 +39,9 @@ export type EasyInputMessageDetail = OpenEnum; * Image input content item */ export type EasyInputMessageContentInputImage = { - type: "input_image"; detail: EasyInputMessageDetail; imageUrl?: string | null | undefined; + type: "input_image"; }; export type EasyInputMessageContentUnion1 = @@ -125,13 +84,48 @@ export type EasyInputMessagePhaseUnion = | EasyInputMessagePhaseFinalAnswer | any; +export const EasyInputMessageRoleDeveloper = { + Developer: "developer", +} as const; +export type EasyInputMessageRoleDeveloper = ClosedEnum< + typeof EasyInputMessageRoleDeveloper +>; + +export const EasyInputMessageRoleAssistant = { + Assistant: "assistant", +} as const; +export type EasyInputMessageRoleAssistant = ClosedEnum< + typeof EasyInputMessageRoleAssistant +>; + +export const EasyInputMessageRoleSystem = { + System: "system", +} as const; +export type EasyInputMessageRoleSystem = ClosedEnum< + typeof EasyInputMessageRoleSystem +>; + +export const EasyInputMessageRoleUser = { + User: "user", +} as const; +export type EasyInputMessageRoleUser = ClosedEnum< + typeof EasyInputMessageRoleUser +>; + +export type EasyInputMessageRoleUnion = + | EasyInputMessageRoleUser + | EasyInputMessageRoleSystem + | EasyInputMessageRoleAssistant + | EasyInputMessageRoleDeveloper; + +export const EasyInputMessageTypeMessage = { + Message: "message", +} as const; +export type EasyInputMessageTypeMessage = ClosedEnum< + typeof EasyInputMessageTypeMessage +>; + export type EasyInputMessage = { - type?: EasyInputMessageTypeMessage | undefined; - role: - | EasyInputMessageRoleUser - | EasyInputMessageRoleSystem - | EasyInputMessageRoleAssistant - | EasyInputMessageRoleDeveloper; content?: | Array< | InputText @@ -153,59 +147,14 @@ export type EasyInputMessage = { | any | null | undefined; + role: + | EasyInputMessageRoleUser + | EasyInputMessageRoleSystem + | EasyInputMessageRoleAssistant + | EasyInputMessageRoleDeveloper; + type?: EasyInputMessageTypeMessage | undefined; }; -/** @internal */ -export const EasyInputMessageTypeMessage$outboundSchema: z.ZodEnum< - typeof EasyInputMessageTypeMessage -> = z.enum(EasyInputMessageTypeMessage); - -/** @internal */ -export const EasyInputMessageRoleDeveloper$outboundSchema: z.ZodEnum< - typeof EasyInputMessageRoleDeveloper -> = z.enum(EasyInputMessageRoleDeveloper); - -/** @internal */ -export const EasyInputMessageRoleAssistant$outboundSchema: z.ZodEnum< - typeof EasyInputMessageRoleAssistant -> = z.enum(EasyInputMessageRoleAssistant); - -/** @internal */ -export const EasyInputMessageRoleSystem$outboundSchema: z.ZodEnum< - typeof EasyInputMessageRoleSystem -> = z.enum(EasyInputMessageRoleSystem); - -/** @internal */ -export const EasyInputMessageRoleUser$outboundSchema: z.ZodEnum< - typeof EasyInputMessageRoleUser -> = z.enum(EasyInputMessageRoleUser); - -/** @internal */ -export type EasyInputMessageRoleUnion$Outbound = - | string - | string - | string - | string; - -/** @internal */ -export const EasyInputMessageRoleUnion$outboundSchema: z.ZodType< - EasyInputMessageRoleUnion$Outbound, - EasyInputMessageRoleUnion -> = z.union([ - EasyInputMessageRoleUser$outboundSchema, - EasyInputMessageRoleSystem$outboundSchema, - EasyInputMessageRoleAssistant$outboundSchema, - EasyInputMessageRoleDeveloper$outboundSchema, -]); - -export function easyInputMessageRoleUnionToJSON( - easyInputMessageRoleUnion: EasyInputMessageRoleUnion, -): string { - return JSON.stringify( - EasyInputMessageRoleUnion$outboundSchema.parse(easyInputMessageRoleUnion), - ); -} - /** @internal */ export const EasyInputMessageDetail$outboundSchema: z.ZodType< string, @@ -214,9 +163,9 @@ export const EasyInputMessageDetail$outboundSchema: z.ZodType< /** @internal */ export type EasyInputMessageContentInputImage$Outbound = { - type: "input_image"; detail: string; image_url?: string | null | undefined; + type: "input_image"; }; /** @internal */ @@ -224,9 +173,9 @@ export const EasyInputMessageContentInputImage$outboundSchema: z.ZodType< EasyInputMessageContentInputImage$Outbound, EasyInputMessageContentInputImage > = z.object({ - type: z.literal("input_image"), detail: EasyInputMessageDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), + type: z.literal("input_image"), }).transform((v) => { return remap$(v, { imageUrl: "image_url", @@ -342,10 +291,59 @@ export function easyInputMessagePhaseUnionToJSON( ); } +/** @internal */ +export const EasyInputMessageRoleDeveloper$outboundSchema: z.ZodEnum< + typeof EasyInputMessageRoleDeveloper +> = z.enum(EasyInputMessageRoleDeveloper); + +/** @internal */ +export const EasyInputMessageRoleAssistant$outboundSchema: z.ZodEnum< + typeof EasyInputMessageRoleAssistant +> = z.enum(EasyInputMessageRoleAssistant); + +/** @internal */ +export const EasyInputMessageRoleSystem$outboundSchema: z.ZodEnum< + typeof EasyInputMessageRoleSystem +> = z.enum(EasyInputMessageRoleSystem); + +/** @internal */ +export const EasyInputMessageRoleUser$outboundSchema: z.ZodEnum< + typeof EasyInputMessageRoleUser +> = z.enum(EasyInputMessageRoleUser); + +/** @internal */ +export type EasyInputMessageRoleUnion$Outbound = + | string + | string + | string + | string; + +/** @internal */ +export const EasyInputMessageRoleUnion$outboundSchema: z.ZodType< + EasyInputMessageRoleUnion$Outbound, + EasyInputMessageRoleUnion +> = z.union([ + EasyInputMessageRoleUser$outboundSchema, + EasyInputMessageRoleSystem$outboundSchema, + EasyInputMessageRoleAssistant$outboundSchema, + EasyInputMessageRoleDeveloper$outboundSchema, +]); + +export function easyInputMessageRoleUnionToJSON( + easyInputMessageRoleUnion: EasyInputMessageRoleUnion, +): string { + return JSON.stringify( + EasyInputMessageRoleUnion$outboundSchema.parse(easyInputMessageRoleUnion), + ); +} + +/** @internal */ +export const EasyInputMessageTypeMessage$outboundSchema: z.ZodEnum< + typeof EasyInputMessageTypeMessage +> = z.enum(EasyInputMessageTypeMessage); + /** @internal */ export type EasyInputMessage$Outbound = { - type?: string | undefined; - role: string | string | string | string; content?: | Array< | InputText$Outbound @@ -359,6 +357,8 @@ export type EasyInputMessage$Outbound = { | null | undefined; phase?: string | string | any | null | undefined; + role: string | string | string | string; + type?: string | undefined; }; /** @internal */ @@ -366,13 +366,6 @@ export const EasyInputMessage$outboundSchema: z.ZodType< EasyInputMessage$Outbound, EasyInputMessage > = z.object({ - type: EasyInputMessageTypeMessage$outboundSchema.optional(), - role: z.union([ - EasyInputMessageRoleUser$outboundSchema, - EasyInputMessageRoleSystem$outboundSchema, - EasyInputMessageRoleAssistant$outboundSchema, - EasyInputMessageRoleDeveloper$outboundSchema, - ]), content: z.nullable( z.union([ z.array(z.union([ @@ -393,6 +386,13 @@ export const EasyInputMessage$outboundSchema: z.ZodType< z.any(), ]), ).optional(), + role: z.union([ + EasyInputMessageRoleUser$outboundSchema, + EasyInputMessageRoleSystem$outboundSchema, + EasyInputMessageRoleAssistant$outboundSchema, + EasyInputMessageRoleDeveloper$outboundSchema, + ]), + type: EasyInputMessageTypeMessage$outboundSchema.optional(), }); export function easyInputMessageToJSON( diff --git a/src/models/errorevent.ts b/src/models/errorevent.ts index 13b3a6a9..24ba741f 100644 --- a/src/models/errorevent.ts +++ b/src/models/errorevent.ts @@ -13,21 +13,21 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when an error occurs during streaming */ export type ErrorEvent = { - type: "error"; code: string | null; message: string; param: string | null; sequenceNumber: number; + type: "error"; }; /** @internal */ export const ErrorEvent$inboundSchema: z.ZodType = z .object({ - type: z.literal("error"), code: z.nullable(z.string()), message: z.string(), param: z.nullable(z.string()), - sequence_number: z.number(), + sequence_number: z.int(), + type: z.literal("error"), }).transform((v) => { return remap$(v, { "sequence_number": "sequenceNumber", diff --git a/src/models/filecitation.ts b/src/models/filecitation.ts index 665445c5..147db219 100644 --- a/src/models/filecitation.ts +++ b/src/models/filecitation.ts @@ -10,19 +10,19 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type FileCitation = { - type: "file_citation"; fileId: string; filename: string; index: number; + type: "file_citation"; }; /** @internal */ export const FileCitation$inboundSchema: z.ZodType = z .object({ - type: z.literal("file_citation"), file_id: z.string(), filename: z.string(), - index: z.number(), + index: z.int(), + type: z.literal("file_citation"), }).transform((v) => { return remap$(v, { "file_id": "fileId", @@ -30,10 +30,10 @@ export const FileCitation$inboundSchema: z.ZodType = z }); /** @internal */ export type FileCitation$Outbound = { - type: "file_citation"; file_id: string; filename: string; index: number; + type: "file_citation"; }; /** @internal */ @@ -41,10 +41,10 @@ export const FileCitation$outboundSchema: z.ZodType< FileCitation$Outbound, FileCitation > = z.object({ - type: z.literal("file_citation"), fileId: z.string(), filename: z.string(), - index: z.number(), + index: z.int(), + type: z.literal("file_citation"), }).transform((v) => { return remap$(v, { fileId: "file_id", diff --git a/src/models/fileparserplugin.ts b/src/models/fileparserplugin.ts new file mode 100644 index 00000000..6a0d5f3d --- /dev/null +++ b/src/models/fileparserplugin.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 04e61b333ea7 + */ + +import * as z from "zod/v4"; +import { + PDFParserOptions, + PDFParserOptions$Outbound, + PDFParserOptions$outboundSchema, +} from "./pdfparseroptions.js"; + +export type FileParserPlugin = { + /** + * Set to false to disable the file-parser plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + id: "file-parser"; + /** + * Options for PDF parsing. + */ + pdf?: PDFParserOptions | undefined; +}; + +/** @internal */ +export type FileParserPlugin$Outbound = { + enabled?: boolean | undefined; + id: "file-parser"; + pdf?: PDFParserOptions$Outbound | undefined; +}; + +/** @internal */ +export const FileParserPlugin$outboundSchema: z.ZodType< + FileParserPlugin$Outbound, + FileParserPlugin +> = z.object({ + enabled: z.boolean().optional(), + id: z.literal("file-parser"), + pdf: PDFParserOptions$outboundSchema.optional(), +}); + +export function fileParserPluginToJSON( + fileParserPlugin: FileParserPlugin, +): string { + return JSON.stringify( + FileParserPlugin$outboundSchema.parse(fileParserPlugin), + ); +} diff --git a/src/models/filepath.ts b/src/models/filepath.ts index 90ff601b..119405e3 100644 --- a/src/models/filepath.ts +++ b/src/models/filepath.ts @@ -10,16 +10,16 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type FilePath = { - type: "file_path"; fileId: string; index: number; + type: "file_path"; }; /** @internal */ export const FilePath$inboundSchema: z.ZodType = z.object({ - type: z.literal("file_path"), file_id: z.string(), - index: z.number(), + index: z.int(), + type: z.literal("file_path"), }).transform((v) => { return remap$(v, { "file_id": "fileId", @@ -27,17 +27,17 @@ export const FilePath$inboundSchema: z.ZodType = z.object({ }); /** @internal */ export type FilePath$Outbound = { - type: "file_path"; file_id: string; index: number; + type: "file_path"; }; /** @internal */ export const FilePath$outboundSchema: z.ZodType = z .object({ - type: z.literal("file_path"), fileId: z.string(), - index: z.number(), + index: z.int(), + type: z.literal("file_path"), }).transform((v) => { return remap$(v, { fileId: "file_id", diff --git a/src/models/filesearchservertool.ts b/src/models/filesearchservertool.ts index 885c0437..8c553603 100644 --- a/src/models/filesearchservertool.ts +++ b/src/models/filesearchservertool.ts @@ -31,13 +31,13 @@ export type Value1 = string | number; export type Value2 = string | number | boolean | Array; -export type FileSearchServerToolFilters = { +export type Filters = { key: string; type: FiltersType; value: string | number | boolean | Array; }; -export type Filters = FileSearchServerToolFilters | CompoundFilter | any; +export type FiltersUnion = Filters | CompoundFilter | any; export const Ranker = { Auto: "auto", @@ -54,16 +54,11 @@ export type RankingOptions = { * File search tool configuration */ export type FileSearchServerTool = { - type: "file_search"; - vectorStoreIds: Array; - filters?: - | FileSearchServerToolFilters - | CompoundFilter - | any - | null - | undefined; + filters?: Filters | CompoundFilter | any | null | undefined; maxNumResults?: number | undefined; rankingOptions?: RankingOptions | undefined; + type: "file_search"; + vectorStoreIds: Array; }; /** @internal */ @@ -135,10 +130,7 @@ export function value2FromJSON( } /** @internal */ -export const FileSearchServerToolFilters$inboundSchema: z.ZodType< - FileSearchServerToolFilters, - unknown -> = z.object({ +export const Filters$inboundSchema: z.ZodType = z.object({ key: z.string(), type: FiltersType$inboundSchema, value: z.union([ @@ -149,76 +141,71 @@ export const FileSearchServerToolFilters$inboundSchema: z.ZodType< ]), }); /** @internal */ -export type FileSearchServerToolFilters$Outbound = { +export type Filters$Outbound = { key: string; type: string; value: string | number | boolean | Array; }; /** @internal */ -export const FileSearchServerToolFilters$outboundSchema: z.ZodType< - FileSearchServerToolFilters$Outbound, - FileSearchServerToolFilters -> = z.object({ - key: z.string(), - type: FiltersType$outboundSchema, - value: z.union([ - z.string(), - z.number(), - z.boolean(), - z.array(z.union([z.string(), z.number()])), - ]), -}); +export const Filters$outboundSchema: z.ZodType = z + .object({ + key: z.string(), + type: FiltersType$outboundSchema, + value: z.union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), + ]), + }); -export function fileSearchServerToolFiltersToJSON( - fileSearchServerToolFilters: FileSearchServerToolFilters, -): string { - return JSON.stringify( - FileSearchServerToolFilters$outboundSchema.parse( - fileSearchServerToolFilters, - ), - ); +export function filtersToJSON(filters: Filters): string { + return JSON.stringify(Filters$outboundSchema.parse(filters)); } -export function fileSearchServerToolFiltersFromJSON( +export function filtersFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => FileSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'FileSearchServerToolFilters' from JSON`, + (x) => Filters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Filters' from JSON`, ); } /** @internal */ -export const Filters$inboundSchema: z.ZodType = z.union([ - z.lazy(() => FileSearchServerToolFilters$inboundSchema), - CompoundFilter$inboundSchema, - z.any(), -]); +export const FiltersUnion$inboundSchema: z.ZodType = z + .union([ + z.lazy(() => Filters$inboundSchema), + CompoundFilter$inboundSchema, + z.any(), + ]); /** @internal */ -export type Filters$Outbound = - | FileSearchServerToolFilters$Outbound +export type FiltersUnion$Outbound = + | Filters$Outbound | CompoundFilter$Outbound | any; /** @internal */ -export const Filters$outboundSchema: z.ZodType = z - .union([ - z.lazy(() => FileSearchServerToolFilters$outboundSchema), - CompoundFilter$outboundSchema, - z.any(), - ]); +export const FiltersUnion$outboundSchema: z.ZodType< + FiltersUnion$Outbound, + FiltersUnion +> = z.union([ + z.lazy(() => Filters$outboundSchema), + CompoundFilter$outboundSchema, + z.any(), +]); -export function filtersToJSON(filters: Filters): string { - return JSON.stringify(Filters$outboundSchema.parse(filters)); +export function filtersUnionToJSON(filtersUnion: FiltersUnion): string { + return JSON.stringify(FiltersUnion$outboundSchema.parse(filtersUnion)); } -export function filtersFromJSON( +export function filtersUnionFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Filters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Filters' from JSON`, + (x) => FiltersUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FiltersUnion' from JSON`, ); } @@ -276,36 +263,31 @@ export const FileSearchServerTool$inboundSchema: z.ZodType< FileSearchServerTool, unknown > = z.object({ - type: z.literal("file_search"), - vector_store_ids: z.array(z.string()), filters: z.nullable( z.union([ - z.lazy(() => FileSearchServerToolFilters$inboundSchema), + z.lazy(() => Filters$inboundSchema), CompoundFilter$inboundSchema, z.any(), ]), ).optional(), max_num_results: z.int().optional(), ranking_options: z.lazy(() => RankingOptions$inboundSchema).optional(), + type: z.literal("file_search"), + vector_store_ids: z.array(z.string()), }).transform((v) => { return remap$(v, { - "vector_store_ids": "vectorStoreIds", "max_num_results": "maxNumResults", "ranking_options": "rankingOptions", + "vector_store_ids": "vectorStoreIds", }); }); /** @internal */ export type FileSearchServerTool$Outbound = { - type: "file_search"; - vector_store_ids: Array; - filters?: - | FileSearchServerToolFilters$Outbound - | CompoundFilter$Outbound - | any - | null - | undefined; + filters?: Filters$Outbound | CompoundFilter$Outbound | any | null | undefined; max_num_results?: number | undefined; ranking_options?: RankingOptions$Outbound | undefined; + type: "file_search"; + vector_store_ids: Array; }; /** @internal */ @@ -313,22 +295,22 @@ export const FileSearchServerTool$outboundSchema: z.ZodType< FileSearchServerTool$Outbound, FileSearchServerTool > = z.object({ - type: z.literal("file_search"), - vectorStoreIds: z.array(z.string()), filters: z.nullable( z.union([ - z.lazy(() => FileSearchServerToolFilters$outboundSchema), + z.lazy(() => Filters$outboundSchema), CompoundFilter$outboundSchema, z.any(), ]), ).optional(), maxNumResults: z.int().optional(), rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(), + type: z.literal("file_search"), + vectorStoreIds: z.array(z.string()), }).transform((v) => { return remap$(v, { - vectorStoreIds: "vector_store_ids", maxNumResults: "max_num_results", rankingOptions: "ranking_options", + vectorStoreIds: "vector_store_ids", }); }); diff --git a/src/models/formatjsonschemaconfig.ts b/src/models/formatjsonschemaconfig.ts index d45eb5a6..3a7a06a1 100644 --- a/src/models/formatjsonschemaconfig.ts +++ b/src/models/formatjsonschemaconfig.ts @@ -12,11 +12,11 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * JSON schema constrained response format */ export type FormatJsonSchemaConfig = { - type: "json_schema"; - name: string; description?: string | undefined; - strict?: boolean | null | undefined; + name: string; schema: { [k: string]: any | null }; + strict?: boolean | null | undefined; + type: "json_schema"; }; /** @internal */ @@ -24,19 +24,19 @@ export const FormatJsonSchemaConfig$inboundSchema: z.ZodType< FormatJsonSchemaConfig, unknown > = z.object({ - type: z.literal("json_schema"), - name: z.string(), description: z.string().optional(), - strict: z.nullable(z.boolean()).optional(), + name: z.string(), schema: z.record(z.string(), z.nullable(z.any())), + strict: z.nullable(z.boolean()).optional(), + type: z.literal("json_schema"), }); /** @internal */ export type FormatJsonSchemaConfig$Outbound = { - type: "json_schema"; - name: string; description?: string | undefined; - strict?: boolean | null | undefined; + name: string; schema: { [k: string]: any | null }; + strict?: boolean | null | undefined; + type: "json_schema"; }; /** @internal */ @@ -44,11 +44,11 @@ export const FormatJsonSchemaConfig$outboundSchema: z.ZodType< FormatJsonSchemaConfig$Outbound, FormatJsonSchemaConfig > = z.object({ - type: z.literal("json_schema"), - name: z.string(), description: z.string().optional(), - strict: z.nullable(z.boolean()).optional(), + name: z.string(), schema: z.record(z.string(), z.nullable(z.any())), + strict: z.nullable(z.boolean()).optional(), + type: z.literal("json_schema"), }); export function formatJsonSchemaConfigToJSON( diff --git a/src/models/formats.ts b/src/models/formats.ts index 3dbb1905..7f9ca8e7 100644 --- a/src/models/formats.ts +++ b/src/models/formats.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -32,14 +34,16 @@ import { export type Formats = | FormatTextConfig | FormatJsonObjectConfig - | FormatJsonSchemaConfig; + | FormatJsonSchemaConfig + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ -export const Formats$inboundSchema: z.ZodType = z.union([ - FormatTextConfig$inboundSchema, - FormatJsonObjectConfig$inboundSchema, - FormatJsonSchemaConfig$inboundSchema, -]); +export const Formats$inboundSchema: z.ZodType = + discriminatedUnion("type", { + text: FormatTextConfig$inboundSchema, + json_object: FormatJsonObjectConfig$inboundSchema, + json_schema: FormatJsonSchemaConfig$inboundSchema, + }); /** @internal */ export type Formats$Outbound = | FormatTextConfig$Outbound diff --git a/src/models/frameimage.ts b/src/models/frameimage.ts new file mode 100644 index 00000000..a6ca7877 --- /dev/null +++ b/src/models/frameimage.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 97fccf1b68ca + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; + +export type FrameImageImageUrl = { + url: string; +}; + +export const FrameImageType = { + ImageUrl: "image_url", +} as const; +export type FrameImageType = ClosedEnum; + +/** + * Whether this image represents the first or last frame of the video + */ +export const FrameType = { + FirstFrame: "first_frame", + LastFrame: "last_frame", +} as const; +/** + * Whether this image represents the first or last frame of the video + */ +export type FrameType = OpenEnum; + +export type FrameImage = { + imageUrl: FrameImageImageUrl; + type: FrameImageType; + /** + * Whether this image represents the first or last frame of the video + */ + frameType: FrameType; +}; + +/** @internal */ +export type FrameImageImageUrl$Outbound = { + url: string; +}; + +/** @internal */ +export const FrameImageImageUrl$outboundSchema: z.ZodType< + FrameImageImageUrl$Outbound, + FrameImageImageUrl +> = z.object({ + url: z.string(), +}); + +export function frameImageImageUrlToJSON( + frameImageImageUrl: FrameImageImageUrl, +): string { + return JSON.stringify( + FrameImageImageUrl$outboundSchema.parse(frameImageImageUrl), + ); +} + +/** @internal */ +export const FrameImageType$outboundSchema: z.ZodEnum = z + .enum(FrameImageType); + +/** @internal */ +export const FrameType$outboundSchema: z.ZodType = openEnums + .outboundSchema(FrameType); + +/** @internal */ +export type FrameImage$Outbound = { + image_url: FrameImageImageUrl$Outbound; + type: string; + frame_type: string; +}; + +/** @internal */ +export const FrameImage$outboundSchema: z.ZodType< + FrameImage$Outbound, + FrameImage +> = z.object({ + imageUrl: z.lazy(() => FrameImageImageUrl$outboundSchema), + type: FrameImageType$outboundSchema, + frameType: FrameType$outboundSchema, +}).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + frameType: "frame_type", + }); +}); + +export function frameImageToJSON(frameImage: FrameImage): string { + return JSON.stringify(FrameImage$outboundSchema.parse(frameImage)); +} diff --git a/src/models/functioncallargsdeltaevent.ts b/src/models/functioncallargsdeltaevent.ts index f170a417..77ea9d8e 100644 --- a/src/models/functioncallargsdeltaevent.ts +++ b/src/models/functioncallargsdeltaevent.ts @@ -13,11 +13,11 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when function call arguments are being streamed */ export type FunctionCallArgsDeltaEvent = { - type: "response.function_call_arguments.delta"; + delta: string; itemId: string; outputIndex: number; - delta: string; sequenceNumber: number; + type: "response.function_call_arguments.delta"; }; /** @internal */ @@ -25,11 +25,11 @@ export const FunctionCallArgsDeltaEvent$inboundSchema: z.ZodType< FunctionCallArgsDeltaEvent, unknown > = z.object({ - type: z.literal("response.function_call_arguments.delta"), - item_id: z.string(), - output_index: z.number(), delta: z.string(), - sequence_number: z.number(), + item_id: z.string(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.function_call_arguments.delta"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/functioncallargsdoneevent.ts b/src/models/functioncallargsdoneevent.ts index 6db82e3c..fa8a75b4 100644 --- a/src/models/functioncallargsdoneevent.ts +++ b/src/models/functioncallargsdoneevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when function call arguments streaming is complete */ export type FunctionCallArgsDoneEvent = { - type: "response.function_call_arguments.done"; + arguments: string; itemId: string; - outputIndex: number; name: string; - arguments: string; + outputIndex: number; sequenceNumber: number; + type: "response.function_call_arguments.done"; }; /** @internal */ @@ -26,12 +26,12 @@ export const FunctionCallArgsDoneEvent$inboundSchema: z.ZodType< FunctionCallArgsDoneEvent, unknown > = z.object({ - type: z.literal("response.function_call_arguments.done"), + arguments: z.string(), item_id: z.string(), - output_index: z.number(), name: z.string(), - arguments: z.string(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.function_call_arguments.done"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/functioncallitem.ts b/src/models/functioncallitem.ts index 95e4b01f..125fc786 100644 --- a/src/models/functioncallitem.ts +++ b/src/models/functioncallitem.ts @@ -7,9 +7,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { ClosedEnum } from "../types/enums.js"; import { - ToolCallStatusEnum, - ToolCallStatusEnum$outboundSchema, -} from "./toolcallstatusenum.js"; + ToolCallStatus, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; export const FunctionCallItemType = { FunctionCall: "function_call", @@ -20,12 +20,12 @@ export type FunctionCallItemType = ClosedEnum; * A function call initiated by the model */ export type FunctionCallItem = { - type: FunctionCallItemType; - callId: string; - name: string; arguments: string; + callId: string; id: string; - status?: ToolCallStatusEnum | null | undefined; + name: string; + status?: ToolCallStatus | undefined; + type: FunctionCallItemType; }; /** @internal */ @@ -35,12 +35,12 @@ export const FunctionCallItemType$outboundSchema: z.ZodEnum< /** @internal */ export type FunctionCallItem$Outbound = { - type: string; - call_id: string; - name: string; arguments: string; + call_id: string; id: string; - status?: string | null | undefined; + name: string; + status?: string | undefined; + type: string; }; /** @internal */ @@ -48,12 +48,12 @@ export const FunctionCallItem$outboundSchema: z.ZodType< FunctionCallItem$Outbound, FunctionCallItem > = z.object({ - type: FunctionCallItemType$outboundSchema, - callId: z.string(), - name: z.string(), arguments: z.string(), + callId: z.string(), id: z.string(), - status: z.nullable(ToolCallStatusEnum$outboundSchema).optional(), + name: z.string(), + status: ToolCallStatus$outboundSchema.optional(), + type: FunctionCallItemType$outboundSchema, }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/functioncalloutputitem.ts b/src/models/functioncalloutputitem.ts index 9507b1da..0dd5e3dc 100644 --- a/src/models/functioncalloutputitem.ts +++ b/src/models/functioncalloutputitem.ts @@ -17,17 +17,6 @@ import { InputText$Outbound, InputText$outboundSchema, } from "./inputtext.js"; -import { - ToolCallStatusEnum, - ToolCallStatusEnum$outboundSchema, -} from "./toolcallstatusenum.js"; - -export const FunctionCallOutputItemTypeFunctionCallOutput = { - FunctionCallOutput: "function_call_output", -} as const; -export type FunctionCallOutputItemTypeFunctionCallOutput = ClosedEnum< - typeof FunctionCallOutputItemTypeFunctionCallOutput ->; export const FunctionCallOutputItemDetail = { Auto: "auto", @@ -42,9 +31,9 @@ export type FunctionCallOutputItemDetail = OpenEnum< * Image input content item */ export type OutputInputImage = { - type: "input_image"; detail: FunctionCallOutputItemDetail; imageUrl?: string | null | undefined; + type: "input_image"; }; export type FunctionCallOutputItemOutputUnion1 = @@ -56,23 +45,33 @@ export type FunctionCallOutputItemOutputUnion2 = | string | Array; +export const FunctionCallOutputItemStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type FunctionCallOutputItemStatus = OpenEnum< + typeof FunctionCallOutputItemStatus +>; + +export const FunctionCallOutputItemTypeFunctionCallOutput = { + FunctionCallOutput: "function_call_output", +} as const; +export type FunctionCallOutputItemTypeFunctionCallOutput = ClosedEnum< + typeof FunctionCallOutputItemTypeFunctionCallOutput +>; + /** * The output from a function call execution */ export type FunctionCallOutputItem = { - type: FunctionCallOutputItemTypeFunctionCallOutput; - id?: string | null | undefined; callId: string; + id?: string | null | undefined; output: string | Array; - status?: ToolCallStatusEnum | null | undefined; + status?: FunctionCallOutputItemStatus | null | undefined; + type: FunctionCallOutputItemTypeFunctionCallOutput; }; -/** @internal */ -export const FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema: - z.ZodEnum = z.enum( - FunctionCallOutputItemTypeFunctionCallOutput, - ); - /** @internal */ export const FunctionCallOutputItemDetail$outboundSchema: z.ZodType< string, @@ -81,9 +80,9 @@ export const FunctionCallOutputItemDetail$outboundSchema: z.ZodType< /** @internal */ export type OutputInputImage$Outbound = { - type: "input_image"; detail: string; image_url?: string | null | undefined; + type: "input_image"; }; /** @internal */ @@ -91,9 +90,9 @@ export const OutputInputImage$outboundSchema: z.ZodType< OutputInputImage$Outbound, OutputInputImage > = z.object({ - type: z.literal("input_image"), detail: FunctionCallOutputItemDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), + type: z.literal("input_image"), }).transform((v) => { return remap$(v, { imageUrl: "image_url", @@ -162,17 +161,29 @@ export function functionCallOutputItemOutputUnion2ToJSON( ); } +/** @internal */ +export const FunctionCallOutputItemStatus$outboundSchema: z.ZodType< + string, + FunctionCallOutputItemStatus +> = openEnums.outboundSchema(FunctionCallOutputItemStatus); + +/** @internal */ +export const FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema: + z.ZodEnum = z.enum( + FunctionCallOutputItemTypeFunctionCallOutput, + ); + /** @internal */ export type FunctionCallOutputItem$Outbound = { - type: string; - id?: string | null | undefined; call_id: string; + id?: string | null | undefined; output: | string | Array< InputText$Outbound | OutputInputImage$Outbound | InputFile$Outbound >; status?: string | null | undefined; + type: string; }; /** @internal */ @@ -180,9 +191,8 @@ export const FunctionCallOutputItem$outboundSchema: z.ZodType< FunctionCallOutputItem$Outbound, FunctionCallOutputItem > = z.object({ - type: FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema, - id: z.nullable(z.string()).optional(), callId: z.string(), + id: z.nullable(z.string()).optional(), output: z.union([ z.string(), z.array(z.union([ @@ -191,7 +201,8 @@ export const FunctionCallOutputItem$outboundSchema: z.ZodType< InputFile$outboundSchema, ])), ]), - status: z.nullable(ToolCallStatusEnum$outboundSchema).optional(), + status: z.nullable(FunctionCallOutputItemStatus$outboundSchema).optional(), + type: FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema, }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/getguardrailresponse.ts b/src/models/getguardrailresponse.ts new file mode 100644 index 00000000..bf3d99d7 --- /dev/null +++ b/src/models/getguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3103b978871a + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type GetGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const GetGuardrailResponse$inboundSchema: z.ZodType< + GetGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function getGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/guardrail.ts b/src/models/guardrail.ts new file mode 100644 index 00000000..3cc5d9a3 --- /dev/null +++ b/src/models/guardrail.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 240a4b8d7a7d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + GuardrailInterval, + GuardrailInterval$inboundSchema, +} from "./guardrailinterval.js"; + +export type Guardrail = { + /** + * Array of model canonical_slugs (immutable identifiers) + */ + allowedModels?: Array | null | undefined; + /** + * List of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * ISO 8601 timestamp of when the guardrail was created + */ + createdAt: string; + /** + * Description of the guardrail + */ + description?: string | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; + /** + * Unique identifier for the guardrail + */ + id: string; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * Spending limit in USD + */ + limitUsd?: number | undefined; + /** + * Name of the guardrail + */ + name: string; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; + /** + * ISO 8601 timestamp of when the guardrail was last updated + */ + updatedAt?: string | null | undefined; +}; + +/** @internal */ +export const Guardrail$inboundSchema: z.ZodType = z.object({ + allowed_models: z.nullable(z.array(z.string())).optional(), + allowed_providers: z.nullable(z.array(z.string())).optional(), + created_at: z.string(), + description: z.nullable(z.string()).optional(), + enforce_zdr: z.nullable(z.boolean()).optional(), + id: z.string(), + ignored_providers: z.nullable(z.array(z.string())).optional(), + limit_usd: z.number().optional(), + name: z.string(), + reset_interval: z.nullable(GuardrailInterval$inboundSchema).optional(), + updated_at: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_models": "allowedModels", + "allowed_providers": "allowedProviders", + "created_at": "createdAt", + "enforce_zdr": "enforceZdr", + "ignored_providers": "ignoredProviders", + "limit_usd": "limitUsd", + "reset_interval": "resetInterval", + "updated_at": "updatedAt", + }); +}); + +export function guardrailFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Guardrail$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Guardrail' from JSON`, + ); +} diff --git a/src/models/guardrailinterval.ts b/src/models/guardrailinterval.ts new file mode 100644 index 00000000..381964d9 --- /dev/null +++ b/src/models/guardrailinterval.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a8a819c013c0 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Interval at which the limit resets (daily, weekly, monthly) + */ +export const GuardrailInterval = { + Daily: "daily", + Weekly: "weekly", + Monthly: "monthly", +} as const; +/** + * Interval at which the limit resets (daily, weekly, monthly) + */ +export type GuardrailInterval = OpenEnum; + +/** @internal */ +export const GuardrailInterval$inboundSchema: z.ZodType< + GuardrailInterval, + unknown +> = openEnums.inboundSchema(GuardrailInterval); +/** @internal */ +export const GuardrailInterval$outboundSchema: z.ZodType< + string, + GuardrailInterval +> = openEnums.outboundSchema(GuardrailInterval); diff --git a/src/models/imagegencallcompletedevent.ts b/src/models/imagegencallcompletedevent.ts index b581483d..c3a93a15 100644 --- a/src/models/imagegencallcompletedevent.ts +++ b/src/models/imagegencallcompletedevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Image generation call completed */ export type ImageGenCallCompletedEvent = { - type: "response.image_generation_call.completed"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.image_generation_call.completed"; }; /** @internal */ @@ -24,10 +24,10 @@ export const ImageGenCallCompletedEvent$inboundSchema: z.ZodType< ImageGenCallCompletedEvent, unknown > = z.object({ - type: z.literal("response.image_generation_call.completed"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.image_generation_call.completed"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallgeneratingevent.ts b/src/models/imagegencallgeneratingevent.ts index ae0ae8f4..b44d96c3 100644 --- a/src/models/imagegencallgeneratingevent.ts +++ b/src/models/imagegencallgeneratingevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Image generation call is generating */ export type ImageGenCallGeneratingEvent = { - type: "response.image_generation_call.generating"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.image_generation_call.generating"; }; /** @internal */ @@ -24,10 +24,10 @@ export const ImageGenCallGeneratingEvent$inboundSchema: z.ZodType< ImageGenCallGeneratingEvent, unknown > = z.object({ - type: z.literal("response.image_generation_call.generating"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.image_generation_call.generating"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallinprogressevent.ts b/src/models/imagegencallinprogressevent.ts index 78a23a98..9a39821a 100644 --- a/src/models/imagegencallinprogressevent.ts +++ b/src/models/imagegencallinprogressevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Image generation call in progress */ export type ImageGenCallInProgressEvent = { - type: "response.image_generation_call.in_progress"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.image_generation_call.in_progress"; }; /** @internal */ @@ -24,10 +24,10 @@ export const ImageGenCallInProgressEvent$inboundSchema: z.ZodType< ImageGenCallInProgressEvent, unknown > = z.object({ - type: z.literal("response.image_generation_call.in_progress"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.image_generation_call.in_progress"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/imagegencallpartialimageevent.ts b/src/models/imagegencallpartialimageevent.ts index 2fc2883c..b1924280 100644 --- a/src/models/imagegencallpartialimageevent.ts +++ b/src/models/imagegencallpartialimageevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Image generation call with partial image */ export type ImageGenCallPartialImageEvent = { - type: "response.image_generation_call.partial_image"; itemId: string; outputIndex: number; - sequenceNumber: number; partialImageB64: string; partialImageIndex: number; + sequenceNumber: number; + type: "response.image_generation_call.partial_image"; }; /** @internal */ @@ -26,19 +26,19 @@ export const ImageGenCallPartialImageEvent$inboundSchema: z.ZodType< ImageGenCallPartialImageEvent, unknown > = z.object({ - type: z.literal("response.image_generation_call.partial_image"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), partial_image_b64: z.string(), - partial_image_index: z.number(), + partial_image_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.image_generation_call.partial_image"), }).transform((v) => { return remap$(v, { "item_id": "itemId", "output_index": "outputIndex", - "sequence_number": "sequenceNumber", "partial_image_b64": "partialImageB64", "partial_image_index": "partialImageIndex", + "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/imagegenerationservertool.ts b/src/models/imagegenerationservertool.ts index a740f320..9f01df09 100644 --- a/src/models/imagegenerationservertool.ts +++ b/src/models/imagegenerationservertool.ts @@ -25,8 +25,8 @@ export const InputFidelity = { export type InputFidelity = OpenEnum; export type InputImageMask = { - imageUrl?: string | undefined; fileId?: string | undefined; + imageUrl?: string | undefined; }; export const ModelEnum = { @@ -68,7 +68,6 @@ export type Size = OpenEnum; * Image generation tool configuration */ export type ImageGenerationServerTool = { - type: "image_generation"; background?: Background | undefined; inputFidelity?: InputFidelity | null | undefined; inputImageMask?: InputImageMask | undefined; @@ -79,6 +78,7 @@ export type ImageGenerationServerTool = { partialImages?: number | undefined; quality?: Quality | undefined; size?: Size | undefined; + type: "image_generation"; }; /** @internal */ @@ -98,18 +98,18 @@ export const InputFidelity$outboundSchema: z.ZodType = /** @internal */ export const InputImageMask$inboundSchema: z.ZodType = z.object({ - image_url: z.string().optional(), file_id: z.string().optional(), + image_url: z.string().optional(), }).transform((v) => { return remap$(v, { - "image_url": "imageUrl", "file_id": "fileId", + "image_url": "imageUrl", }); }); /** @internal */ export type InputImageMask$Outbound = { - image_url?: string | undefined; file_id?: string | undefined; + image_url?: string | undefined; }; /** @internal */ @@ -117,12 +117,12 @@ export const InputImageMask$outboundSchema: z.ZodType< InputImageMask$Outbound, InputImageMask > = z.object({ - imageUrl: z.string().optional(), fileId: z.string().optional(), + imageUrl: z.string().optional(), }).transform((v) => { return remap$(v, { - imageUrl: "image_url", fileId: "file_id", + imageUrl: "image_url", }); }); @@ -179,17 +179,17 @@ export const ImageGenerationServerTool$inboundSchema: z.ZodType< ImageGenerationServerTool, unknown > = z.object({ - type: z.literal("image_generation"), background: Background$inboundSchema.optional(), input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(), input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(), model: ModelEnum$inboundSchema.optional(), moderation: Moderation$inboundSchema.optional(), - output_compression: z.number().optional(), + output_compression: z.int().optional(), output_format: OutputFormat$inboundSchema.optional(), - partial_images: z.number().optional(), + partial_images: z.int().optional(), quality: Quality$inboundSchema.optional(), size: Size$inboundSchema.optional(), + type: z.literal("image_generation"), }).transform((v) => { return remap$(v, { "input_fidelity": "inputFidelity", @@ -201,7 +201,6 @@ export const ImageGenerationServerTool$inboundSchema: z.ZodType< }); /** @internal */ export type ImageGenerationServerTool$Outbound = { - type: "image_generation"; background?: string | undefined; input_fidelity?: string | null | undefined; input_image_mask?: InputImageMask$Outbound | undefined; @@ -212,6 +211,7 @@ export type ImageGenerationServerTool$Outbound = { partial_images?: number | undefined; quality?: string | undefined; size?: string | undefined; + type: "image_generation"; }; /** @internal */ @@ -219,17 +219,17 @@ export const ImageGenerationServerTool$outboundSchema: z.ZodType< ImageGenerationServerTool$Outbound, ImageGenerationServerTool > = z.object({ - type: z.literal("image_generation"), background: Background$outboundSchema.optional(), inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(), inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(), model: ModelEnum$outboundSchema.optional(), moderation: Moderation$outboundSchema.optional(), - outputCompression: z.number().optional(), + outputCompression: z.int().optional(), outputFormat: OutputFormat$outboundSchema.optional(), - partialImages: z.number().optional(), + partialImages: z.int().optional(), quality: Quality$outboundSchema.optional(), size: Size$outboundSchema.optional(), + type: z.literal("image_generation"), }).transform((v) => { return remap$(v, { inputFidelity: "input_fidelity", diff --git a/src/models/index.ts b/src/models/index.ts index 393ef681..ac0c78a9 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -4,12 +4,24 @@ */ export * from "./activityitem.js"; +export * from "./activityresponse.js"; export * from "./annotationaddedevent.js"; +export * from "./anthropiccachecontroldirective.js"; +export * from "./anthropiccachecontrolttl.js"; export * from "./applypatchservertool.js"; +export * from "./autorouterplugin.js"; export * from "./badgatewayresponseerrordata.js"; export * from "./badrequestresponseerrordata.js"; export * from "./baseinputsunion.js"; export * from "./basereasoningconfig.js"; +export * from "./bulkassignkeysrequest.js"; +export * from "./bulkassignkeysresponse.js"; +export * from "./bulkassignmembersrequest.js"; +export * from "./bulkassignmembersresponse.js"; +export * from "./bulkunassignkeysrequest.js"; +export * from "./bulkunassignkeysresponse.js"; +export * from "./bulkunassignmembersrequest.js"; +export * from "./bulkunassignmembersresponse.js"; export * from "./chatassistantimages.js"; export * from "./chatassistantmessage.js"; export * from "./chataudiooutput.js"; @@ -49,7 +61,6 @@ export * from "./chattoolchoice.js"; export * from "./chattoolmessage.js"; export * from "./chatusage.js"; export * from "./chatusermessage.js"; -export * from "./chatwebsearchservertool.js"; export * from "./chatwebsearchshorthand.js"; export * from "./codeinterpreterservertool.js"; export * from "./codexlocalshelltool.js"; @@ -58,17 +69,22 @@ export * from "./computeruseservertool.js"; export * from "./conflictresponseerrordata.js"; export * from "./contentpartaddedevent.js"; export * from "./contentpartdoneevent.js"; +export * from "./contentpartimage.js"; export * from "./contextcompressionengine.js"; -export * from "./createchargerequest.js"; +export * from "./contextcompressionplugin.js"; +export * from "./createguardrailrequest.js"; +export * from "./createguardrailresponse.js"; export * from "./customtool.js"; -export * from "./datacollection.js"; export * from "./datetimeservertool.js"; +export * from "./datetimeservertoolconfig.js"; export * from "./defaultparameters.js"; +export * from "./deleteguardrailresponse.js"; export * from "./easyinputmessage.js"; export * from "./edgenetworktimeoutresponseerrordata.js"; export * from "./endpointstatus.js"; export * from "./errorevent.js"; export * from "./filecitation.js"; +export * from "./fileparserplugin.js"; export * from "./filepath.js"; export * from "./filesearchservertool.js"; export * from "./forbiddenresponseerrordata.js"; @@ -76,10 +92,14 @@ export * from "./formatjsonobjectconfig.js"; export * from "./formatjsonschemaconfig.js"; export * from "./formats.js"; export * from "./formattextconfig.js"; +export * from "./frameimage.js"; export * from "./functioncallargsdeltaevent.js"; export * from "./functioncallargsdoneevent.js"; export * from "./functioncallitem.js"; export * from "./functioncalloutputitem.js"; +export * from "./getguardrailresponse.js"; +export * from "./guardrail.js"; +export * from "./guardrailinterval.js"; export * from "./imagegencallcompletedevent.js"; export * from "./imagegencallgeneratingevent.js"; export * from "./imagegencallinprogressevent.js"; @@ -97,35 +117,61 @@ export * from "./inputtext.js"; export * from "./inputvideo.js"; export * from "./instructtype.js"; export * from "./internalserverresponseerrordata.js"; +export * from "./keyassignment.js"; export * from "./legacychatcontentvideo.js"; export * from "./legacywebsearchservertool.js"; export * from "./listendpointsresponse.js"; +export * from "./listguardrailsresponse.js"; +export * from "./listkeyassignmentsresponse.js"; +export * from "./listmemberassignmentsresponse.js"; export * from "./mcpservertool.js"; +export * from "./memberassignment.js"; export * from "./model.js"; export * from "./modelarchitecture.js"; export * from "./modelgroup.js"; +export * from "./modellinks.js"; export * from "./modelscountresponse.js"; export * from "./modelslistresponse.js"; +export * from "./moderationplugin.js"; export * from "./notfoundresponseerrordata.js"; +export * from "./openairesponsefunctiontoolcall.js"; +export * from "./openairesponsefunctiontoolcalloutput.js"; +export * from "./openairesponseinputmessageitem.js"; export * from "./openairesponsesannotation.js"; export * from "./openairesponsesrefusalcontent.js"; export * from "./openairesponsesresponsestatus.js"; export * from "./openairesponsestoolchoiceunion.js"; export * from "./openairesponsestruncation.js"; +export * from "./openresponsescreatedevent.js"; +export * from "./openresponsesinprogressevent.js"; export * from "./openresponsesresult.js"; +export * from "./openrouterwebsearchservertool.js"; +export * from "./outputapplypatchservertoolitem.js"; +export * from "./outputbashservertoolitem.js"; +export * from "./outputbrowseruseservertoolitem.js"; +export * from "./outputcodeinterpretercallitem.js"; +export * from "./outputcodeinterpreterservertoolitem.js"; +export * from "./outputcomputercallitem.js"; export * from "./outputdatetimeitem.js"; export * from "./outputfilesearchcallitem.js"; +export * from "./outputfilesearchservertoolitem.js"; export * from "./outputfunctioncallitem.js"; export * from "./outputimagegenerationcallitem.js"; +export * from "./outputimagegenerationservertoolitem.js"; export * from "./outputitemimagegenerationcall.js"; export * from "./outputitems.js"; +export * from "./outputmcpservertoolitem.js"; +export * from "./outputmemoryservertoolitem.js"; export * from "./outputmessage.js"; export * from "./outputmessageitem.js"; export * from "./outputmodality.js"; export * from "./outputmodalityenum.js"; export * from "./outputreasoningitem.js"; -export * from "./outputservertoolitem.js"; +export * from "./outputtexteditorservertoolitem.js"; +export * from "./outputtoolsearchservertoolitem.js"; +export * from "./outputwebfetchservertoolitem.js"; export * from "./outputwebsearchcallitem.js"; +export * from "./outputwebsearchservertoolitem.js"; export * from "./parameter.js"; export * from "./payloadtoolargeresponseerrordata.js"; export * from "./paymentrequiredresponseerrordata.js"; @@ -143,6 +189,7 @@ export * from "./previewwebsearchuserlocation.js"; export * from "./providername.js"; export * from "./provideroverloadedresponseerrordata.js"; export * from "./providerpreferences.js"; +export * from "./providerresponse.js"; export * from "./providersort.js"; export * from "./providersortconfig.js"; export * from "./publicendpoint.js"; @@ -155,45 +202,70 @@ export * from "./reasoningdetailsummary.js"; export * from "./reasoningdetailtext.js"; export * from "./reasoningdetailunion.js"; export * from "./reasoningdoneevent.js"; -export * from "./reasoningeffortenum.js"; +export * from "./reasoningeffort.js"; +export * from "./reasoningformat.js"; export * from "./reasoningitem.js"; export * from "./reasoningsummarypartaddedevent.js"; export * from "./reasoningsummarypartdoneevent.js"; export * from "./reasoningsummarytext.js"; export * from "./reasoningsummarytextdeltaevent.js"; export * from "./reasoningsummarytextdoneevent.js"; -export * from "./reasoningsummaryverbosityenum.js"; +export * from "./reasoningsummaryverbosity.js"; export * from "./reasoningtextcontent.js"; export * from "./refusaldeltaevent.js"; export * from "./refusaldoneevent.js"; export * from "./requesttimeoutresponseerrordata.js"; +export * from "./responsehealingplugin.js"; export * from "./responseincludesenum.js"; export * from "./responseoutputtext.js"; export * from "./responseserrorfield.js"; export * from "./responsesrequest.js"; export * from "./searchcontextsizeenum.js"; +export * from "./searchqualitylevel.js"; export * from "./security.js"; export * from "./serviceunavailableresponseerrordata.js"; export * from "./shellservertool.js"; export * from "./storedprompttemplate.js"; export * from "./streamevents.js"; +export * from "./streameventsresponsecompleted.js"; +export * from "./streameventsresponsefailed.js"; +export * from "./streameventsresponseincomplete.js"; +export * from "./streameventsresponseoutputitemadded.js"; +export * from "./streameventsresponseoutputitemdone.js"; +export * from "./streamlogprob.js"; +export * from "./streamlogprobtoplogprob.js"; export * from "./textconfig.js"; export * from "./textdeltaevent.js"; export * from "./textdoneevent.js"; export * from "./textextendedconfig.js"; -export * from "./toolcallstatusenum.js"; +export * from "./toolcallstatus.js"; +export * from "./toolchoiceallowed.js"; export * from "./toomanyrequestsresponseerrordata.js"; export * from "./topproviderinfo.js"; -export * from "./truncationenum.js"; +export * from "./traceconfig.js"; +export * from "./truncation.js"; export * from "./unauthorizedresponseerrordata.js"; export * from "./unprocessableentityresponseerrordata.js"; +export * from "./updateguardrailrequest.js"; +export * from "./updateguardrailresponse.js"; export * from "./urlcitation.js"; export * from "./usage.js"; +export * from "./videogenerationrequest.js"; +export * from "./videogenerationresponse.js"; +export * from "./videogenerationusage.js"; +export * from "./videomodel.js"; +export * from "./videomodelslistresponse.js"; export * from "./websearchcallcompletedevent.js"; export * from "./websearchcallinprogressevent.js"; export * from "./websearchcallsearchingevent.js"; +export * from "./websearchconfig.js"; +export * from "./websearchdomainfilter.js"; export * from "./websearchengine.js"; +export * from "./websearchengineenum.js"; +export * from "./websearchplugin.js"; export * from "./websearchservertool.js"; export * from "./websearchservertoolopenrouter.js"; +export * from "./websearchsource.js"; export * from "./websearchstatus.js"; export * from "./websearchuserlocation.js"; +export * from "./websearchuserlocationservertool.js"; diff --git a/src/models/inputaudio.ts b/src/models/inputaudio.ts index 7c21e4a0..ac0dcba3 100644 --- a/src/models/inputaudio.ts +++ b/src/models/inputaudio.ts @@ -11,35 +11,31 @@ import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const InputAudioFormat = { +export const FormatEnum = { Mp3: "mp3", Wav: "wav", } as const; -export type InputAudioFormat = OpenEnum; +export type FormatEnum = OpenEnum; export type InputAudioInputAudio = { data: string; - format: InputAudioFormat; + format: FormatEnum; }; /** * Audio input content item */ export type InputAudio = { - type: "input_audio"; inputAudio: InputAudioInputAudio; + type: "input_audio"; }; /** @internal */ -export const InputAudioFormat$inboundSchema: z.ZodType< - InputAudioFormat, - unknown -> = openEnums.inboundSchema(InputAudioFormat); +export const FormatEnum$inboundSchema: z.ZodType = + openEnums.inboundSchema(FormatEnum); /** @internal */ -export const InputAudioFormat$outboundSchema: z.ZodType< - string, - InputAudioFormat -> = openEnums.outboundSchema(InputAudioFormat); +export const FormatEnum$outboundSchema: z.ZodType = + openEnums.outboundSchema(FormatEnum); /** @internal */ export const InputAudioInputAudio$inboundSchema: z.ZodType< @@ -47,7 +43,7 @@ export const InputAudioInputAudio$inboundSchema: z.ZodType< unknown > = z.object({ data: z.string(), - format: InputAudioFormat$inboundSchema, + format: FormatEnum$inboundSchema, }); /** @internal */ export type InputAudioInputAudio$Outbound = { @@ -61,7 +57,7 @@ export const InputAudioInputAudio$outboundSchema: z.ZodType< InputAudioInputAudio > = z.object({ data: z.string(), - format: InputAudioFormat$outboundSchema, + format: FormatEnum$outboundSchema, }); export function inputAudioInputAudioToJSON( @@ -84,8 +80,8 @@ export function inputAudioInputAudioFromJSON( /** @internal */ export const InputAudio$inboundSchema: z.ZodType = z .object({ - type: z.literal("input_audio"), input_audio: z.lazy(() => InputAudioInputAudio$inboundSchema), + type: z.literal("input_audio"), }).transform((v) => { return remap$(v, { "input_audio": "inputAudio", @@ -93,8 +89,8 @@ export const InputAudio$inboundSchema: z.ZodType = z }); /** @internal */ export type InputAudio$Outbound = { - type: "input_audio"; input_audio: InputAudioInputAudio$Outbound; + type: "input_audio"; }; /** @internal */ @@ -102,8 +98,8 @@ export const InputAudio$outboundSchema: z.ZodType< InputAudio$Outbound, InputAudio > = z.object({ - type: z.literal("input_audio"), inputAudio: z.lazy(() => InputAudioInputAudio$outboundSchema), + type: z.literal("input_audio"), }).transform((v) => { return remap$(v, { inputAudio: "input_audio", diff --git a/src/models/inputfile.ts b/src/models/inputfile.ts index fcf295a5..8bfb8624 100644 --- a/src/models/inputfile.ts +++ b/src/models/inputfile.ts @@ -13,34 +13,34 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * File input content item */ export type InputFile = { - type: "input_file"; - fileId?: string | null | undefined; fileData?: string | undefined; - filename?: string | undefined; + fileId?: string | null | undefined; fileUrl?: string | undefined; + filename?: string | undefined; + type: "input_file"; }; /** @internal */ export const InputFile$inboundSchema: z.ZodType = z.object({ - type: z.literal("input_file"), - file_id: z.nullable(z.string()).optional(), file_data: z.string().optional(), - filename: z.string().optional(), + file_id: z.nullable(z.string()).optional(), file_url: z.string().optional(), + filename: z.string().optional(), + type: z.literal("input_file"), }).transform((v) => { return remap$(v, { - "file_id": "fileId", "file_data": "fileData", + "file_id": "fileId", "file_url": "fileUrl", }); }); /** @internal */ export type InputFile$Outbound = { - type: "input_file"; - file_id?: string | null | undefined; file_data?: string | undefined; - filename?: string | undefined; + file_id?: string | null | undefined; file_url?: string | undefined; + filename?: string | undefined; + type: "input_file"; }; /** @internal */ @@ -48,15 +48,15 @@ export const InputFile$outboundSchema: z.ZodType< InputFile$Outbound, InputFile > = z.object({ - type: z.literal("input_file"), - fileId: z.nullable(z.string()).optional(), fileData: z.string().optional(), - filename: z.string().optional(), + fileId: z.nullable(z.string()).optional(), fileUrl: z.string().optional(), + filename: z.string().optional(), + type: z.literal("input_file"), }).transform((v) => { return remap$(v, { - fileId: "file_id", fileData: "file_data", + fileId: "file_id", fileUrl: "file_url", }); }); diff --git a/src/models/inputimage.ts b/src/models/inputimage.ts index d45064d8..a91cf740 100644 --- a/src/models/inputimage.ts +++ b/src/models/inputimage.ts @@ -11,11 +11,6 @@ import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const InputImageTypeEnum = { - InputImage: "input_image", -} as const; -export type InputImageTypeEnum = ClosedEnum; - export const InputImageDetail = { Auto: "auto", High: "high", @@ -23,24 +18,20 @@ export const InputImageDetail = { } as const; export type InputImageDetail = OpenEnum; +export const InputImageTypeEnum = { + InputImage: "input_image", +} as const; +export type InputImageTypeEnum = ClosedEnum; + /** * Image input content item */ export type InputImage = { - type: InputImageTypeEnum; detail: InputImageDetail; imageUrl?: string | null | undefined; + type: InputImageTypeEnum; }; -/** @internal */ -export const InputImageTypeEnum$inboundSchema: z.ZodEnum< - typeof InputImageTypeEnum -> = z.enum(InputImageTypeEnum); -/** @internal */ -export const InputImageTypeEnum$outboundSchema: z.ZodEnum< - typeof InputImageTypeEnum -> = InputImageTypeEnum$inboundSchema; - /** @internal */ export const InputImageDetail$inboundSchema: z.ZodType< InputImageDetail, @@ -52,12 +43,21 @@ export const InputImageDetail$outboundSchema: z.ZodType< InputImageDetail > = openEnums.outboundSchema(InputImageDetail); +/** @internal */ +export const InputImageTypeEnum$inboundSchema: z.ZodEnum< + typeof InputImageTypeEnum +> = z.enum(InputImageTypeEnum); +/** @internal */ +export const InputImageTypeEnum$outboundSchema: z.ZodEnum< + typeof InputImageTypeEnum +> = InputImageTypeEnum$inboundSchema; + /** @internal */ export const InputImage$inboundSchema: z.ZodType = z .object({ - type: InputImageTypeEnum$inboundSchema, detail: InputImageDetail$inboundSchema, image_url: z.nullable(z.string()).optional(), + type: InputImageTypeEnum$inboundSchema, }).transform((v) => { return remap$(v, { "image_url": "imageUrl", @@ -65,9 +65,9 @@ export const InputImage$inboundSchema: z.ZodType = z }); /** @internal */ export type InputImage$Outbound = { - type: string; detail: string; image_url?: string | null | undefined; + type: string; }; /** @internal */ @@ -75,9 +75,9 @@ export const InputImage$outboundSchema: z.ZodType< InputImage$Outbound, InputImage > = z.object({ - type: InputImageTypeEnum$outboundSchema, detail: InputImageDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), + type: InputImageTypeEnum$outboundSchema, }).transform((v) => { return remap$(v, { imageUrl: "image_url", diff --git a/src/models/inputmessageitem.ts b/src/models/inputmessageitem.ts index 96f1a0d1..f33e7c32 100644 --- a/src/models/inputmessageitem.ts +++ b/src/models/inputmessageitem.ts @@ -28,12 +28,28 @@ import { InputVideo$outboundSchema, } from "./inputvideo.js"; -export const InputMessageItemTypeMessage = { - Message: "message", +export const InputMessageItemDetail = { + Auto: "auto", + High: "high", + Low: "low", } as const; -export type InputMessageItemTypeMessage = ClosedEnum< - typeof InputMessageItemTypeMessage ->; +export type InputMessageItemDetail = OpenEnum; + +/** + * Image input content item + */ +export type InputMessageItemContentInputImage = { + detail: InputMessageItemDetail; + imageUrl?: string | null | undefined; + type: "input_image"; +}; + +export type InputMessageItemContentUnion = + | InputText + | InputMessageItemContentInputImage + | InputFile + | InputAudio + | InputVideo; export const InputMessageItemRoleDeveloper = { Developer: "developer", @@ -61,36 +77,14 @@ export type InputMessageItemRoleUnion = | InputMessageItemRoleSystem | InputMessageItemRoleDeveloper; -export const InputMessageItemDetail = { - Auto: "auto", - High: "high", - Low: "low", +export const InputMessageItemTypeMessage = { + Message: "message", } as const; -export type InputMessageItemDetail = OpenEnum; - -/** - * Image input content item - */ -export type InputMessageItemContentInputImage = { - type: "input_image"; - detail: InputMessageItemDetail; - imageUrl?: string | null | undefined; -}; - -export type InputMessageItemContentUnion = - | InputText - | InputMessageItemContentInputImage - | InputFile - | InputAudio - | InputVideo; +export type InputMessageItemTypeMessage = ClosedEnum< + typeof InputMessageItemTypeMessage +>; export type InputMessageItem = { - id?: string | undefined; - type?: InputMessageItemTypeMessage | undefined; - role: - | InputMessageItemRoleUser - | InputMessageItemRoleSystem - | InputMessageItemRoleDeveloper; content?: | Array< | InputText @@ -101,49 +95,14 @@ export type InputMessageItem = { > | null | undefined; + id?: string | undefined; + role: + | InputMessageItemRoleUser + | InputMessageItemRoleSystem + | InputMessageItemRoleDeveloper; + type?: InputMessageItemTypeMessage | undefined; }; -/** @internal */ -export const InputMessageItemTypeMessage$outboundSchema: z.ZodEnum< - typeof InputMessageItemTypeMessage -> = z.enum(InputMessageItemTypeMessage); - -/** @internal */ -export const InputMessageItemRoleDeveloper$outboundSchema: z.ZodEnum< - typeof InputMessageItemRoleDeveloper -> = z.enum(InputMessageItemRoleDeveloper); - -/** @internal */ -export const InputMessageItemRoleSystem$outboundSchema: z.ZodEnum< - typeof InputMessageItemRoleSystem -> = z.enum(InputMessageItemRoleSystem); - -/** @internal */ -export const InputMessageItemRoleUser$outboundSchema: z.ZodEnum< - typeof InputMessageItemRoleUser -> = z.enum(InputMessageItemRoleUser); - -/** @internal */ -export type InputMessageItemRoleUnion$Outbound = string | string | string; - -/** @internal */ -export const InputMessageItemRoleUnion$outboundSchema: z.ZodType< - InputMessageItemRoleUnion$Outbound, - InputMessageItemRoleUnion -> = z.union([ - InputMessageItemRoleUser$outboundSchema, - InputMessageItemRoleSystem$outboundSchema, - InputMessageItemRoleDeveloper$outboundSchema, -]); - -export function inputMessageItemRoleUnionToJSON( - inputMessageItemRoleUnion: InputMessageItemRoleUnion, -): string { - return JSON.stringify( - InputMessageItemRoleUnion$outboundSchema.parse(inputMessageItemRoleUnion), - ); -} - /** @internal */ export const InputMessageItemDetail$outboundSchema: z.ZodType< string, @@ -152,9 +111,9 @@ export const InputMessageItemDetail$outboundSchema: z.ZodType< /** @internal */ export type InputMessageItemContentInputImage$Outbound = { - type: "input_image"; detail: string; image_url?: string | null | undefined; + type: "input_image"; }; /** @internal */ @@ -162,9 +121,9 @@ export const InputMessageItemContentInputImage$outboundSchema: z.ZodType< InputMessageItemContentInputImage$Outbound, InputMessageItemContentInputImage > = z.object({ - type: z.literal("input_image"), detail: InputMessageItemDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), + type: z.literal("input_image"), }).transform((v) => { return remap$(v, { imageUrl: "image_url", @@ -211,11 +170,49 @@ export function inputMessageItemContentUnionToJSON( ); } +/** @internal */ +export const InputMessageItemRoleDeveloper$outboundSchema: z.ZodEnum< + typeof InputMessageItemRoleDeveloper +> = z.enum(InputMessageItemRoleDeveloper); + +/** @internal */ +export const InputMessageItemRoleSystem$outboundSchema: z.ZodEnum< + typeof InputMessageItemRoleSystem +> = z.enum(InputMessageItemRoleSystem); + +/** @internal */ +export const InputMessageItemRoleUser$outboundSchema: z.ZodEnum< + typeof InputMessageItemRoleUser +> = z.enum(InputMessageItemRoleUser); + +/** @internal */ +export type InputMessageItemRoleUnion$Outbound = string | string | string; + +/** @internal */ +export const InputMessageItemRoleUnion$outboundSchema: z.ZodType< + InputMessageItemRoleUnion$Outbound, + InputMessageItemRoleUnion +> = z.union([ + InputMessageItemRoleUser$outboundSchema, + InputMessageItemRoleSystem$outboundSchema, + InputMessageItemRoleDeveloper$outboundSchema, +]); + +export function inputMessageItemRoleUnionToJSON( + inputMessageItemRoleUnion: InputMessageItemRoleUnion, +): string { + return JSON.stringify( + InputMessageItemRoleUnion$outboundSchema.parse(inputMessageItemRoleUnion), + ); +} + +/** @internal */ +export const InputMessageItemTypeMessage$outboundSchema: z.ZodEnum< + typeof InputMessageItemTypeMessage +> = z.enum(InputMessageItemTypeMessage); + /** @internal */ export type InputMessageItem$Outbound = { - id?: string | undefined; - type?: string | undefined; - role: string | string | string; content?: | Array< | InputText$Outbound @@ -226,6 +223,9 @@ export type InputMessageItem$Outbound = { > | null | undefined; + id?: string | undefined; + role: string | string | string; + type?: string | undefined; }; /** @internal */ @@ -233,13 +233,6 @@ export const InputMessageItem$outboundSchema: z.ZodType< InputMessageItem$Outbound, InputMessageItem > = z.object({ - id: z.string().optional(), - type: InputMessageItemTypeMessage$outboundSchema.optional(), - role: z.union([ - InputMessageItemRoleUser$outboundSchema, - InputMessageItemRoleSystem$outboundSchema, - InputMessageItemRoleDeveloper$outboundSchema, - ]), content: z.nullable( z.array(z.union([ InputText$outboundSchema, @@ -249,6 +242,13 @@ export const InputMessageItem$outboundSchema: z.ZodType< InputVideo$outboundSchema, ])), ).optional(), + id: z.string().optional(), + role: z.union([ + InputMessageItemRoleUser$outboundSchema, + InputMessageItemRoleSystem$outboundSchema, + InputMessageItemRoleDeveloper$outboundSchema, + ]), + type: InputMessageItemTypeMessage$outboundSchema.optional(), }); export function inputMessageItemToJSON( diff --git a/src/models/inputsunion.ts b/src/models/inputsunion.ts index 0a4daef9..ebb73f69 100644 --- a/src/models/inputsunion.ts +++ b/src/models/inputsunion.ts @@ -5,8 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { EasyInputMessage, EasyInputMessage$Outbound, @@ -52,16 +51,20 @@ import { OutputImageGenerationCallItem$Outbound, OutputImageGenerationCallItem$outboundSchema, } from "./outputimagegenerationcallitem.js"; -import { - OutputServerToolItem, - OutputServerToolItem$Outbound, - OutputServerToolItem$outboundSchema, -} from "./outputservertoolitem.js"; import { OutputWebSearchCallItem, OutputWebSearchCallItem$Outbound, OutputWebSearchCallItem$outboundSchema, } from "./outputwebsearchcallitem.js"; +import { + OutputWebSearchServerToolItem, + OutputWebSearchServerToolItem$Outbound, + OutputWebSearchServerToolItem$outboundSchema, +} from "./outputwebsearchservertoolitem.js"; +import { + ReasoningFormat, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; import { ReasoningItem, ReasoningItem$Outbound, @@ -83,11 +86,6 @@ import { ResponseOutputText$outboundSchema, } from "./responseoutputtext.js"; -export const InputsTypeReasoning = { - Reasoning: "reasoning", -} as const; -export type InputsTypeReasoning = ClosedEnum; - export const InputsStatusInProgress2 = { InProgress: "in_progress", } as const; @@ -112,56 +110,62 @@ export type InputsStatusUnion2 = | InputsStatusIncomplete2 | InputsStatusInProgress2; -/** - * The format of the reasoning content - */ -export const InputsFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", +export const InputsTypeReasoning = { + Reasoning: "reasoning", } as const; -/** - * The format of the reasoning content - */ -export type InputsFormat = OpenEnum; +export type InputsTypeReasoning = ClosedEnum; /** * An output item containing reasoning */ export type InputsReasoning = { - type: InputsTypeReasoning; - id: string; content?: Array | null | undefined; - summary: Array | null; encryptedContent?: string | null | undefined; + id: string; status?: | InputsStatusCompleted2 | InputsStatusIncomplete2 | InputsStatusInProgress2 | undefined; + summary: Array | null; + type: InputsTypeReasoning; + format?: ReasoningFormat | null | undefined; /** * A signature for the reasoning content, used for verification */ signature?: string | null | undefined; - /** - * The format of the reasoning content - */ - format?: InputsFormat | null | undefined; }; +export type InputsContent1 = ResponseOutputText | OpenAIResponsesRefusalContent; + +export type InputsContent2 = + | Array + | string + | any; + +export const InputsPhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type InputsPhaseFinalAnswer = ClosedEnum; + +export const InputsPhaseCommentary = { + Commentary: "commentary", +} as const; +export type InputsPhaseCommentary = ClosedEnum; + +/** + * 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. + */ +export type InputsPhaseUnion = + | InputsPhaseCommentary + | InputsPhaseFinalAnswer + | any; + export const InputsRole = { Assistant: "assistant", } as const; export type InputsRole = ClosedEnum; -export const InputsTypeMessage = { - Message: "message", -} as const; -export type InputsTypeMessage = ClosedEnum; - export const InputsStatusInProgress1 = { InProgress: "in_progress", } as const; @@ -186,48 +190,21 @@ export type InputsStatusUnion1 = | InputsStatusIncomplete1 | InputsStatusInProgress1; -export type InputsContent1 = ResponseOutputText | OpenAIResponsesRefusalContent; - -export type InputsContent2 = - | Array - | string - | any; - -export const InputsPhaseFinalAnswer = { - FinalAnswer: "final_answer", -} as const; -export type InputsPhaseFinalAnswer = ClosedEnum; - -export const InputsPhaseCommentary = { - Commentary: "commentary", +export const InputsTypeMessage = { + Message: "message", } as const; -export type InputsPhaseCommentary = ClosedEnum; - -/** - * 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. - */ -export type InputsPhaseUnion = - | InputsPhaseCommentary - | InputsPhaseFinalAnswer - | any; +export type InputsTypeMessage = ClosedEnum; /** * An output message item */ export type InputsMessage = { - id: string; - role: InputsRole; - type: InputsTypeMessage; - status?: - | InputsStatusCompleted1 - | InputsStatusIncomplete1 - | InputsStatusInProgress1 - | undefined; content: | Array | string | any | null; + id: string; /** * 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. */ @@ -237,6 +214,13 @@ export type InputsMessage = { | any | null | undefined; + role: InputsRole; + status?: + | InputsStatusCompleted1 + | InputsStatusIncomplete1 + | InputsStatusInProgress1 + | undefined; + type: InputsTypeMessage; }; export type InputsUnion1 = @@ -250,7 +234,7 @@ export type InputsUnion1 = | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem - | OutputServerToolItem + | OutputWebSearchServerToolItem | EasyInputMessage | InputMessageItem; @@ -270,16 +254,11 @@ export type InputsUnion = | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem - | OutputServerToolItem + | OutputWebSearchServerToolItem | EasyInputMessage | InputMessageItem >; -/** @internal */ -export const InputsTypeReasoning$outboundSchema: z.ZodEnum< - typeof InputsTypeReasoning -> = z.enum(InputsTypeReasoning); - /** @internal */ export const InputsStatusInProgress2$outboundSchema: z.ZodEnum< typeof InputsStatusInProgress2 @@ -317,19 +296,20 @@ export function inputsStatusUnion2ToJSON( } /** @internal */ -export const InputsFormat$outboundSchema: z.ZodType = - openEnums.outboundSchema(InputsFormat); +export const InputsTypeReasoning$outboundSchema: z.ZodEnum< + typeof InputsTypeReasoning +> = z.enum(InputsTypeReasoning); /** @internal */ export type InputsReasoning$Outbound = { - type: string; - id: string; content?: Array | null | undefined; - summary: Array | null; encrypted_content?: string | null | undefined; + id: string; status?: string | string | string | undefined; - signature?: string | null | undefined; + summary: Array | null; + type: string; format?: string | null | undefined; + signature?: string | null | undefined; }; /** @internal */ @@ -337,18 +317,18 @@ export const InputsReasoning$outboundSchema: z.ZodType< InputsReasoning$Outbound, InputsReasoning > = z.object({ - type: InputsTypeReasoning$outboundSchema, - id: z.string(), content: z.nullable(z.array(ReasoningTextContent$outboundSchema)).optional(), - summary: z.nullable(z.array(ReasoningSummaryText$outboundSchema)), encryptedContent: z.nullable(z.string()).optional(), + id: z.string(), status: z.union([ InputsStatusCompleted2$outboundSchema, InputsStatusIncomplete2$outboundSchema, InputsStatusInProgress2$outboundSchema, ]).optional(), + summary: z.nullable(z.array(ReasoningSummaryText$outboundSchema)), + type: InputsTypeReasoning$outboundSchema, + format: z.nullable(ReasoningFormat$outboundSchema).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(InputsFormat$outboundSchema).optional(), }).transform((v) => { return remap$(v, { encryptedContent: "encrypted_content", @@ -361,52 +341,6 @@ export function inputsReasoningToJSON( return JSON.stringify(InputsReasoning$outboundSchema.parse(inputsReasoning)); } -/** @internal */ -export const InputsRole$outboundSchema: z.ZodEnum = z.enum( - InputsRole, -); - -/** @internal */ -export const InputsTypeMessage$outboundSchema: z.ZodEnum< - typeof InputsTypeMessage -> = z.enum(InputsTypeMessage); - -/** @internal */ -export const InputsStatusInProgress1$outboundSchema: z.ZodEnum< - typeof InputsStatusInProgress1 -> = z.enum(InputsStatusInProgress1); - -/** @internal */ -export const InputsStatusIncomplete1$outboundSchema: z.ZodEnum< - typeof InputsStatusIncomplete1 -> = z.enum(InputsStatusIncomplete1); - -/** @internal */ -export const InputsStatusCompleted1$outboundSchema: z.ZodEnum< - typeof InputsStatusCompleted1 -> = z.enum(InputsStatusCompleted1); - -/** @internal */ -export type InputsStatusUnion1$Outbound = string | string | string; - -/** @internal */ -export const InputsStatusUnion1$outboundSchema: z.ZodType< - InputsStatusUnion1$Outbound, - InputsStatusUnion1 -> = z.union([ - InputsStatusCompleted1$outboundSchema, - InputsStatusIncomplete1$outboundSchema, - InputsStatusInProgress1$outboundSchema, -]); - -export function inputsStatusUnion1ToJSON( - inputsStatusUnion1: InputsStatusUnion1, -): string { - return JSON.stringify( - InputsStatusUnion1$outboundSchema.parse(inputsStatusUnion1), - ); -} - /** @internal */ export type InputsContent1$Outbound = | ResponseOutputText$Outbound @@ -481,12 +415,54 @@ export function inputsPhaseUnionToJSON( ); } +/** @internal */ +export const InputsRole$outboundSchema: z.ZodEnum = z.enum( + InputsRole, +); + +/** @internal */ +export const InputsStatusInProgress1$outboundSchema: z.ZodEnum< + typeof InputsStatusInProgress1 +> = z.enum(InputsStatusInProgress1); + +/** @internal */ +export const InputsStatusIncomplete1$outboundSchema: z.ZodEnum< + typeof InputsStatusIncomplete1 +> = z.enum(InputsStatusIncomplete1); + +/** @internal */ +export const InputsStatusCompleted1$outboundSchema: z.ZodEnum< + typeof InputsStatusCompleted1 +> = z.enum(InputsStatusCompleted1); + +/** @internal */ +export type InputsStatusUnion1$Outbound = string | string | string; + +/** @internal */ +export const InputsStatusUnion1$outboundSchema: z.ZodType< + InputsStatusUnion1$Outbound, + InputsStatusUnion1 +> = z.union([ + InputsStatusCompleted1$outboundSchema, + InputsStatusIncomplete1$outboundSchema, + InputsStatusInProgress1$outboundSchema, +]); + +export function inputsStatusUnion1ToJSON( + inputsStatusUnion1: InputsStatusUnion1, +): string { + return JSON.stringify( + InputsStatusUnion1$outboundSchema.parse(inputsStatusUnion1), + ); +} + +/** @internal */ +export const InputsTypeMessage$outboundSchema: z.ZodEnum< + typeof InputsTypeMessage +> = z.enum(InputsTypeMessage); + /** @internal */ export type InputsMessage$Outbound = { - id: string; - role: string; - type: string; - status?: string | string | string | undefined; content: | Array< ResponseOutputText$Outbound | OpenAIResponsesRefusalContent$Outbound @@ -494,7 +470,11 @@ export type InputsMessage$Outbound = { | string | any | null; + id: string; phase?: string | string | any | null | undefined; + role: string; + status?: string | string | string | undefined; + type: string; }; /** @internal */ @@ -502,14 +482,6 @@ export const InputsMessage$outboundSchema: z.ZodType< InputsMessage$Outbound, InputsMessage > = z.object({ - id: z.string(), - role: InputsRole$outboundSchema, - type: InputsTypeMessage$outboundSchema, - status: z.union([ - InputsStatusCompleted1$outboundSchema, - InputsStatusIncomplete1$outboundSchema, - InputsStatusInProgress1$outboundSchema, - ]).optional(), content: z.nullable( z.union([ z.array( @@ -522,6 +494,7 @@ export const InputsMessage$outboundSchema: z.ZodType< z.any(), ]), ), + id: z.string(), phase: z.nullable( z.union([ InputsPhaseCommentary$outboundSchema, @@ -529,6 +502,13 @@ export const InputsMessage$outboundSchema: z.ZodType< z.any(), ]), ).optional(), + role: InputsRole$outboundSchema, + status: z.union([ + InputsStatusCompleted1$outboundSchema, + InputsStatusIncomplete1$outboundSchema, + InputsStatusInProgress1$outboundSchema, + ]).optional(), + type: InputsTypeMessage$outboundSchema, }); export function inputsMessageToJSON(inputsMessage: InputsMessage): string { @@ -547,7 +527,7 @@ export type InputsUnion1$Outbound = | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound - | OutputServerToolItem$Outbound + | OutputWebSearchServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound; @@ -566,7 +546,7 @@ export const InputsUnion1$outboundSchema: z.ZodType< FunctionCallOutputItem$outboundSchema, z.lazy(() => InputsReasoning$outboundSchema), OutputImageGenerationCallItem$outboundSchema, - OutputServerToolItem$outboundSchema, + OutputWebSearchServerToolItem$outboundSchema, EasyInputMessage$outboundSchema, InputMessageItem$outboundSchema, ]); @@ -589,7 +569,7 @@ export type InputsUnion$Outbound = | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound - | OutputServerToolItem$Outbound + | OutputWebSearchServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound >; @@ -611,7 +591,7 @@ export const InputsUnion$outboundSchema: z.ZodType< FunctionCallOutputItem$outboundSchema, z.lazy(() => InputsReasoning$outboundSchema), OutputImageGenerationCallItem$outboundSchema, - OutputServerToolItem$outboundSchema, + OutputWebSearchServerToolItem$outboundSchema, EasyInputMessage$outboundSchema, InputMessageItem$outboundSchema, ])), diff --git a/src/models/inputtext.ts b/src/models/inputtext.ts index 0618f268..71890524 100644 --- a/src/models/inputtext.ts +++ b/src/models/inputtext.ts @@ -12,19 +12,19 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Text input content item */ export type InputText = { - type: "input_text"; text: string; + type: "input_text"; }; /** @internal */ export const InputText$inboundSchema: z.ZodType = z.object({ - type: z.literal("input_text"), text: z.string(), + type: z.literal("input_text"), }); /** @internal */ export type InputText$Outbound = { - type: "input_text"; text: string; + type: "input_text"; }; /** @internal */ @@ -32,8 +32,8 @@ export const InputText$outboundSchema: z.ZodType< InputText$Outbound, InputText > = z.object({ - type: z.literal("input_text"), text: z.string(), + type: z.literal("input_text"), }); export function inputTextToJSON(inputText: InputText): string { diff --git a/src/models/keyassignment.ts b/src/models/keyassignment.ts new file mode 100644 index 00000000..caef08fc --- /dev/null +++ b/src/models/keyassignment.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0daee4bf9653 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type KeyAssignment = { + /** + * User ID of who made the assignment + */ + assignedBy: string | null; + /** + * ISO 8601 timestamp of when the assignment was created + */ + createdAt: string; + /** + * ID of the guardrail + */ + guardrailId: string; + /** + * Unique identifier for the assignment + */ + id: string; + /** + * Hash of the assigned API key + */ + keyHash: string; + /** + * Label of the API key + */ + keyLabel: string; + /** + * Name of the API key + */ + keyName: string; +}; + +/** @internal */ +export const KeyAssignment$inboundSchema: z.ZodType = z + .object({ + assigned_by: z.nullable(z.string()), + created_at: z.string(), + guardrail_id: z.string(), + id: z.string(), + key_hash: z.string(), + key_label: z.string(), + key_name: z.string(), + }).transform((v) => { + return remap$(v, { + "assigned_by": "assignedBy", + "created_at": "createdAt", + "guardrail_id": "guardrailId", + "key_hash": "keyHash", + "key_label": "keyLabel", + "key_name": "keyName", + }); + }); + +export function keyAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => KeyAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'KeyAssignment' from JSON`, + ); +} diff --git a/src/models/legacywebsearchservertool.ts b/src/models/legacywebsearchservertool.ts index 14b3583c..ac26d94c 100644 --- a/src/models/legacywebsearchservertool.ts +++ b/src/models/legacywebsearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -15,6 +13,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; import { WebSearchUserLocation, WebSearchUserLocation$inboundSchema, @@ -22,143 +31,56 @@ import { WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js"; -export type LegacyWebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; - -/** - * 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. - */ -export const LegacyWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type LegacyWebSearchServerToolEngine = OpenEnum< - typeof LegacyWebSearchServerToolEngine ->; - /** * Web search tool configuration */ export type LegacyWebSearchServerTool = { - type: "web_search"; - filters?: LegacyWebSearchServerToolFilters | null | undefined; /** - * Size of the search context for web search tools + * 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. */ - searchContextSize?: SearchContextSizeEnum | undefined; + engine?: WebSearchEngineEnum | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** - * User location information for web search + * 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. */ - userLocation?: WebSearchUserLocation | null | undefined; + maxResults?: number | undefined; /** - * 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. + * Size of the search context for web search tools */ - engine?: LegacyWebSearchServerToolEngine | undefined; + searchContextSize?: SearchContextSizeEnum | undefined; + type: "web_search"; /** - * 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. + * User location information for web search */ - maxResults?: number | undefined; -}; - -/** @internal */ -export const LegacyWebSearchServerToolFilters$inboundSchema: z.ZodType< - LegacyWebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type LegacyWebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + userLocation?: WebSearchUserLocation | null | undefined; }; -/** @internal */ -export const LegacyWebSearchServerToolFilters$outboundSchema: z.ZodType< - LegacyWebSearchServerToolFilters$Outbound, - LegacyWebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function legacyWebSearchServerToolFiltersToJSON( - legacyWebSearchServerToolFilters: LegacyWebSearchServerToolFilters, -): string { - return JSON.stringify( - LegacyWebSearchServerToolFilters$outboundSchema.parse( - legacyWebSearchServerToolFilters, - ), - ); -} -export function legacyWebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => LegacyWebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LegacyWebSearchServerToolFilters' from JSON`, - ); -} - -/** @internal */ -export const LegacyWebSearchServerToolEngine$inboundSchema: z.ZodType< - LegacyWebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(LegacyWebSearchServerToolEngine); -/** @internal */ -export const LegacyWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - LegacyWebSearchServerToolEngine -> = openEnums.outboundSchema(LegacyWebSearchServerToolEngine); - /** @internal */ export const LegacyWebSearchServerTool$inboundSchema: z.ZodType< LegacyWebSearchServerTool, unknown > = z.object({ - type: z.literal("web_search"), - filters: z.nullable( - z.lazy(() => LegacyWebSearchServerToolFilters$inboundSchema), - ).optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), + max_results: z.int().optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), + type: z.literal("web_search"), user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(), - engine: LegacyWebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), }).transform((v) => { return remap$(v, { + "max_results": "maxResults", "search_context_size": "searchContextSize", "user_location": "userLocation", - "max_results": "maxResults", }); }); /** @internal */ export type LegacyWebSearchServerTool$Outbound = { - type: "web_search"; - filters?: LegacyWebSearchServerToolFilters$Outbound | null | undefined; - search_context_size?: string | undefined; - user_location?: WebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; max_results?: number | undefined; + search_context_size?: string | undefined; + type: "web_search"; + user_location?: WebSearchUserLocation$Outbound | null | undefined; }; /** @internal */ @@ -166,19 +88,17 @@ export const LegacyWebSearchServerTool$outboundSchema: z.ZodType< LegacyWebSearchServerTool$Outbound, LegacyWebSearchServerTool > = z.object({ - type: z.literal("web_search"), - filters: z.nullable( - z.lazy(() => LegacyWebSearchServerToolFilters$outboundSchema), - ).optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), + maxResults: z.int().optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), + type: z.literal("web_search"), userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(), - engine: LegacyWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), }).transform((v) => { return remap$(v, { + maxResults: "max_results", searchContextSize: "search_context_size", userLocation: "user_location", - maxResults: "max_results", }); }); diff --git a/src/models/listendpointsresponse.ts b/src/models/listendpointsresponse.ts index b6d6af83..78a27fc4 100644 --- a/src/models/listendpointsresponse.ts +++ b/src/models/listendpointsresponse.ts @@ -31,6 +31,7 @@ export const Tokenizer = { Gpt: "GPT", Claude: "Claude", Gemini: "Gemini", + Gemma: "Gemma", Grok: "Grok", Cohere: "Cohere", Nova: "Nova", @@ -54,7 +55,10 @@ export type Tokenizer = OpenEnum; * Model architecture information */ export type Architecture = { - tokenizer: Tokenizer | null; + /** + * Supported input modalities + */ + inputModalities: Array; /** * Instruction format type */ @@ -63,28 +67,18 @@ export type Architecture = { * Primary modality of the model */ modality: string | null; - /** - * Supported input modalities - */ - inputModalities: Array; /** * Supported output modalities */ outputModalities: Array; + tokenizer: Tokenizer | null; }; /** * List of available endpoints for a model */ export type ListEndpointsResponse = { - /** - * Unique identifier for the model - */ - id: string; - /** - * Display name of the model - */ - name: string; + architecture: Architecture; /** * Unix timestamp of when the model was created */ @@ -93,11 +87,18 @@ export type ListEndpointsResponse = { * Description of the model */ description: string; - architecture: Architecture; /** * List of available endpoints for this model */ endpoints: Array; + /** + * Unique identifier for the model + */ + id: string; + /** + * Display name of the model + */ + name: string; }; /** @internal */ @@ -107,15 +108,15 @@ export const Tokenizer$inboundSchema: z.ZodType = openEnums /** @internal */ export const Architecture$inboundSchema: z.ZodType = z .object({ - tokenizer: z.nullable(Tokenizer$inboundSchema), + input_modalities: z.array(InputModality$inboundSchema), instruct_type: z.nullable(InstructType$inboundSchema), modality: z.nullable(z.string()), - input_modalities: z.array(InputModality$inboundSchema), output_modalities: z.array(OutputModality$inboundSchema), + tokenizer: z.nullable(Tokenizer$inboundSchema), }).transform((v) => { return remap$(v, { - "instruct_type": "instructType", "input_modalities": "inputModalities", + "instruct_type": "instructType", "output_modalities": "outputModalities", }); }); @@ -135,12 +136,12 @@ export const ListEndpointsResponse$inboundSchema: z.ZodType< ListEndpointsResponse, unknown > = z.object({ - id: z.string(), - name: z.string(), - created: z.number(), - description: z.string(), architecture: z.lazy(() => Architecture$inboundSchema), + created: z.int(), + description: z.string(), endpoints: z.array(PublicEndpoint$inboundSchema), + id: z.string(), + name: z.string(), }); export function listEndpointsResponseFromJSON( diff --git a/src/models/listguardrailsresponse.ts b/src/models/listguardrailsresponse.ts new file mode 100644 index 00000000..1600636f --- /dev/null +++ b/src/models/listguardrailsresponse.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 281c3f73d27b + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type ListGuardrailsResponse = { + /** + * List of guardrails + */ + data: Array; + /** + * Total number of guardrails + */ + totalCount: number; +}; + +/** @internal */ +export const ListGuardrailsResponse$inboundSchema: z.ZodType< + ListGuardrailsResponse, + unknown +> = z.object({ + data: z.array(Guardrail$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listGuardrailsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListGuardrailsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListGuardrailsResponse' from JSON`, + ); +} diff --git a/src/models/listkeyassignmentsresponse.ts b/src/models/listkeyassignmentsresponse.ts new file mode 100644 index 00000000..e7f6f8be --- /dev/null +++ b/src/models/listkeyassignmentsresponse.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6c14372c6290 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { KeyAssignment, KeyAssignment$inboundSchema } from "./keyassignment.js"; + +export type ListKeyAssignmentsResponse = { + /** + * List of key assignments + */ + data: Array; + /** + * Total number of key assignments for this guardrail + */ + totalCount: number; +}; + +/** @internal */ +export const ListKeyAssignmentsResponse$inboundSchema: z.ZodType< + ListKeyAssignmentsResponse, + unknown +> = z.object({ + data: z.array(KeyAssignment$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listKeyAssignmentsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListKeyAssignmentsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListKeyAssignmentsResponse' from JSON`, + ); +} diff --git a/src/models/listmemberassignmentsresponse.ts b/src/models/listmemberassignmentsresponse.ts new file mode 100644 index 00000000..c6211224 --- /dev/null +++ b/src/models/listmemberassignmentsresponse.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: bbd89d5e9f3f + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + MemberAssignment, + MemberAssignment$inboundSchema, +} from "./memberassignment.js"; + +export type ListMemberAssignmentsResponse = { + /** + * List of member assignments + */ + data: Array; + /** + * Total number of member assignments + */ + totalCount: number; +}; + +/** @internal */ +export const ListMemberAssignmentsResponse$inboundSchema: z.ZodType< + ListMemberAssignmentsResponse, + unknown +> = z.object({ + data: z.array(MemberAssignment$inboundSchema), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listMemberAssignmentsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListMemberAssignmentsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListMemberAssignmentsResponse' from JSON`, + ); +} diff --git a/src/models/mcpservertool.ts b/src/models/mcpservertool.ts index 65d62229..d5bd640a 100644 --- a/src/models/mcpservertool.ts +++ b/src/models/mcpservertool.ts @@ -12,10 +12,12 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type AllowedTools = { - toolNames?: Array | undefined; readOnly?: boolean | undefined; + toolNames?: Array | undefined; }; +export type AllowedToolsUnion = Array | AllowedTools | any; + export const ConnectorId = { ConnectorDropbox: "connector_dropbox", ConnectorGmail: "connector_gmail", @@ -38,49 +40,61 @@ export const RequireApprovalAlways = { } as const; export type RequireApprovalAlways = ClosedEnum; -export type Never = { +export type Always = { toolNames?: Array | undefined; }; -export type Always = { +export type Never = { toolNames?: Array | undefined; }; export type RequireApproval = { - never?: Never | undefined; always?: Always | undefined; + never?: Never | undefined; }; +export type RequireApprovalUnion = + | RequireApproval + | RequireApprovalAlways + | RequireApprovalNever + | any; + /** * MCP (Model Context Protocol) tool configuration */ export type McpServerTool = { - type: "mcp"; - serverLabel: string; - allowedTools?: any | null | undefined; + allowedTools?: Array | AllowedTools | any | null | undefined; authorization?: string | undefined; connectorId?: ConnectorId | undefined; headers?: { [k: string]: string } | null | undefined; - requireApproval?: any | null | undefined; + requireApproval?: + | RequireApproval + | RequireApprovalAlways + | RequireApprovalNever + | any + | null + | undefined; serverDescription?: string | undefined; + serverLabel: string; serverUrl?: string | undefined; + type: "mcp"; }; /** @internal */ export const AllowedTools$inboundSchema: z.ZodType = z .object({ - tool_names: z.array(z.string()).optional(), read_only: z.boolean().optional(), + tool_names: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { - "tool_names": "toolNames", "read_only": "readOnly", + "tool_names": "toolNames", }); }); /** @internal */ export type AllowedTools$Outbound = { - tool_names?: Array | undefined; read_only?: boolean | undefined; + tool_names?: Array | undefined; }; /** @internal */ @@ -88,12 +102,12 @@ export const AllowedTools$outboundSchema: z.ZodType< AllowedTools$Outbound, AllowedTools > = z.object({ - toolNames: z.array(z.string()).optional(), readOnly: z.boolean().optional(), + toolNames: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { - toolNames: "tool_names", readOnly: "read_only", + toolNames: "tool_names", }); }); @@ -110,6 +124,48 @@ export function allowedToolsFromJSON( ); } +/** @internal */ +export const AllowedToolsUnion$inboundSchema: z.ZodType< + AllowedToolsUnion, + unknown +> = z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$inboundSchema), + z.any(), +]); +/** @internal */ +export type AllowedToolsUnion$Outbound = + | Array + | AllowedTools$Outbound + | any; + +/** @internal */ +export const AllowedToolsUnion$outboundSchema: z.ZodType< + AllowedToolsUnion$Outbound, + AllowedToolsUnion +> = z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$outboundSchema), + z.any(), +]); + +export function allowedToolsUnionToJSON( + allowedToolsUnion: AllowedToolsUnion, +): string { + return JSON.stringify( + AllowedToolsUnion$outboundSchema.parse(allowedToolsUnion), + ); +} +export function allowedToolsUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AllowedToolsUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AllowedToolsUnion' from JSON`, + ); +} + /** @internal */ export const ConnectorId$inboundSchema: z.ZodType = openEnums.inboundSchema(ConnectorId); @@ -136,7 +192,7 @@ export const RequireApprovalAlways$outboundSchema: z.ZodEnum< > = RequireApprovalAlways$inboundSchema; /** @internal */ -export const Never$inboundSchema: z.ZodType = z.object({ +export const Always$inboundSchema: z.ZodType = z.object({ tool_names: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { @@ -144,34 +200,35 @@ export const Never$inboundSchema: z.ZodType = z.object({ }); }); /** @internal */ -export type Never$Outbound = { +export type Always$Outbound = { tool_names?: Array | undefined; }; /** @internal */ -export const Never$outboundSchema: z.ZodType = z.object({ - toolNames: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - toolNames: "tool_names", +export const Always$outboundSchema: z.ZodType = z + .object({ + toolNames: z.array(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + toolNames: "tool_names", + }); }); -}); -export function neverToJSON(never: Never): string { - return JSON.stringify(Never$outboundSchema.parse(never)); +export function alwaysToJSON(always: Always): string { + return JSON.stringify(Always$outboundSchema.parse(always)); } -export function neverFromJSON( +export function alwaysFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Never$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Never' from JSON`, + (x) => Always$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Always' from JSON`, ); } /** @internal */ -export const Always$inboundSchema: z.ZodType = z.object({ +export const Never$inboundSchema: z.ZodType = z.object({ tool_names: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { @@ -179,30 +236,29 @@ export const Always$inboundSchema: z.ZodType = z.object({ }); }); /** @internal */ -export type Always$Outbound = { +export type Never$Outbound = { tool_names?: Array | undefined; }; /** @internal */ -export const Always$outboundSchema: z.ZodType = z - .object({ - toolNames: z.array(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - toolNames: "tool_names", - }); +export const Never$outboundSchema: z.ZodType = z.object({ + toolNames: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + toolNames: "tool_names", }); +}); -export function alwaysToJSON(always: Always): string { - return JSON.stringify(Always$outboundSchema.parse(always)); +export function neverToJSON(never: Never): string { + return JSON.stringify(Never$outboundSchema.parse(never)); } -export function alwaysFromJSON( +export function neverFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Always$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Always' from JSON`, + (x) => Never$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Never' from JSON`, ); } @@ -211,13 +267,13 @@ export const RequireApproval$inboundSchema: z.ZodType< RequireApproval, unknown > = z.object({ - never: z.lazy(() => Never$inboundSchema).optional(), always: z.lazy(() => Always$inboundSchema).optional(), + never: z.lazy(() => Never$inboundSchema).optional(), }); /** @internal */ export type RequireApproval$Outbound = { - never?: Never$Outbound | undefined; always?: Always$Outbound | undefined; + never?: Never$Outbound | undefined; }; /** @internal */ @@ -225,8 +281,8 @@ export const RequireApproval$outboundSchema: z.ZodType< RequireApproval$Outbound, RequireApproval > = z.object({ - never: z.lazy(() => Never$outboundSchema).optional(), always: z.lazy(() => Always$outboundSchema).optional(), + never: z.lazy(() => Never$outboundSchema).optional(), }); export function requireApprovalToJSON( @@ -244,39 +300,108 @@ export function requireApprovalFromJSON( ); } +/** @internal */ +export const RequireApprovalUnion$inboundSchema: z.ZodType< + RequireApprovalUnion, + unknown +> = z.union([ + z.lazy(() => RequireApproval$inboundSchema), + RequireApprovalAlways$inboundSchema, + RequireApprovalNever$inboundSchema, + z.any(), +]); +/** @internal */ +export type RequireApprovalUnion$Outbound = + | RequireApproval$Outbound + | string + | string + | any; + +/** @internal */ +export const RequireApprovalUnion$outboundSchema: z.ZodType< + RequireApprovalUnion$Outbound, + RequireApprovalUnion +> = z.union([ + z.lazy(() => RequireApproval$outboundSchema), + RequireApprovalAlways$outboundSchema, + RequireApprovalNever$outboundSchema, + z.any(), +]); + +export function requireApprovalUnionToJSON( + requireApprovalUnion: RequireApprovalUnion, +): string { + return JSON.stringify( + RequireApprovalUnion$outboundSchema.parse(requireApprovalUnion), + ); +} +export function requireApprovalUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequireApprovalUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequireApprovalUnion' from JSON`, + ); +} + /** @internal */ export const McpServerTool$inboundSchema: z.ZodType = z .object({ - type: z.literal("mcp"), - server_label: z.string(), - allowed_tools: z.nullable(z.any()).optional(), + allowed_tools: z.nullable( + z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$inboundSchema), + z.any(), + ]), + ).optional(), authorization: z.string().optional(), connector_id: ConnectorId$inboundSchema.optional(), headers: z.nullable(z.record(z.string(), z.string())).optional(), - require_approval: z.nullable(z.any()).optional(), + require_approval: z.nullable( + z.union([ + z.lazy(() => RequireApproval$inboundSchema), + RequireApprovalAlways$inboundSchema, + RequireApprovalNever$inboundSchema, + z.any(), + ]), + ).optional(), server_description: z.string().optional(), + server_label: z.string(), server_url: z.string().optional(), + type: z.literal("mcp"), }).transform((v) => { return remap$(v, { - "server_label": "serverLabel", "allowed_tools": "allowedTools", "connector_id": "connectorId", "require_approval": "requireApproval", "server_description": "serverDescription", + "server_label": "serverLabel", "server_url": "serverUrl", }); }); /** @internal */ export type McpServerTool$Outbound = { - type: "mcp"; - server_label: string; - allowed_tools?: any | null | undefined; + allowed_tools?: + | Array + | AllowedTools$Outbound + | any + | null + | undefined; authorization?: string | undefined; connector_id?: string | undefined; headers?: { [k: string]: string } | null | undefined; - require_approval?: any | null | undefined; + require_approval?: + | RequireApproval$Outbound + | string + | string + | any + | null + | undefined; server_description?: string | undefined; + server_label: string; server_url?: string | undefined; + type: "mcp"; }; /** @internal */ @@ -284,22 +409,35 @@ export const McpServerTool$outboundSchema: z.ZodType< McpServerTool$Outbound, McpServerTool > = z.object({ - type: z.literal("mcp"), - serverLabel: z.string(), - allowedTools: z.nullable(z.any()).optional(), + allowedTools: z.nullable( + z.union([ + z.array(z.string()), + z.lazy(() => AllowedTools$outboundSchema), + z.any(), + ]), + ).optional(), authorization: z.string().optional(), connectorId: ConnectorId$outboundSchema.optional(), headers: z.nullable(z.record(z.string(), z.string())).optional(), - requireApproval: z.nullable(z.any()).optional(), + requireApproval: z.nullable( + z.union([ + z.lazy(() => RequireApproval$outboundSchema), + RequireApprovalAlways$outboundSchema, + RequireApprovalNever$outboundSchema, + z.any(), + ]), + ).optional(), serverDescription: z.string().optional(), + serverLabel: z.string(), serverUrl: z.string().optional(), + type: z.literal("mcp"), }).transform((v) => { return remap$(v, { - serverLabel: "server_label", allowedTools: "allowed_tools", connectorId: "connector_id", requireApproval: "require_approval", serverDescription: "server_description", + serverLabel: "server_label", serverUrl: "server_url", }); }); diff --git a/src/models/memberassignment.ts b/src/models/memberassignment.ts new file mode 100644 index 00000000..5b4e0986 --- /dev/null +++ b/src/models/memberassignment.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5e100b48823e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type MemberAssignment = { + /** + * User ID of who made the assignment + */ + assignedBy: string | null; + /** + * ISO 8601 timestamp of when the assignment was created + */ + createdAt: string; + /** + * ID of the guardrail + */ + guardrailId: string; + /** + * Unique identifier for the assignment + */ + id: string; + /** + * Organization ID + */ + organizationId: string; + /** + * Clerk user ID of the assigned member + */ + userId: string; +}; + +/** @internal */ +export const MemberAssignment$inboundSchema: z.ZodType< + MemberAssignment, + unknown +> = z.object({ + assigned_by: z.nullable(z.string()), + created_at: z.string(), + guardrail_id: z.string(), + id: z.string(), + organization_id: z.string(), + user_id: z.string(), +}).transform((v) => { + return remap$(v, { + "assigned_by": "assignedBy", + "created_at": "createdAt", + "guardrail_id": "guardrailId", + "organization_id": "organizationId", + "user_id": "userId", + }); +}); + +export function memberAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MemberAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MemberAssignment' from JSON`, + ); +} diff --git a/src/models/model.ts b/src/models/model.ts index 35c99ed0..2bc4d258 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -16,6 +16,7 @@ import { ModelArchitecture, ModelArchitecture$inboundSchema, } from "./modelarchitecture.js"; +import { ModelLinks, ModelLinks$inboundSchema } from "./modellinks.js"; import { Parameter, Parameter$inboundSchema } from "./parameter.js"; import { PerRequestLimits, @@ -32,95 +33,100 @@ import { */ export type Model = { /** - * Unique identifier for the model + * Model architecture information */ - id: string; + architecture: ModelArchitecture; /** * Canonical slug for the model */ canonicalSlug: string; /** - * Hugging Face model identifier, if applicable - */ - huggingFaceId?: string | null | undefined; - /** - * Display name of the model + * Maximum context length in tokens */ - name: string; + contextLength: number; /** * Unix timestamp of when the model was created */ created: number; + /** + * Default parameters for this model + */ + defaultParameters: DefaultParameters | null; /** * Description of the model */ description?: string | undefined; /** - * Pricing information for the model + * The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. */ - pricing: PublicPricing; + expirationDate?: string | null | undefined; /** - * Maximum context length in tokens + * Hugging Face model identifier, if applicable */ - contextLength: number | null; + huggingFaceId?: string | null | undefined; /** - * Model architecture information + * Unique identifier for the model */ - architecture: ModelArchitecture; + id: string; /** - * Information about the top provider for this model + * The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. */ - topProvider: TopProviderInfo; + knowledgeCutoff?: string | null | undefined; /** - * Per-request token limits + * Related API endpoints and resources for this model. */ - perRequestLimits: PerRequestLimits | null; + links: ModelLinks; /** - * List of supported parameters for this model + * Display name of the model */ - supportedParameters: Array; + name: string; /** - * Default parameters for this model + * Per-request token limits */ - defaultParameters: DefaultParameters | null; + perRequestLimits: PerRequestLimits | null; /** - * The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. + * Pricing information for the model */ - knowledgeCutoff?: string | null | undefined; + pricing: PublicPricing; /** - * The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. + * List of supported parameters for this model */ - expirationDate?: string | null | undefined; + supportedParameters: Array; + /** + * Information about the top provider for this model + */ + topProvider: TopProviderInfo; }; /** @internal */ export const Model$inboundSchema: z.ZodType = z.object({ - id: z.string(), + architecture: ModelArchitecture$inboundSchema, canonical_slug: z.string(), + context_length: z.int(), + created: z.int(), + default_parameters: z.nullable(DefaultParameters$inboundSchema), + description: z.string().optional(), + expiration_date: z.nullable(z.string()).optional(), hugging_face_id: z.nullable(z.string()).optional(), + id: z.string(), + knowledge_cutoff: z.nullable(z.string()).optional(), + links: ModelLinks$inboundSchema, name: z.string(), - created: z.number(), - description: z.string().optional(), - pricing: PublicPricing$inboundSchema, - context_length: z.nullable(z.number()), - architecture: ModelArchitecture$inboundSchema, - top_provider: TopProviderInfo$inboundSchema, per_request_limits: z.nullable(PerRequestLimits$inboundSchema), + pricing: PublicPricing$inboundSchema, supported_parameters: z.array(Parameter$inboundSchema), - default_parameters: z.nullable(DefaultParameters$inboundSchema), - knowledge_cutoff: z.nullable(z.string()).optional(), - expiration_date: z.nullable(z.string()).optional(), + top_provider: TopProviderInfo$inboundSchema, }).transform((v) => { return remap$(v, { "canonical_slug": "canonicalSlug", - "hugging_face_id": "huggingFaceId", "context_length": "contextLength", - "top_provider": "topProvider", - "per_request_limits": "perRequestLimits", - "supported_parameters": "supportedParameters", "default_parameters": "defaultParameters", - "knowledge_cutoff": "knowledgeCutoff", "expiration_date": "expirationDate", + "hugging_face_id": "huggingFaceId", + "knowledge_cutoff": "knowledgeCutoff", + "per_request_limits": "perRequestLimits", + "supported_parameters": "supportedParameters", + "top_provider": "topProvider", }); }); diff --git a/src/models/modelarchitecture.ts b/src/models/modelarchitecture.ts index 7b404df1..9afd6042 100644 --- a/src/models/modelarchitecture.ts +++ b/src/models/modelarchitecture.ts @@ -56,9 +56,9 @@ export type ModelArchitectureInstructType = OpenEnum< */ export type ModelArchitecture = { /** - * Tokenizer type used by the model + * Supported input modalities */ - tokenizer?: ModelGroup | undefined; + inputModalities: Array; /** * Instruction format type */ @@ -67,14 +67,14 @@ export type ModelArchitecture = { * Primary modality of the model */ modality: string | null; - /** - * Supported input modalities - */ - inputModalities: Array; /** * Supported output modalities */ outputModalities: Array; + /** + * Tokenizer type used by the model + */ + tokenizer?: ModelGroup | undefined; }; /** @internal */ @@ -88,16 +88,16 @@ export const ModelArchitecture$inboundSchema: z.ZodType< ModelArchitecture, unknown > = z.object({ - tokenizer: ModelGroup$inboundSchema.optional(), + input_modalities: z.array(InputModality$inboundSchema), instruct_type: z.nullable(ModelArchitectureInstructType$inboundSchema) .optional(), modality: z.nullable(z.string()), - input_modalities: z.array(InputModality$inboundSchema), output_modalities: z.array(OutputModality$inboundSchema), + tokenizer: ModelGroup$inboundSchema.optional(), }).transform((v) => { return remap$(v, { - "instruct_type": "instructType", "input_modalities": "inputModalities", + "instruct_type": "instructType", "output_modalities": "outputModalities", }); }); diff --git a/src/models/modelgroup.ts b/src/models/modelgroup.ts index 9c40d281..c34631d3 100644 --- a/src/models/modelgroup.ts +++ b/src/models/modelgroup.ts @@ -17,6 +17,7 @@ export const ModelGroup = { Gpt: "GPT", Claude: "Claude", Gemini: "Gemini", + Gemma: "Gemma", Grok: "Grok", Cohere: "Cohere", Nova: "Nova", diff --git a/src/models/modellinks.ts b/src/models/modellinks.ts new file mode 100644 index 00000000..dd5fb557 --- /dev/null +++ b/src/models/modellinks.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 965b10bc40c4 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Related API endpoints and resources for this model. + */ +export type ModelLinks = { + /** + * URL for the model details/endpoints API + */ + details: string; +}; + +/** @internal */ +export const ModelLinks$inboundSchema: z.ZodType = z + .object({ + details: z.string(), + }); + +export function modelLinksFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ModelLinks$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ModelLinks' from JSON`, + ); +} diff --git a/src/models/modelscountresponse.ts b/src/models/modelscountresponse.ts index 950a3f92..c511ac5b 100644 --- a/src/models/modelscountresponse.ts +++ b/src/models/modelscountresponse.ts @@ -30,7 +30,7 @@ export type ModelsCountResponse = { /** @internal */ export const Data$inboundSchema: z.ZodType = z.object({ - count: z.number(), + count: z.int(), }); export function dataFromJSON( diff --git a/src/models/moderationplugin.ts b/src/models/moderationplugin.ts new file mode 100644 index 00000000..276357bd --- /dev/null +++ b/src/models/moderationplugin.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 309bb6cfc394 + */ + +import * as z from "zod/v4"; + +export type ModerationPlugin = { + id: "moderation"; +}; + +/** @internal */ +export type ModerationPlugin$Outbound = { + id: "moderation"; +}; + +/** @internal */ +export const ModerationPlugin$outboundSchema: z.ZodType< + ModerationPlugin$Outbound, + ModerationPlugin +> = z.object({ + id: z.literal("moderation"), +}); + +export function moderationPluginToJSON( + moderationPlugin: ModerationPlugin, +): string { + return JSON.stringify( + ModerationPlugin$outboundSchema.parse(moderationPlugin), + ); +} diff --git a/src/models/openairesponsefunctiontoolcall.ts b/src/models/openairesponsefunctiontoolcall.ts new file mode 100644 index 00000000..05e928b8 --- /dev/null +++ b/src/models/openairesponsefunctiontoolcall.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d27a63e0fb93 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +export const OpenAIResponseFunctionToolCallType = { + FunctionCall: "function_call", +} as const; +export type OpenAIResponseFunctionToolCallType = ClosedEnum< + typeof OpenAIResponseFunctionToolCallType +>; + +export type OpenAIResponseFunctionToolCall = { + arguments: string; + callId: string; + id?: string | undefined; + name: string; + status?: ToolCallStatus | undefined; + type: OpenAIResponseFunctionToolCallType; +}; + +/** @internal */ +export const OpenAIResponseFunctionToolCallType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseFunctionToolCallType +> = z.enum(OpenAIResponseFunctionToolCallType); + +/** @internal */ +export const OpenAIResponseFunctionToolCall$inboundSchema: z.ZodType< + OpenAIResponseFunctionToolCall, + unknown +> = z.object({ + arguments: z.string(), + call_id: z.string(), + id: z.string().optional(), + name: z.string(), + status: ToolCallStatus$inboundSchema.optional(), + type: OpenAIResponseFunctionToolCallType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "call_id": "callId", + }); +}); + +export function openAIResponseFunctionToolCallFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponseFunctionToolCall$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseFunctionToolCall' from JSON`, + ); +} diff --git a/src/models/openairesponsefunctiontoolcalloutput.ts b/src/models/openairesponsefunctiontoolcalloutput.ts new file mode 100644 index 00000000..3854902d --- /dev/null +++ b/src/models/openairesponsefunctiontoolcalloutput.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 78c25d89c63e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; +import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; +import { InputText, InputText$inboundSchema } from "./inputtext.js"; + +export type OpenAIResponseFunctionToolCallOutputOutput1 = + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type">; + +export type OpenAIResponseFunctionToolCallOutputOutput2 = + | string + | Array< + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type"> + >; + +export const OpenAIResponseFunctionToolCallOutputStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type OpenAIResponseFunctionToolCallOutputStatus = OpenEnum< + typeof OpenAIResponseFunctionToolCallOutputStatus +>; + +export const OpenAIResponseFunctionToolCallOutputType = { + FunctionCallOutput: "function_call_output", +} as const; +export type OpenAIResponseFunctionToolCallOutputType = ClosedEnum< + typeof OpenAIResponseFunctionToolCallOutputType +>; + +export type OpenAIResponseFunctionToolCallOutput = { + callId: string; + id?: string | null | undefined; + output: + | string + | Array< + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type"> + >; + status?: OpenAIResponseFunctionToolCallOutputStatus | null | undefined; + type: OpenAIResponseFunctionToolCallOutputType; +}; + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputOutput1$inboundSchema: + z.ZodType = + discriminatedUnion("type", { + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + }); + +export function openAIResponseFunctionToolCallOutputOutput1FromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseFunctionToolCallOutputOutput1, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutputOutput1$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseFunctionToolCallOutputOutput1' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema: + z.ZodType = z.union([ + z.string(), + z.array( + discriminatedUnion("type", { + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + }), + ), + ]); + +export function openAIResponseFunctionToolCallOutputOutput2FromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseFunctionToolCallOutputOutput2, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseFunctionToolCallOutputOutput2' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputStatus$inboundSchema: + z.ZodType = openEnums + .inboundSchema(OpenAIResponseFunctionToolCallOutputStatus); + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutputType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseFunctionToolCallOutputType +> = z.enum(OpenAIResponseFunctionToolCallOutputType); + +/** @internal */ +export const OpenAIResponseFunctionToolCallOutput$inboundSchema: z.ZodType< + OpenAIResponseFunctionToolCallOutput, + unknown +> = z.object({ + call_id: z.string(), + id: z.nullable(z.string()).optional(), + output: z.union([ + z.string(), + z.array( + discriminatedUnion("type", { + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + }), + ), + ]), + status: z.nullable(OpenAIResponseFunctionToolCallOutputStatus$inboundSchema) + .optional(), + type: OpenAIResponseFunctionToolCallOutputType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "call_id": "callId", + }); +}); + +export function openAIResponseFunctionToolCallOutputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenAIResponseFunctionToolCallOutput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseFunctionToolCallOutput' from JSON`, + ); +} diff --git a/src/models/openairesponseinputmessageitem.ts b/src/models/openairesponseinputmessageitem.ts new file mode 100644 index 00000000..96abd109 --- /dev/null +++ b/src/models/openairesponseinputmessageitem.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 67004da2ad5c + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { InputAudio, InputAudio$inboundSchema } from "./inputaudio.js"; +import { InputFile, InputFile$inboundSchema } from "./inputfile.js"; +import { InputImage, InputImage$inboundSchema } from "./inputimage.js"; +import { InputText, InputText$inboundSchema } from "./inputtext.js"; + +export type OpenAIResponseInputMessageItemContent = + | InputAudio + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type">; + +export const OpenAIResponseInputMessageItemRoleDeveloper = { + Developer: "developer", +} as const; +export type OpenAIResponseInputMessageItemRoleDeveloper = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleDeveloper +>; + +export const OpenAIResponseInputMessageItemRoleSystem = { + System: "system", +} as const; +export type OpenAIResponseInputMessageItemRoleSystem = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleSystem +>; + +export const OpenAIResponseInputMessageItemRoleUser = { + User: "user", +} as const; +export type OpenAIResponseInputMessageItemRoleUser = ClosedEnum< + typeof OpenAIResponseInputMessageItemRoleUser +>; + +export type OpenAIResponseInputMessageItemRoleUnion = + | OpenAIResponseInputMessageItemRoleUser + | OpenAIResponseInputMessageItemRoleSystem + | OpenAIResponseInputMessageItemRoleDeveloper; + +export const OpenAIResponseInputMessageItemType = { + Message: "message", +} as const; +export type OpenAIResponseInputMessageItemType = ClosedEnum< + typeof OpenAIResponseInputMessageItemType +>; + +export type OpenAIResponseInputMessageItem = { + content: Array< + | InputAudio + | InputFile + | (InputImage & { type: "input_image" }) + | InputText + | discriminatedUnionTypes.Unknown<"type"> + >; + id: string; + role: + | OpenAIResponseInputMessageItemRoleUser + | OpenAIResponseInputMessageItemRoleSystem + | OpenAIResponseInputMessageItemRoleDeveloper; + type?: OpenAIResponseInputMessageItemType | undefined; +}; + +/** @internal */ +export const OpenAIResponseInputMessageItemContent$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItemContent, + unknown +> = discriminatedUnion("type", { + input_audio: InputAudio$inboundSchema, + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, +}); + +export function openAIResponseInputMessageItemContentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenAIResponseInputMessageItemContent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseInputMessageItemContent' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema: + z.ZodEnum = z.enum( + OpenAIResponseInputMessageItemRoleDeveloper, + ); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleSystem$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemRoleSystem +> = z.enum(OpenAIResponseInputMessageItemRoleSystem); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleUser$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemRoleUser +> = z.enum(OpenAIResponseInputMessageItemRoleUser); + +/** @internal */ +export const OpenAIResponseInputMessageItemRoleUnion$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItemRoleUnion, + unknown +> = z.union([ + OpenAIResponseInputMessageItemRoleUser$inboundSchema, + OpenAIResponseInputMessageItemRoleSystem$inboundSchema, + OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema, +]); + +export function openAIResponseInputMessageItemRoleUnionFromJSON( + jsonString: string, +): SafeParseResult< + OpenAIResponseInputMessageItemRoleUnion, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenAIResponseInputMessageItemRoleUnion$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenAIResponseInputMessageItemRoleUnion' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponseInputMessageItemType$inboundSchema: z.ZodEnum< + typeof OpenAIResponseInputMessageItemType +> = z.enum(OpenAIResponseInputMessageItemType); + +/** @internal */ +export const OpenAIResponseInputMessageItem$inboundSchema: z.ZodType< + OpenAIResponseInputMessageItem, + unknown +> = z.object({ + content: z.array(discriminatedUnion("type", { + input_audio: InputAudio$inboundSchema, + input_file: InputFile$inboundSchema, + input_image: InputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + input_text: InputText$inboundSchema, + })), + id: z.string(), + role: z.union([ + OpenAIResponseInputMessageItemRoleUser$inboundSchema, + OpenAIResponseInputMessageItemRoleSystem$inboundSchema, + OpenAIResponseInputMessageItemRoleDeveloper$inboundSchema, + ]), + type: OpenAIResponseInputMessageItemType$inboundSchema.optional(), +}); + +export function openAIResponseInputMessageItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponseInputMessageItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponseInputMessageItem' from JSON`, + ); +} diff --git a/src/models/openairesponsesannotation.ts b/src/models/openairesponsesannotation.ts index c402006e..d213ed21 100644 --- a/src/models/openairesponsesannotation.ts +++ b/src/models/openairesponsesannotation.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -26,17 +28,21 @@ import { URLCitation$outboundSchema, } from "./urlcitation.js"; -export type OpenAIResponsesAnnotation = FileCitation | URLCitation | FilePath; +export type OpenAIResponsesAnnotation = + | FileCitation + | URLCitation + | FilePath + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const OpenAIResponsesAnnotation$inboundSchema: z.ZodType< OpenAIResponsesAnnotation, unknown -> = z.union([ - FileCitation$inboundSchema, - URLCitation$inboundSchema, - FilePath$inboundSchema, -]); +> = discriminatedUnion("type", { + file_citation: FileCitation$inboundSchema, + url_citation: URLCitation$inboundSchema, + file_path: FilePath$inboundSchema, +}); /** @internal */ export type OpenAIResponsesAnnotation$Outbound = | FileCitation$Outbound diff --git a/src/models/openairesponsesrefusalcontent.ts b/src/models/openairesponsesrefusalcontent.ts index 2252e00a..033073af 100644 --- a/src/models/openairesponsesrefusalcontent.ts +++ b/src/models/openairesponsesrefusalcontent.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type OpenAIResponsesRefusalContent = { - type: "refusal"; refusal: string; + type: "refusal"; }; /** @internal */ @@ -18,13 +18,13 @@ export const OpenAIResponsesRefusalContent$inboundSchema: z.ZodType< OpenAIResponsesRefusalContent, unknown > = z.object({ - type: z.literal("refusal"), refusal: z.string(), + type: z.literal("refusal"), }); /** @internal */ export type OpenAIResponsesRefusalContent$Outbound = { - type: "refusal"; refusal: string; + type: "refusal"; }; /** @internal */ @@ -32,8 +32,8 @@ export const OpenAIResponsesRefusalContent$outboundSchema: z.ZodType< OpenAIResponsesRefusalContent$Outbound, OpenAIResponsesRefusalContent > = z.object({ - type: z.literal("refusal"), refusal: z.string(), + type: z.literal("refusal"), }); export function openAIResponsesRefusalContentToJSON( diff --git a/src/models/openairesponsestoolchoiceunion.ts b/src/models/openairesponsestoolchoiceunion.ts index f35263df..5fbbc337 100644 --- a/src/models/openairesponsestoolchoiceunion.ts +++ b/src/models/openairesponsestoolchoiceunion.ts @@ -8,6 +8,12 @@ import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolChoiceAllowed, + ToolChoiceAllowed$inboundSchema, + ToolChoiceAllowed$Outbound, + ToolChoiceAllowed$outboundSchema, +} from "./toolchoiceallowed.js"; export const OpenAIResponsesToolChoiceTypeWebSearchPreview = { WebSearchPreview: "web_search_preview", @@ -41,8 +47,8 @@ export type OpenAIResponsesToolChoiceTypeFunction = ClosedEnum< >; export type OpenAIResponsesToolChoiceFunction = { - type: OpenAIResponsesToolChoiceTypeFunction; name: string; + type: OpenAIResponsesToolChoiceTypeFunction; }; export const OpenAIResponsesToolChoiceRequired = { @@ -67,6 +73,7 @@ export type OpenAIResponsesToolChoiceAuto = ClosedEnum< >; export type OpenAIResponsesToolChoiceUnion = + | ToolChoiceAllowed | OpenAIResponsesToolChoiceFunction | OpenAIResponsesToolChoice | OpenAIResponsesToolChoiceAuto @@ -176,13 +183,13 @@ export const OpenAIResponsesToolChoiceFunction$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceFunction, unknown > = z.object({ - type: OpenAIResponsesToolChoiceTypeFunction$inboundSchema, name: z.string(), + type: OpenAIResponsesToolChoiceTypeFunction$inboundSchema, }); /** @internal */ export type OpenAIResponsesToolChoiceFunction$Outbound = { - type: string; name: string; + type: string; }; /** @internal */ @@ -190,8 +197,8 @@ export const OpenAIResponsesToolChoiceFunction$outboundSchema: z.ZodType< OpenAIResponsesToolChoiceFunction$Outbound, OpenAIResponsesToolChoiceFunction > = z.object({ - type: OpenAIResponsesToolChoiceTypeFunction$outboundSchema, name: z.string(), + type: OpenAIResponsesToolChoiceTypeFunction$outboundSchema, }); export function openAIResponsesToolChoiceFunctionToJSON( @@ -245,6 +252,7 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceUnion, unknown > = z.union([ + ToolChoiceAllowed$inboundSchema, z.lazy(() => OpenAIResponsesToolChoiceFunction$inboundSchema), z.lazy(() => OpenAIResponsesToolChoice$inboundSchema), OpenAIResponsesToolChoiceAuto$inboundSchema, @@ -253,6 +261,7 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< ]); /** @internal */ export type OpenAIResponsesToolChoiceUnion$Outbound = + | ToolChoiceAllowed$Outbound | OpenAIResponsesToolChoiceFunction$Outbound | OpenAIResponsesToolChoice$Outbound | string @@ -264,6 +273,7 @@ export const OpenAIResponsesToolChoiceUnion$outboundSchema: z.ZodType< OpenAIResponsesToolChoiceUnion$Outbound, OpenAIResponsesToolChoiceUnion > = z.union([ + ToolChoiceAllowed$outboundSchema, z.lazy(() => OpenAIResponsesToolChoiceFunction$outboundSchema), z.lazy(() => OpenAIResponsesToolChoice$outboundSchema), OpenAIResponsesToolChoiceAuto$outboundSchema, diff --git a/src/models/openresponsescreatedevent.ts b/src/models/openresponsescreatedevent.ts new file mode 100644 index 00000000..0d20b643 --- /dev/null +++ b/src/models/openresponsescreatedevent.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e65287120d25 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is created + */ +export type OpenResponsesCreatedEvent = { + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; + type: "response.created"; +}; + +/** @internal */ +export const OpenResponsesCreatedEvent$inboundSchema: z.ZodType< + OpenResponsesCreatedEvent, + unknown +> = z.object({ + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), + type: z.literal("response.created"), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesCreatedEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesCreatedEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesCreatedEvent' from JSON`, + ); +} diff --git a/src/models/openresponsesinprogressevent.ts b/src/models/openresponsesinprogressevent.ts new file mode 100644 index 00000000..36490741 --- /dev/null +++ b/src/models/openresponsesinprogressevent.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 44b1a23df5d5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is in progress + */ +export type OpenResponsesInProgressEvent = { + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; + type: "response.in_progress"; +}; + +/** @internal */ +export const OpenResponsesInProgressEvent$inboundSchema: z.ZodType< + OpenResponsesInProgressEvent, + unknown +> = z.object({ + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), + type: z.literal("response.in_progress"), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesInProgressEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesInProgressEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesInProgressEvent' from JSON`, + ); +} diff --git a/src/models/openresponsesresult.ts b/src/models/openresponsesresult.ts index f7a44e09..e2e48a9a 100644 --- a/src/models/openresponsesresult.ts +++ b/src/models/openresponsesresult.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { @@ -81,10 +83,7 @@ import { StoredPromptTemplate$inboundSchema, } from "./storedprompttemplate.js"; import { TextConfig, TextConfig$inboundSchema } from "./textconfig.js"; -import { - TruncationEnum, - TruncationEnum$inboundSchema, -} from "./truncationenum.js"; +import { Truncation, Truncation$inboundSchema } from "./truncation.js"; import { Usage, Usage$inboundSchema } from "./usage.js"; import { WebSearchServerTool, @@ -102,11 +101,11 @@ export type OpenResponsesResultObject = ClosedEnum< * Function tool definition */ export type OpenResponsesResultToolFunction = { - type: "function"; - name: string; description?: string | null | undefined; - strict?: boolean | null | undefined; + name: string; parameters: { [k: string]: any | null } | null; + strict?: boolean | null | undefined; + type: "function"; }; export type OpenResponsesResultToolUnion = @@ -123,44 +122,50 @@ export type OpenResponsesResultToolUnion = | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool - | CustomTool; + | CustomTool + | discriminatedUnionTypes.Unknown<"type">; /** * Complete non-streaming response from the Responses API */ export type OpenResponsesResult = { - id: string; - object: OpenResponsesResultObject; + background?: boolean | null | undefined; + completedAt: number; createdAt: number; - model: string; - status: OpenAIResponsesResponseStatus; - completedAt: number | null; - output: Array; - user?: string | null | undefined; - outputText?: string | undefined; - promptCacheKey?: string | null | undefined; - safetyIdentifier?: string | null | undefined; /** * Error information returned from the API */ error: ResponsesErrorField | null; + frequencyPenalty: number; + id: string; incompleteDetails: IncompleteDetails | null; - /** - * Token usage information for the response - */ - usage?: Usage | null | undefined; - maxToolCalls?: number | null | undefined; - topLogprobs?: number | undefined; - maxOutputTokens?: number | null | undefined; - temperature: number | null; - topP: number | null; - presencePenalty: number | null; - frequencyPenalty: number | null; instructions: BaseInputsUnion | null; + maxOutputTokens?: number | undefined; + maxToolCalls?: number | undefined; /** * 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. */ metadata: { [k: string]: string } | null; + model: string; + object: OpenResponsesResultObject; + output: Array; + outputText?: string | undefined; + parallelToolCalls: boolean; + presencePenalty: number; + previousResponseId?: string | null | undefined; + prompt?: StoredPromptTemplate | null | undefined; + promptCacheKey?: string | null | undefined; + reasoning?: BaseReasoningConfig | null | undefined; + safetyIdentifier?: string | null | undefined; + serviceTier?: string | null | undefined; + status: OpenAIResponsesResponseStatus; + store?: boolean | undefined; + temperature: number; + /** + * Text output configuration including format and verbosity + */ + text?: TextConfig | undefined; + toolChoice: OpenAIResponsesToolChoiceUnion; tools: Array< | OpenResponsesResultToolFunction | PreviewWebSearchServerTool @@ -176,20 +181,16 @@ export type OpenResponsesResult = { | ShellServerTool | ApplyPatchServerTool | CustomTool + | discriminatedUnionTypes.Unknown<"type"> >; - toolChoice: OpenAIResponsesToolChoiceUnion; - parallelToolCalls: boolean; - prompt?: StoredPromptTemplate | null | undefined; - background?: boolean | null | undefined; - previousResponseId?: string | null | undefined; - reasoning?: BaseReasoningConfig | null | undefined; - serviceTier?: string | null | undefined; - store?: boolean | undefined; - truncation?: TruncationEnum | null | undefined; + topLogprobs?: number | undefined; + topP: number; + truncation?: Truncation | null | undefined; /** - * Text output configuration including format and verbosity + * Token usage information for the response */ - text?: TextConfig | undefined; + usage?: Usage | null | undefined; + user?: string | null | undefined; }; /** @internal */ @@ -202,11 +203,11 @@ export const OpenResponsesResultToolFunction$inboundSchema: z.ZodType< OpenResponsesResultToolFunction, unknown > = z.object({ - type: z.literal("function"), - name: z.string(), description: z.nullable(z.string()).optional(), - strict: z.nullable(z.boolean()).optional(), + name: z.string(), parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), + strict: z.nullable(z.boolean()).optional(), + type: z.literal("function"), }); export function openResponsesResultToolFunctionFromJSON( @@ -223,22 +224,23 @@ export function openResponsesResultToolFunctionFromJSON( export const OpenResponsesResultToolUnion$inboundSchema: z.ZodType< OpenResponsesResultToolUnion, unknown -> = z.union([ - z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), - PreviewWebSearchServerTool$inboundSchema, - Preview20250311WebSearchServerTool$inboundSchema, - LegacyWebSearchServerTool$inboundSchema, - WebSearchServerTool$inboundSchema, - FileSearchServerTool$inboundSchema, - ComputerUseServerTool$inboundSchema, - CodeInterpreterServerTool$inboundSchema, - McpServerTool$inboundSchema, - ImageGenerationServerTool$inboundSchema, - CodexLocalShellTool$inboundSchema, - ShellServerTool$inboundSchema, - ApplyPatchServerTool$inboundSchema, - CustomTool$inboundSchema, -]); +> = discriminatedUnion("type", { + function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), + web_search_preview: PreviewWebSearchServerTool$inboundSchema, + web_search_preview_2025_03_11: + Preview20250311WebSearchServerTool$inboundSchema, + web_search: LegacyWebSearchServerTool$inboundSchema, + web_search_2025_08_26: WebSearchServerTool$inboundSchema, + file_search: FileSearchServerTool$inboundSchema, + computer_use_preview: ComputerUseServerTool$inboundSchema, + code_interpreter: CodeInterpreterServerTool$inboundSchema, + mcp: McpServerTool$inboundSchema, + image_generation: ImageGenerationServerTool$inboundSchema, + local_shell: CodexLocalShellTool$inboundSchema, + shell: ShellServerTool$inboundSchema, + apply_patch: ApplyPatchServerTool$inboundSchema, + custom: CustomTool$inboundSchema, +}); export function openResponsesResultToolUnionFromJSON( jsonString: string, @@ -255,75 +257,74 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< OpenResponsesResult, unknown > = z.object({ - id: z.string(), - object: OpenResponsesResultObject$inboundSchema, - created_at: z.number(), - model: z.string(), - status: OpenAIResponsesResponseStatus$inboundSchema, - completed_at: z.nullable(z.number()), - output: z.array(OutputItems$inboundSchema), - user: z.nullable(z.string()).optional(), - output_text: z.string().optional(), - prompt_cache_key: z.nullable(z.string()).optional(), - safety_identifier: z.nullable(z.string()).optional(), + background: z.nullable(z.boolean()).optional(), + completed_at: z.int(), + created_at: z.int(), error: z.nullable(ResponsesErrorField$inboundSchema), + frequency_penalty: z.number(), + id: z.string(), incomplete_details: z.nullable(IncompleteDetails$inboundSchema), - usage: z.nullable(Usage$inboundSchema).optional(), - max_tool_calls: z.nullable(z.number()).optional(), - top_logprobs: z.number().optional(), - max_output_tokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()), - top_p: z.nullable(z.number()), - presence_penalty: z.nullable(z.number()), - frequency_penalty: z.nullable(z.number()), instructions: z.nullable(BaseInputsUnion$inboundSchema), + max_output_tokens: z.int().optional(), + max_tool_calls: z.int().optional(), metadata: z.nullable(z.record(z.string(), z.string())), - tools: z.array( - z.union([ - z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), - PreviewWebSearchServerTool$inboundSchema, - Preview20250311WebSearchServerTool$inboundSchema, - LegacyWebSearchServerTool$inboundSchema, - WebSearchServerTool$inboundSchema, - FileSearchServerTool$inboundSchema, - ComputerUseServerTool$inboundSchema, - CodeInterpreterServerTool$inboundSchema, - McpServerTool$inboundSchema, - ImageGenerationServerTool$inboundSchema, - CodexLocalShellTool$inboundSchema, - ShellServerTool$inboundSchema, - ApplyPatchServerTool$inboundSchema, - CustomTool$inboundSchema, - ]), - ), - tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema, + model: z.string(), + object: OpenResponsesResultObject$inboundSchema, + output: z.array(OutputItems$inboundSchema), + output_text: z.string().optional(), parallel_tool_calls: z.boolean(), - prompt: z.nullable(StoredPromptTemplate$inboundSchema).optional(), - background: z.nullable(z.boolean()).optional(), + presence_penalty: z.number(), previous_response_id: z.nullable(z.string()).optional(), + prompt: z.nullable(StoredPromptTemplate$inboundSchema).optional(), + prompt_cache_key: z.nullable(z.string()).optional(), reasoning: z.nullable(BaseReasoningConfig$inboundSchema).optional(), + safety_identifier: z.nullable(z.string()).optional(), service_tier: z.nullable(z.string()).optional(), + status: OpenAIResponsesResponseStatus$inboundSchema, store: z.boolean().optional(), - truncation: z.nullable(TruncationEnum$inboundSchema).optional(), + temperature: z.number(), text: TextConfig$inboundSchema.optional(), + tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema, + tools: z.array(discriminatedUnion("type", { + function: z.lazy(() => OpenResponsesResultToolFunction$inboundSchema), + web_search_preview: PreviewWebSearchServerTool$inboundSchema, + web_search_preview_2025_03_11: + Preview20250311WebSearchServerTool$inboundSchema, + web_search: LegacyWebSearchServerTool$inboundSchema, + web_search_2025_08_26: WebSearchServerTool$inboundSchema, + file_search: FileSearchServerTool$inboundSchema, + computer_use_preview: ComputerUseServerTool$inboundSchema, + code_interpreter: CodeInterpreterServerTool$inboundSchema, + mcp: McpServerTool$inboundSchema, + image_generation: ImageGenerationServerTool$inboundSchema, + local_shell: CodexLocalShellTool$inboundSchema, + shell: ShellServerTool$inboundSchema, + apply_patch: ApplyPatchServerTool$inboundSchema, + custom: CustomTool$inboundSchema, + })), + top_logprobs: z.int().optional(), + top_p: z.number(), + truncation: z.nullable(Truncation$inboundSchema).optional(), + usage: z.nullable(Usage$inboundSchema).optional(), + user: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { - "created_at": "createdAt", "completed_at": "completedAt", - "output_text": "outputText", - "prompt_cache_key": "promptCacheKey", - "safety_identifier": "safetyIdentifier", + "created_at": "createdAt", + "frequency_penalty": "frequencyPenalty", "incomplete_details": "incompleteDetails", - "max_tool_calls": "maxToolCalls", - "top_logprobs": "topLogprobs", "max_output_tokens": "maxOutputTokens", - "top_p": "topP", - "presence_penalty": "presencePenalty", - "frequency_penalty": "frequencyPenalty", - "tool_choice": "toolChoice", + "max_tool_calls": "maxToolCalls", + "output_text": "outputText", "parallel_tool_calls": "parallelToolCalls", + "presence_penalty": "presencePenalty", "previous_response_id": "previousResponseId", + "prompt_cache_key": "promptCacheKey", + "safety_identifier": "safetyIdentifier", "service_tier": "serviceTier", + "tool_choice": "toolChoice", + "top_logprobs": "topLogprobs", + "top_p": "topP", }); }); diff --git a/src/models/openrouterwebsearchservertool.ts b/src/models/openrouterwebsearchservertool.ts new file mode 100644 index 00000000..8be325a4 --- /dev/null +++ b/src/models/openrouterwebsearchservertool.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4d50f36832ad + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; +import { + WebSearchConfig, + WebSearchConfig$Outbound, + WebSearchConfig$outboundSchema, +} from "./websearchconfig.js"; + +export const OpenRouterWebSearchServerToolType = { + OpenrouterWebSearch: "openrouter:web_search", +} as const; +export type OpenRouterWebSearchServerToolType = ClosedEnum< + typeof OpenRouterWebSearchServerToolType +>; + +/** + * OpenRouter built-in server tool: searches the web for current information + */ +export type OpenRouterWebSearchServerTool = { + parameters?: WebSearchConfig | undefined; + type: OpenRouterWebSearchServerToolType; +}; + +/** @internal */ +export const OpenRouterWebSearchServerToolType$outboundSchema: z.ZodEnum< + typeof OpenRouterWebSearchServerToolType +> = z.enum(OpenRouterWebSearchServerToolType); + +/** @internal */ +export type OpenRouterWebSearchServerTool$Outbound = { + parameters?: WebSearchConfig$Outbound | undefined; + type: string; +}; + +/** @internal */ +export const OpenRouterWebSearchServerTool$outboundSchema: z.ZodType< + OpenRouterWebSearchServerTool$Outbound, + OpenRouterWebSearchServerTool +> = z.object({ + parameters: WebSearchConfig$outboundSchema.optional(), + type: OpenRouterWebSearchServerToolType$outboundSchema, +}); + +export function openRouterWebSearchServerToolToJSON( + openRouterWebSearchServerTool: OpenRouterWebSearchServerTool, +): string { + return JSON.stringify( + OpenRouterWebSearchServerTool$outboundSchema.parse( + openRouterWebSearchServerTool, + ), + ); +} diff --git a/src/models/operations/bulkassignkeystoguardrail.ts b/src/models/operations/bulkassignkeystoguardrail.ts index 30cd72ca..7175498f 100644 --- a/src/models/operations/bulkassignkeystoguardrail.ts +++ b/src/models/operations/bulkassignkeystoguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkAssignKeysToGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkAssignKeysToGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkAssignKeysToGuardrailRequestBody = { - /** - * Array of API key hashes to assign to the guardrail - */ - keyHashes: Array; -}; - export type BulkAssignKeysToGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,53 +53,16 @@ export type BulkAssignKeysToGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkAssignKeysToGuardrailRequestBody; -}; - -/** - * Assignment result - */ -export type BulkAssignKeysToGuardrailResponse = { - /** - * Number of keys successfully assigned - */ - assignedCount: number; + bulkAssignKeysRequest: models.BulkAssignKeysRequest; }; -/** @internal */ -export type BulkAssignKeysToGuardrailRequestBody$Outbound = { - key_hashes: Array; -}; - -/** @internal */ -export const BulkAssignKeysToGuardrailRequestBody$outboundSchema: z.ZodType< - BulkAssignKeysToGuardrailRequestBody$Outbound, - BulkAssignKeysToGuardrailRequestBody -> = z.object({ - keyHashes: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - keyHashes: "key_hashes", - }); -}); - -export function bulkAssignKeysToGuardrailRequestBodyToJSON( - bulkAssignKeysToGuardrailRequestBody: BulkAssignKeysToGuardrailRequestBody, -): string { - return JSON.stringify( - BulkAssignKeysToGuardrailRequestBody$outboundSchema.parse( - bulkAssignKeysToGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkAssignKeysToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkAssignKeysToGuardrailRequestBody$Outbound; + BulkAssignKeysRequest: models.BulkAssignKeysRequest$Outbound; }; /** @internal */ @@ -120,13 +74,11 @@ export const BulkAssignKeysToGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkAssignKeysToGuardrailRequestBody$outboundSchema - ), + bulkAssignKeysRequest: models.BulkAssignKeysRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkAssignKeysRequest: "BulkAssignKeysRequest", }); }); @@ -139,25 +91,3 @@ export function bulkAssignKeysToGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkAssignKeysToGuardrailResponse$inboundSchema: z.ZodType< - BulkAssignKeysToGuardrailResponse, - unknown -> = z.object({ - assigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "assigned_count": "assignedCount", - }); -}); - -export function bulkAssignKeysToGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BulkAssignKeysToGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkAssignKeysToGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkassignmemberstoguardrail.ts b/src/models/operations/bulkassignmemberstoguardrail.ts index f79a061b..0dfdfa26 100644 --- a/src/models/operations/bulkassignmemberstoguardrail.ts +++ b/src/models/operations/bulkassignmemberstoguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkAssignMembersToGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkAssignMembersToGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkAssignMembersToGuardrailRequestBody = { - /** - * Array of member user IDs to assign to the guardrail - */ - memberUserIds: Array; -}; - export type BulkAssignMembersToGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,54 +53,16 @@ export type BulkAssignMembersToGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkAssignMembersToGuardrailRequestBody; -}; - -/** - * Assignment result - */ -export type BulkAssignMembersToGuardrailResponse = { - /** - * Number of members successfully assigned - */ - assignedCount: number; + bulkAssignMembersRequest: models.BulkAssignMembersRequest; }; -/** @internal */ -export type BulkAssignMembersToGuardrailRequestBody$Outbound = { - member_user_ids: Array; -}; - -/** @internal */ -export const BulkAssignMembersToGuardrailRequestBody$outboundSchema: z.ZodType< - BulkAssignMembersToGuardrailRequestBody$Outbound, - BulkAssignMembersToGuardrailRequestBody -> = z.object({ - memberUserIds: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - memberUserIds: "member_user_ids", - }); -}); - -export function bulkAssignMembersToGuardrailRequestBodyToJSON( - bulkAssignMembersToGuardrailRequestBody: - BulkAssignMembersToGuardrailRequestBody, -): string { - return JSON.stringify( - BulkAssignMembersToGuardrailRequestBody$outboundSchema.parse( - bulkAssignMembersToGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkAssignMembersToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkAssignMembersToGuardrailRequestBody$Outbound; + BulkAssignMembersRequest: models.BulkAssignMembersRequest$Outbound; }; /** @internal */ @@ -121,13 +74,11 @@ export const BulkAssignMembersToGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkAssignMembersToGuardrailRequestBody$outboundSchema - ), + bulkAssignMembersRequest: models.BulkAssignMembersRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkAssignMembersRequest: "BulkAssignMembersRequest", }); }); @@ -140,26 +91,3 @@ export function bulkAssignMembersToGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkAssignMembersToGuardrailResponse$inboundSchema: z.ZodType< - BulkAssignMembersToGuardrailResponse, - unknown -> = z.object({ - assigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "assigned_count": "assignedCount", - }); -}); - -export function bulkAssignMembersToGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - BulkAssignMembersToGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkAssignMembersToGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkunassignkeysfromguardrail.ts b/src/models/operations/bulkunassignkeysfromguardrail.ts index ff7e659b..c591218b 100644 --- a/src/models/operations/bulkunassignkeysfromguardrail.ts +++ b/src/models/operations/bulkunassignkeysfromguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkUnassignKeysFromGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkUnassignKeysFromGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkUnassignKeysFromGuardrailRequestBody = { - /** - * Array of API key hashes to unassign from the guardrail - */ - keyHashes: Array; -}; - export type BulkUnassignKeysFromGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,54 +53,16 @@ export type BulkUnassignKeysFromGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkUnassignKeysFromGuardrailRequestBody; -}; - -/** - * Unassignment result - */ -export type BulkUnassignKeysFromGuardrailResponse = { - /** - * Number of keys successfully unassigned - */ - unassignedCount: number; + bulkUnassignKeysRequest: models.BulkUnassignKeysRequest; }; -/** @internal */ -export type BulkUnassignKeysFromGuardrailRequestBody$Outbound = { - key_hashes: Array; -}; - -/** @internal */ -export const BulkUnassignKeysFromGuardrailRequestBody$outboundSchema: z.ZodType< - BulkUnassignKeysFromGuardrailRequestBody$Outbound, - BulkUnassignKeysFromGuardrailRequestBody -> = z.object({ - keyHashes: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - keyHashes: "key_hashes", - }); -}); - -export function bulkUnassignKeysFromGuardrailRequestBodyToJSON( - bulkUnassignKeysFromGuardrailRequestBody: - BulkUnassignKeysFromGuardrailRequestBody, -): string { - return JSON.stringify( - BulkUnassignKeysFromGuardrailRequestBody$outboundSchema.parse( - bulkUnassignKeysFromGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkUnassignKeysFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkUnassignKeysFromGuardrailRequestBody$Outbound; + BulkUnassignKeysRequest: models.BulkUnassignKeysRequest$Outbound; }; /** @internal */ @@ -121,13 +74,11 @@ export const BulkUnassignKeysFromGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkUnassignKeysFromGuardrailRequestBody$outboundSchema - ), + bulkUnassignKeysRequest: models.BulkUnassignKeysRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkUnassignKeysRequest: "BulkUnassignKeysRequest", }); }); @@ -140,26 +91,3 @@ export function bulkUnassignKeysFromGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkUnassignKeysFromGuardrailResponse$inboundSchema: z.ZodType< - BulkUnassignKeysFromGuardrailResponse, - unknown -> = z.object({ - unassigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "unassigned_count": "unassignedCount", - }); -}); - -export function bulkUnassignKeysFromGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - BulkUnassignKeysFromGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BulkUnassignKeysFromGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/bulkunassignmembersfromguardrail.ts b/src/models/operations/bulkunassignmembersfromguardrail.ts index 4533c1ff..de9f7c71 100644 --- a/src/models/operations/bulkunassignmembersfromguardrail.ts +++ b/src/models/operations/bulkunassignmembersfromguardrail.ts @@ -5,9 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type BulkUnassignMembersFromGuardrailGlobals = { /** @@ -31,13 +29,6 @@ export type BulkUnassignMembersFromGuardrailGlobals = { appCategories?: string | undefined; }; -export type BulkUnassignMembersFromGuardrailRequestBody = { - /** - * Array of member user IDs to unassign from the guardrail - */ - memberUserIds: Array; -}; - export type BulkUnassignMembersFromGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -62,55 +53,16 @@ export type BulkUnassignMembersFromGuardrailRequest = { * The unique identifier of the guardrail */ id: string; - requestBody: BulkUnassignMembersFromGuardrailRequestBody; -}; - -/** - * Unassignment result - */ -export type BulkUnassignMembersFromGuardrailResponse = { - /** - * Number of members successfully unassigned - */ - unassignedCount: number; -}; - -/** @internal */ -export type BulkUnassignMembersFromGuardrailRequestBody$Outbound = { - member_user_ids: Array; + bulkUnassignMembersRequest: models.BulkUnassignMembersRequest; }; -/** @internal */ -export const BulkUnassignMembersFromGuardrailRequestBody$outboundSchema: - z.ZodType< - BulkUnassignMembersFromGuardrailRequestBody$Outbound, - BulkUnassignMembersFromGuardrailRequestBody - > = z.object({ - memberUserIds: z.array(z.string()), - }).transform((v) => { - return remap$(v, { - memberUserIds: "member_user_ids", - }); - }); - -export function bulkUnassignMembersFromGuardrailRequestBodyToJSON( - bulkUnassignMembersFromGuardrailRequestBody: - BulkUnassignMembersFromGuardrailRequestBody, -): string { - return JSON.stringify( - BulkUnassignMembersFromGuardrailRequestBody$outboundSchema.parse( - bulkUnassignMembersFromGuardrailRequestBody, - ), - ); -} - /** @internal */ export type BulkUnassignMembersFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: BulkUnassignMembersFromGuardrailRequestBody$Outbound; + BulkUnassignMembersRequest: models.BulkUnassignMembersRequest$Outbound; }; /** @internal */ @@ -122,13 +74,11 @@ export const BulkUnassignMembersFromGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => - BulkUnassignMembersFromGuardrailRequestBody$outboundSchema - ), + bulkUnassignMembersRequest: models.BulkUnassignMembersRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + bulkUnassignMembersRequest: "BulkUnassignMembersRequest", }); }); @@ -142,31 +92,3 @@ export function bulkUnassignMembersFromGuardrailRequestToJSON( ), ); } - -/** @internal */ -export const BulkUnassignMembersFromGuardrailResponse$inboundSchema: z.ZodType< - BulkUnassignMembersFromGuardrailResponse, - unknown -> = z.object({ - unassigned_count: z.number(), -}).transform((v) => { - return remap$(v, { - "unassigned_count": "unassignedCount", - }); -}); - -export function bulkUnassignMembersFromGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult< - BulkUnassignMembersFromGuardrailResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - BulkUnassignMembersFromGuardrailResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'BulkUnassignMembersFromGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts index 86a24a47..cc5964c4 100644 --- a/src/models/operations/createauthkeyscode.ts +++ b/src/models/operations/createauthkeyscode.ts @@ -73,10 +73,6 @@ export type CreateAuthKeysCodeRequestBody = { * The method used to generate the code challenge */ codeChallengeMethod?: CreateAuthKeysCodeCodeChallengeMethod | undefined; - /** - * Credit limit for the API key to be created - */ - limit?: number | undefined; /** * Optional expiration time for the API key to be created */ @@ -85,6 +81,10 @@ export type CreateAuthKeysCodeRequestBody = { * Optional custom label for the API key. Defaults to the app name if not provided. */ keyLabel?: string | undefined; + /** + * Credit limit for the API key to be created + */ + limit?: number | undefined; /** * Optional credit limit reset interval. When set, the credit limit resets on this interval. */ @@ -118,10 +118,6 @@ export type CreateAuthKeysCodeRequest = { * Auth code data */ export type CreateAuthKeysCodeData = { - /** - * The authorization code ID to use in the exchange request - */ - id: string; /** * The application ID associated with this auth code */ @@ -130,6 +126,10 @@ export type CreateAuthKeysCodeData = { * ISO 8601 timestamp of when the auth code was created */ createdAt: string; + /** + * The authorization code ID to use in the exchange request + */ + id: string; }; /** @@ -157,9 +157,9 @@ export type CreateAuthKeysCodeRequestBody$Outbound = { callback_url: string; code_challenge?: string | undefined; code_challenge_method?: string | undefined; - limit?: number | undefined; expires_at?: string | null | undefined; key_label?: string | undefined; + limit?: number | undefined; usage_limit_type?: string | undefined; }; @@ -172,9 +172,9 @@ export const CreateAuthKeysCodeRequestBody$outboundSchema: z.ZodType< codeChallenge: z.string().optional(), codeChallengeMethod: CreateAuthKeysCodeCodeChallengeMethod$outboundSchema .optional(), - limit: z.number().optional(), expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), keyLabel: z.string().optional(), + limit: z.number().optional(), usageLimitType: UsageLimitType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { @@ -234,9 +234,9 @@ export const CreateAuthKeysCodeData$inboundSchema: z.ZodType< CreateAuthKeysCodeData, unknown > = z.object({ - id: z.string(), - app_id: z.number(), + app_id: z.int(), created_at: z.string(), + id: z.string(), }).transform((v) => { return remap$(v, { "app_id": "appId", diff --git a/src/models/operations/createcoinbasecharge.ts b/src/models/operations/createcoinbasecharge.ts deleted file mode 100644 index a2a9035f..00000000 --- a/src/models/operations/createcoinbasecharge.ts +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 1e75ac2debf2 - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as models from "../index.js"; - -export type CreateCoinbaseChargeGlobals = { - /** - * The app identifier should be your app's URL and is used as the primary identifier for rankings. - * - * @remarks - * This is used to track API usage per application. - */ - httpReferer?: string | undefined; - /** - * The app display name allows you to customize how your app appears in OpenRouter's dashboard. - * - * @remarks - */ - appTitle?: string | undefined; - /** - * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - * - * @remarks - */ - appCategories?: string | undefined; -}; - -export type CreateCoinbaseChargeSecurity = { - bearer: string; -}; - -export type CreateCoinbaseChargeRequest = { - /** - * The app identifier should be your app's URL and is used as the primary identifier for rankings. - * - * @remarks - * This is used to track API usage per application. - */ - httpReferer?: string | undefined; - /** - * The app display name allows you to customize how your app appears in OpenRouter's dashboard. - * - * @remarks - */ - appTitle?: string | undefined; - /** - * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. - * - * @remarks - */ - appCategories?: string | undefined; - createChargeRequest: models.CreateChargeRequest; -}; - -export type CallData = { - deadline: string; - feeAmount: string; - id: string; - operator: string; - prefix: string; - recipient: string; - recipientAmount: string; - recipientCurrency: string; - refundDestination: string; - signature: string; -}; - -export type Metadata = { - chainId: number; - contractAddress: string; - sender: string; -}; - -export type TransferIntent = { - callData: CallData; - metadata: Metadata; -}; - -export type Web3Data = { - transferIntent: TransferIntent; -}; - -export type CreateCoinbaseChargeData = { - id: string; - createdAt: string; - expiresAt: string; - web3Data: Web3Data; -}; - -/** - * Returns the calldata to fulfill the transaction - */ -export type CreateCoinbaseChargeResponse = { - data: CreateCoinbaseChargeData; -}; - -/** @internal */ -export type CreateCoinbaseChargeSecurity$Outbound = { - bearer: string; -}; - -/** @internal */ -export const CreateCoinbaseChargeSecurity$outboundSchema: z.ZodType< - CreateCoinbaseChargeSecurity$Outbound, - CreateCoinbaseChargeSecurity -> = z.object({ - bearer: z.string(), -}); - -export function createCoinbaseChargeSecurityToJSON( - createCoinbaseChargeSecurity: CreateCoinbaseChargeSecurity, -): string { - return JSON.stringify( - CreateCoinbaseChargeSecurity$outboundSchema.parse( - createCoinbaseChargeSecurity, - ), - ); -} - -/** @internal */ -export type CreateCoinbaseChargeRequest$Outbound = { - "HTTP-Referer"?: string | undefined; - appTitle?: string | undefined; - appCategories?: string | undefined; - CreateChargeRequest: models.CreateChargeRequest$Outbound; -}; - -/** @internal */ -export const CreateCoinbaseChargeRequest$outboundSchema: z.ZodType< - CreateCoinbaseChargeRequest$Outbound, - CreateCoinbaseChargeRequest -> = z.object({ - httpReferer: z.string().optional(), - appTitle: z.string().optional(), - appCategories: z.string().optional(), - createChargeRequest: models.CreateChargeRequest$outboundSchema, -}).transform((v) => { - return remap$(v, { - httpReferer: "HTTP-Referer", - createChargeRequest: "CreateChargeRequest", - }); -}); - -export function createCoinbaseChargeRequestToJSON( - createCoinbaseChargeRequest: CreateCoinbaseChargeRequest, -): string { - return JSON.stringify( - CreateCoinbaseChargeRequest$outboundSchema.parse( - createCoinbaseChargeRequest, - ), - ); -} - -/** @internal */ -export const CallData$inboundSchema: z.ZodType = z.object({ - deadline: z.string(), - fee_amount: z.string(), - id: z.string(), - operator: z.string(), - prefix: z.string(), - recipient: z.string(), - recipient_amount: z.string(), - recipient_currency: z.string(), - refund_destination: z.string(), - signature: z.string(), -}).transform((v) => { - return remap$(v, { - "fee_amount": "feeAmount", - "recipient_amount": "recipientAmount", - "recipient_currency": "recipientCurrency", - "refund_destination": "refundDestination", - }); -}); - -export function callDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CallData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CallData' from JSON`, - ); -} - -/** @internal */ -export const Metadata$inboundSchema: z.ZodType = z.object({ - chain_id: z.number(), - contract_address: z.string(), - sender: z.string(), -}).transform((v) => { - return remap$(v, { - "chain_id": "chainId", - "contract_address": "contractAddress", - }); -}); - -export function metadataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Metadata$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Metadata' from JSON`, - ); -} - -/** @internal */ -export const TransferIntent$inboundSchema: z.ZodType = - z.object({ - call_data: z.lazy(() => CallData$inboundSchema), - metadata: z.lazy(() => Metadata$inboundSchema), - }).transform((v) => { - return remap$(v, { - "call_data": "callData", - }); - }); - -export function transferIntentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransferIntent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransferIntent' from JSON`, - ); -} - -/** @internal */ -export const Web3Data$inboundSchema: z.ZodType = z.object({ - transfer_intent: z.lazy(() => TransferIntent$inboundSchema), -}).transform((v) => { - return remap$(v, { - "transfer_intent": "transferIntent", - }); -}); - -export function web3DataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Web3Data$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Web3Data' from JSON`, - ); -} - -/** @internal */ -export const CreateCoinbaseChargeData$inboundSchema: z.ZodType< - CreateCoinbaseChargeData, - unknown -> = z.object({ - id: z.string(), - created_at: z.string(), - expires_at: z.string(), - web3_data: z.lazy(() => Web3Data$inboundSchema), -}).transform((v) => { - return remap$(v, { - "created_at": "createdAt", - "expires_at": "expiresAt", - "web3_data": "web3Data", - }); -}); - -export function createCoinbaseChargeDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCoinbaseChargeData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCoinbaseChargeData' from JSON`, - ); -} - -/** @internal */ -export const CreateCoinbaseChargeResponse$inboundSchema: z.ZodType< - CreateCoinbaseChargeResponse, - unknown -> = z.object({ - data: z.lazy(() => CreateCoinbaseChargeData$inboundSchema), -}); - -export function createCoinbaseChargeResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCoinbaseChargeResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCoinbaseChargeResponse' from JSON`, - ); -} diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index 6664d9fe..5c36e3bc 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -34,18 +34,30 @@ export type CreateEmbeddingsGlobals = { appCategories?: string | undefined; }; +/** + * The format of the output embeddings + */ +export const EncodingFormat = { + Float: "float", + Base64: "base64", +} as const; +/** + * The format of the output embeddings + */ +export type EncodingFormat = OpenEnum; + export type ImageUrl = { url: string; }; export type ContentImageURL = { - type: "image_url"; imageUrl: ImageUrl; + type: "image_url"; }; export type ContentText = { - type: "text"; text: string; + type: "text"; }; export type Content = ContentText | ContentImageURL; @@ -54,6 +66,9 @@ export type Input = { content: Array; }; +/** + * Text, token, or multimodal input(s) to embed + */ export type InputUnion = | string | Array @@ -61,28 +76,40 @@ export type InputUnion = | Array> | Array; -export const EncodingFormat = { - Float: "float", - Base64: "base64", -} as const; -export type EncodingFormat = OpenEnum; - +/** + * Embeddings request input + */ export type CreateEmbeddingsRequestBody = { + /** + * The number of dimensions for the output embeddings + */ + dimensions?: number | undefined; + /** + * The format of the output embeddings + */ + encodingFormat?: EncodingFormat | undefined; + /** + * Text, token, or multimodal input(s) to embed + */ input: | string | Array | Array | Array> | Array; - model: string; - encodingFormat?: EncodingFormat | undefined; - dimensions?: number | undefined; - user?: string | undefined; /** - * Provider routing preferences for the request. + * The type of input (e.g. search_query, search_document) */ - provider?: models.ProviderPreferences | undefined; inputType?: string | undefined; + /** + * The model to use for embeddings + */ + model: string; + provider?: models.ProviderPreferences | null | undefined; + /** + * A unique identifier for the end-user + */ + user?: string | undefined; }; export type CreateEmbeddingsRequest = { @@ -108,43 +135,83 @@ export type CreateEmbeddingsRequest = { requestBody: CreateEmbeddingsRequestBody; }; -export const ObjectT = { - List: "list", -} as const; -export type ObjectT = ClosedEnum; +/** + * Embedding vector as an array of floats or a base64 string + */ +export type Embedding = Array | string; export const ObjectEmbedding = { Embedding: "embedding", } as const; export type ObjectEmbedding = ClosedEnum; -export type Embedding = Array | string; - +/** + * A single embedding object + */ export type CreateEmbeddingsData = { - object: ObjectEmbedding; + /** + * Embedding vector as an array of floats or a base64 string + */ embedding: Array | string; + /** + * Index of the embedding in the input list + */ index?: number | undefined; + object: ObjectEmbedding; }; -export type Usage = { +export const ObjectT = { + List: "list", +} as const; +export type ObjectT = ClosedEnum; + +/** + * Token usage statistics + */ +export type CreateEmbeddingsUsage = { + /** + * Cost of the request in credits + */ + cost?: number | undefined; + /** + * Number of tokens in the input + */ promptTokens: number; + /** + * Total number of tokens used + */ totalTokens: number; - cost?: number | undefined; }; /** - * Embedding response + * Embeddings response containing embedding vectors */ export type CreateEmbeddingsResponseBody = { - id?: string | undefined; - object: ObjectT; + /** + * List of embedding objects + */ data: Array; + /** + * Unique identifier for the embeddings response + */ + id?: string | undefined; + /** + * The model used for embeddings + */ model: string; - usage?: Usage | undefined; + object: ObjectT; + /** + * Token usage statistics + */ + usage?: CreateEmbeddingsUsage | undefined; }; export type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string; +/** @internal */ +export const EncodingFormat$outboundSchema: z.ZodType = + openEnums.outboundSchema(EncodingFormat); + /** @internal */ export type ImageUrl$Outbound = { url: string; @@ -162,8 +229,8 @@ export function imageUrlToJSON(imageUrl: ImageUrl): string { /** @internal */ export type ContentImageURL$Outbound = { - type: "image_url"; image_url: ImageUrl$Outbound; + type: "image_url"; }; /** @internal */ @@ -171,8 +238,8 @@ export const ContentImageURL$outboundSchema: z.ZodType< ContentImageURL$Outbound, ContentImageURL > = z.object({ - type: z.literal("image_url"), imageUrl: z.lazy(() => ImageUrl$outboundSchema), + type: z.literal("image_url"), }).transform((v) => { return remap$(v, { imageUrl: "image_url", @@ -187,8 +254,8 @@ export function contentImageURLToJSON( /** @internal */ export type ContentText$Outbound = { - type: "text"; text: string; + type: "text"; }; /** @internal */ @@ -196,8 +263,8 @@ export const ContentText$outboundSchema: z.ZodType< ContentText$Outbound, ContentText > = z.object({ - type: z.literal("text"), text: z.string(), + type: z.literal("text"), }); export function contentTextToJSON(contentText: ContentText): string { @@ -261,24 +328,20 @@ export function inputUnionToJSON(inputUnion: InputUnion): string { return JSON.stringify(InputUnion$outboundSchema.parse(inputUnion)); } -/** @internal */ -export const EncodingFormat$outboundSchema: z.ZodType = - openEnums.outboundSchema(EncodingFormat); - /** @internal */ export type CreateEmbeddingsRequestBody$Outbound = { + dimensions?: number | undefined; + encoding_format?: string | undefined; input: | string | Array | Array | Array> | Array; + input_type?: string | undefined; model: string; - encoding_format?: string | undefined; - dimensions?: number | undefined; + provider?: models.ProviderPreferences$Outbound | null | undefined; user?: string | undefined; - provider?: models.ProviderPreferences$Outbound | undefined; - input_type?: string | undefined; }; /** @internal */ @@ -286,6 +349,8 @@ export const CreateEmbeddingsRequestBody$outboundSchema: z.ZodType< CreateEmbeddingsRequestBody$Outbound, CreateEmbeddingsRequestBody > = z.object({ + dimensions: z.int().optional(), + encodingFormat: EncodingFormat$outboundSchema.optional(), input: z.union([ z.string(), z.array(z.string()), @@ -293,12 +358,10 @@ export const CreateEmbeddingsRequestBody$outboundSchema: z.ZodType< z.array(z.array(z.number())), z.array(z.lazy(() => Input$outboundSchema)), ]), + inputType: z.string().optional(), model: z.string(), - encodingFormat: EncodingFormat$outboundSchema.optional(), - dimensions: z.int().optional(), + provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(), user: z.string().optional(), - provider: models.ProviderPreferences$outboundSchema.optional(), - inputType: z.string().optional(), }).transform((v) => { return remap$(v, { encodingFormat: "encoding_format", @@ -348,13 +411,6 @@ export function createEmbeddingsRequestToJSON( ); } -/** @internal */ -export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); - -/** @internal */ -export const ObjectEmbedding$inboundSchema: z.ZodEnum = - z.enum(ObjectEmbedding); - /** @internal */ export const Embedding$inboundSchema: z.ZodType = z.union([ z.array(z.number()), @@ -371,14 +427,18 @@ export function embeddingFromJSON( ); } +/** @internal */ +export const ObjectEmbedding$inboundSchema: z.ZodEnum = + z.enum(ObjectEmbedding); + /** @internal */ export const CreateEmbeddingsData$inboundSchema: z.ZodType< CreateEmbeddingsData, unknown > = z.object({ - object: ObjectEmbedding$inboundSchema, embedding: z.union([z.array(z.number()), z.string()]), - index: z.number().optional(), + index: z.int().optional(), + object: ObjectEmbedding$inboundSchema, }); export function createEmbeddingsDataFromJSON( @@ -392,10 +452,16 @@ export function createEmbeddingsDataFromJSON( } /** @internal */ -export const Usage$inboundSchema: z.ZodType = z.object({ - prompt_tokens: z.number(), - total_tokens: z.number(), +export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); + +/** @internal */ +export const CreateEmbeddingsUsage$inboundSchema: z.ZodType< + CreateEmbeddingsUsage, + unknown +> = z.object({ cost: z.number().optional(), + prompt_tokens: z.int(), + total_tokens: z.int(), }).transform((v) => { return remap$(v, { "prompt_tokens": "promptTokens", @@ -403,13 +469,13 @@ export const Usage$inboundSchema: z.ZodType = z.object({ }); }); -export function usageFromJSON( +export function createEmbeddingsUsageFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Usage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Usage' from JSON`, + (x) => CreateEmbeddingsUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEmbeddingsUsage' from JSON`, ); } @@ -418,11 +484,11 @@ export const CreateEmbeddingsResponseBody$inboundSchema: z.ZodType< CreateEmbeddingsResponseBody, unknown > = z.object({ - id: z.string().optional(), - object: ObjectT$inboundSchema, data: z.array(z.lazy(() => CreateEmbeddingsData$inboundSchema)), + id: z.string().optional(), model: z.string(), - usage: z.lazy(() => Usage$inboundSchema).optional(), + object: ObjectT$inboundSchema, + usage: z.lazy(() => CreateEmbeddingsUsage$inboundSchema).optional(), }); export function createEmbeddingsResponseBodyFromJSON( diff --git a/src/models/operations/createguardrail.ts b/src/models/operations/createguardrail.ts index 43a73411..2a170162 100644 --- a/src/models/operations/createguardrail.ts +++ b/src/models/operations/createguardrail.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type CreateGuardrailGlobals = { /** @@ -33,56 +29,6 @@ export type CreateGuardrailGlobals = { appCategories?: string | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const CreateGuardrailResetIntervalRequest = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type CreateGuardrailResetIntervalRequest = OpenEnum< - typeof CreateGuardrailResetIntervalRequest ->; - -export type CreateGuardrailRequestBody = { - /** - * Name for the new guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: CreateGuardrailResetIntervalRequest | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model identifiers (slug or canonical_slug accepted) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; -}; - export type CreateGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -103,141 +49,15 @@ export type CreateGuardrailRequest = { * @remarks */ appCategories?: string | undefined; - requestBody: CreateGuardrailRequestBody; -}; - -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const CreateGuardrailResetIntervalResponse = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type CreateGuardrailResetIntervalResponse = OpenEnum< - typeof CreateGuardrailResetIntervalResponse ->; - -/** - * The created guardrail - */ -export type CreateGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: CreateGuardrailResetIntervalResponse | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail created successfully - */ -export type CreateGuardrailResponse = { - /** - * The created guardrail - */ - data: CreateGuardrailData; + createGuardrailRequest: models.CreateGuardrailRequest; }; -/** @internal */ -export const CreateGuardrailResetIntervalRequest$outboundSchema: z.ZodType< - string, - CreateGuardrailResetIntervalRequest -> = openEnums.outboundSchema(CreateGuardrailResetIntervalRequest); - -/** @internal */ -export type CreateGuardrailRequestBody$Outbound = { - name: string; - description?: string | null | undefined; - limit_usd?: number | null | undefined; - reset_interval?: string | null | undefined; - allowed_providers?: Array | null | undefined; - ignored_providers?: Array | null | undefined; - allowed_models?: Array | null | undefined; - enforce_zdr?: boolean | null | undefined; -}; - -/** @internal */ -export const CreateGuardrailRequestBody$outboundSchema: z.ZodType< - CreateGuardrailRequestBody$Outbound, - CreateGuardrailRequestBody -> = z.object({ - name: z.string(), - description: z.nullable(z.string()).optional(), - limitUsd: z.nullable(z.number()).optional(), - resetInterval: z.nullable(CreateGuardrailResetIntervalRequest$outboundSchema) - .optional(), - allowedProviders: z.nullable(z.array(z.string())).optional(), - ignoredProviders: z.nullable(z.array(z.string())).optional(), - allowedModels: z.nullable(z.array(z.string())).optional(), - enforceZdr: z.nullable(z.boolean()).optional(), -}).transform((v) => { - return remap$(v, { - limitUsd: "limit_usd", - resetInterval: "reset_interval", - allowedProviders: "allowed_providers", - ignoredProviders: "ignored_providers", - allowedModels: "allowed_models", - enforceZdr: "enforce_zdr", - }); -}); - -export function createGuardrailRequestBodyToJSON( - createGuardrailRequestBody: CreateGuardrailRequestBody, -): string { - return JSON.stringify( - CreateGuardrailRequestBody$outboundSchema.parse(createGuardrailRequestBody), - ); -} - /** @internal */ export type CreateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - RequestBody: CreateGuardrailRequestBody$Outbound; + CreateGuardrailRequest: models.CreateGuardrailRequest$Outbound; }; /** @internal */ @@ -248,11 +68,11 @@ export const CreateGuardrailRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - requestBody: z.lazy(() => CreateGuardrailRequestBody$outboundSchema), + createGuardrailRequest: models.CreateGuardrailRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + createGuardrailRequest: "CreateGuardrailRequest", }); }); @@ -263,67 +83,3 @@ export function createGuardrailRequestToJSON( CreateGuardrailRequest$outboundSchema.parse(createGuardrailRequest), ); } - -/** @internal */ -export const CreateGuardrailResetIntervalResponse$inboundSchema: z.ZodType< - CreateGuardrailResetIntervalResponse, - unknown -> = openEnums.inboundSchema(CreateGuardrailResetIntervalResponse); - -/** @internal */ -export const CreateGuardrailData$inboundSchema: z.ZodType< - CreateGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(CreateGuardrailResetIntervalResponse$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function createGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const CreateGuardrailResponse$inboundSchema: z.ZodType< - CreateGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => CreateGuardrailData$inboundSchema), -}); - -export function createGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/createkeys.ts b/src/models/operations/createkeys.ts index c9a39606..d8a4da0d 100644 --- a/src/models/operations/createkeys.ts +++ b/src/models/operations/createkeys.ts @@ -48,25 +48,29 @@ export type CreateKeysLimitReset = OpenEnum; export type CreateKeysRequestBody = { /** - * Name for the new API key + * Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. */ - name: string; + creatorUserId?: string | null | undefined; + /** + * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected + */ + expiresAt?: Date | null | undefined; + /** + * Whether to include BYOK usage in the limit + */ + includeByokInLimit?: boolean | undefined; /** * Optional spending limit for the API key in USD */ - limit?: number | null | undefined; + limit?: number | undefined; /** * 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. */ limitReset?: CreateKeysLimitReset | null | undefined; /** - * Whether to include BYOK usage in the limit - */ - includeByokInLimit?: boolean | undefined; - /** - * Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected + * Name for the new API key */ - expiresAt?: Date | null | undefined; + name: string; }; export type CreateKeysRequest = { @@ -97,85 +101,85 @@ export type CreateKeysRequest = { */ export type CreateKeysData = { /** - * Unique hash identifier for the API key + * Total external BYOK usage (in USD) for the API key */ - hash: string; + byokUsage: number; /** - * Name of the API key + * External BYOK usage (in USD) for the current UTC day */ - name: string; + byokUsageDaily: number; /** - * Human-readable label for the API key + * External BYOK usage (in USD) for current UTC month */ - label: string; + byokUsageMonthly: number; /** - * Whether the API key is disabled + * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) */ - disabled: boolean; + byokUsageWeekly: number; /** - * Spending limit for the API key in USD + * ISO 8601 timestamp of when the API key was created */ - limit: number | null; + createdAt: string; /** - * Remaining spending limit in USD + * 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. */ - limitRemaining: number | null; + creatorUserId: string | null; /** - * Type of limit reset for the API key + * Whether the API key is disabled */ - limitReset: string | null; + disabled: boolean; /** - * Whether to include external BYOK usage in the credit limit + * ISO 8601 UTC timestamp when the API key expires, or null if no expiration */ - includeByokInLimit: boolean; + expiresAt?: Date | null | undefined; /** - * Total OpenRouter credit usage (in USD) for the API key + * Unique hash identifier for the API key */ - usage: number; + hash: string; /** - * OpenRouter credit usage (in USD) for the current UTC day + * Whether to include external BYOK usage in the credit limit */ - usageDaily: number; + includeByokInLimit: boolean; /** - * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + * Human-readable label for the API key */ - usageWeekly: number; + label: string; /** - * OpenRouter credit usage (in USD) for the current UTC month + * Spending limit for the API key in USD */ - usageMonthly: number; + limit: number; /** - * Total external BYOK usage (in USD) for the API key + * Remaining spending limit in USD */ - byokUsage: number; + limitRemaining: number; /** - * External BYOK usage (in USD) for the current UTC day + * Type of limit reset for the API key */ - byokUsageDaily: number; + limitReset: string | null; /** - * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + * Name of the API key */ - byokUsageWeekly: number; + name: string; /** - * External BYOK usage (in USD) for current UTC month + * ISO 8601 timestamp of when the API key was last updated */ - byokUsageMonthly: number; + updatedAt: string | null; /** - * ISO 8601 timestamp of when the API key was created + * Total OpenRouter credit usage (in USD) for the API key */ - createdAt: string; + usage: number; /** - * ISO 8601 timestamp of when the API key was last updated + * OpenRouter credit usage (in USD) for the current UTC day */ - updatedAt: string | null; + usageDaily: number; /** - * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + * OpenRouter credit usage (in USD) for the current UTC month */ - expiresAt?: Date | null | undefined; + usageMonthly: number; /** - * 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. + * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) */ - creatorUserId: string | null; + usageWeekly: number; }; /** @@ -200,11 +204,12 @@ export const CreateKeysLimitReset$outboundSchema: z.ZodType< /** @internal */ export type CreateKeysRequestBody$Outbound = { - name: string; - limit?: number | null | undefined; - limit_reset?: string | null | undefined; - include_byok_in_limit?: boolean | undefined; + creator_user_id?: string | null | undefined; expires_at?: string | null | undefined; + include_byok_in_limit?: boolean | undefined; + limit?: number | undefined; + limit_reset?: string | null | undefined; + name: string; }; /** @internal */ @@ -212,16 +217,18 @@ export const CreateKeysRequestBody$outboundSchema: z.ZodType< CreateKeysRequestBody$Outbound, CreateKeysRequestBody > = z.object({ - name: z.string(), - limit: z.nullable(z.number()).optional(), - limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(), - includeByokInLimit: z.boolean().optional(), + creatorUserId: z.nullable(z.string()).optional(), expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + includeByokInLimit: z.boolean().optional(), + limit: z.number().optional(), + limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(), + name: z.string(), }).transform((v) => { return remap$(v, { - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", + creatorUserId: "creator_user_id", expiresAt: "expires_at", + includeByokInLimit: "include_byok_in_limit", + limitReset: "limit_reset", }); }); @@ -268,44 +275,44 @@ export function createKeysRequestToJSON( /** @internal */ export const CreateKeysData$inboundSchema: z.ZodType = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), - limit_reset: z.nullable(z.string()), - include_byok_in_limit: z.boolean(), - usage: z.number(), - usage_daily: z.number(), - usage_weekly: z.number(), - usage_monthly: z.number(), byok_usage: z.number(), byok_usage_daily: z.number(), - byok_usage_weekly: z.number(), byok_usage_monthly: z.number(), + byok_usage_weekly: z.number(), created_at: z.string(), - updated_at: z.nullable(z.string()), + creator_user_id: z.nullable(z.string()), + disabled: z.boolean(), expires_at: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - creator_user_id: z.nullable(z.string()), + hash: z.string(), + include_byok_in_limit: z.boolean(), + label: z.string(), + limit: z.number(), + limit_remaining: z.number(), + limit_reset: z.nullable(z.string()), + name: z.string(), + updated_at: z.nullable(z.string()), + usage: z.number(), + usage_daily: z.number(), + usage_monthly: z.number(), + usage_weekly: z.number(), }).transform((v) => { return remap$(v, { - "limit_remaining": "limitRemaining", - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - "usage_daily": "usageDaily", - "usage_weekly": "usageWeekly", - "usage_monthly": "usageMonthly", "byok_usage": "byokUsage", "byok_usage_daily": "byokUsageDaily", - "byok_usage_weekly": "byokUsageWeekly", "byok_usage_monthly": "byokUsageMonthly", + "byok_usage_weekly": "byokUsageWeekly", "created_at": "createdAt", - "updated_at": "updatedAt", - "expires_at": "expiresAt", "creator_user_id": "creatorUserId", + "expires_at": "expiresAt", + "include_byok_in_limit": "includeByokInLimit", + "limit_remaining": "limitRemaining", + "limit_reset": "limitReset", + "updated_at": "updatedAt", + "usage_daily": "usageDaily", + "usage_monthly": "usageMonthly", + "usage_weekly": "usageWeekly", }); }); diff --git a/src/models/operations/creatererank.ts b/src/models/operations/creatererank.ts new file mode 100644 index 00000000..cd4425ec --- /dev/null +++ b/src/models/operations/creatererank.ts @@ -0,0 +1,317 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e1de55b94363 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type CreateRerankGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +/** + * Rerank request input + */ +export type CreateRerankRequestBody = { + /** + * The list of documents to rerank + */ + documents: Array; + /** + * The rerank model to use + */ + model: string; + provider?: models.ProviderPreferences | null | undefined; + /** + * The search query to rerank documents against + */ + query: string; + /** + * Number of most relevant documents to return + */ + topN?: number | undefined; +}; + +export type CreateRerankRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + requestBody: CreateRerankRequestBody; +}; + +/** + * The document object containing the original text + */ +export type Document = { + /** + * The document text + */ + text: string; +}; + +/** + * A single rerank result + */ +export type Result = { + /** + * The document object containing the original text + */ + document: Document; + /** + * Index of the document in the original input list + */ + index: number; + /** + * Relevance score of the document to the query + */ + relevanceScore: number; +}; + +/** + * Usage statistics + */ +export type CreateRerankUsage = { + /** + * Cost of the request in credits + */ + cost?: number | undefined; + /** + * Number of search units consumed (Cohere billing) + */ + searchUnits?: number | undefined; + /** + * Total number of tokens used + */ + totalTokens?: number | undefined; +}; + +/** + * Rerank response containing ranked results + */ +export type CreateRerankResponseBody = { + /** + * Unique identifier for the rerank response (ORID format) + */ + id?: string | undefined; + /** + * The model used for reranking + */ + model: string; + /** + * The provider that served the rerank request + */ + provider?: string | undefined; + /** + * List of rerank results sorted by relevance + */ + results: Array; + /** + * Usage statistics + */ + usage?: CreateRerankUsage | undefined; +}; + +export type CreateRerankResponse = CreateRerankResponseBody | string; + +/** @internal */ +export type CreateRerankRequestBody$Outbound = { + documents: Array; + model: string; + provider?: models.ProviderPreferences$Outbound | null | undefined; + query: string; + top_n?: number | undefined; +}; + +/** @internal */ +export const CreateRerankRequestBody$outboundSchema: z.ZodType< + CreateRerankRequestBody$Outbound, + CreateRerankRequestBody +> = z.object({ + documents: z.array(z.string()), + model: z.string(), + provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(), + query: z.string(), + topN: z.int().optional(), +}).transform((v) => { + return remap$(v, { + topN: "top_n", + }); +}); + +export function createRerankRequestBodyToJSON( + createRerankRequestBody: CreateRerankRequestBody, +): string { + return JSON.stringify( + CreateRerankRequestBody$outboundSchema.parse(createRerankRequestBody), + ); +} + +/** @internal */ +export type CreateRerankRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + RequestBody: CreateRerankRequestBody$Outbound; +}; + +/** @internal */ +export const CreateRerankRequest$outboundSchema: z.ZodType< + CreateRerankRequest$Outbound, + CreateRerankRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + requestBody: z.lazy(() => CreateRerankRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + requestBody: "RequestBody", + }); +}); + +export function createRerankRequestToJSON( + createRerankRequest: CreateRerankRequest, +): string { + return JSON.stringify( + CreateRerankRequest$outboundSchema.parse(createRerankRequest), + ); +} + +/** @internal */ +export const Document$inboundSchema: z.ZodType = z.object({ + text: z.string(), +}); + +export function documentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Document$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Document' from JSON`, + ); +} + +/** @internal */ +export const Result$inboundSchema: z.ZodType = z.object({ + document: z.lazy(() => Document$inboundSchema), + index: z.int(), + relevance_score: z.number(), +}).transform((v) => { + return remap$(v, { + "relevance_score": "relevanceScore", + }); +}); + +export function resultFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Result$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Result' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankUsage$inboundSchema: z.ZodType< + CreateRerankUsage, + unknown +> = z.object({ + cost: z.number().optional(), + search_units: z.int().optional(), + total_tokens: z.int().optional(), +}).transform((v) => { + return remap$(v, { + "search_units": "searchUnits", + "total_tokens": "totalTokens", + }); +}); + +export function createRerankUsageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankUsage' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankResponseBody$inboundSchema: z.ZodType< + CreateRerankResponseBody, + unknown +> = z.object({ + id: z.string().optional(), + model: z.string(), + provider: z.string().optional(), + results: z.array(z.lazy(() => Result$inboundSchema)), + usage: z.lazy(() => CreateRerankUsage$inboundSchema).optional(), +}); + +export function createRerankResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateRerankResponse$inboundSchema: z.ZodType< + CreateRerankResponse, + unknown +> = z.union([z.lazy(() => CreateRerankResponseBody$inboundSchema), z.string()]); + +export function createRerankResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRerankResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRerankResponse' from JSON`, + ); +} diff --git a/src/models/operations/createvideos.ts b/src/models/operations/createvideos.ts new file mode 100644 index 00000000..46a53311 --- /dev/null +++ b/src/models/operations/createvideos.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 06dc92996e18 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type CreateVideosGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type CreateVideosRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + videoGenerationRequest: models.VideoGenerationRequest; +}; + +/** @internal */ +export type CreateVideosRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + VideoGenerationRequest: models.VideoGenerationRequest$Outbound; +}; + +/** @internal */ +export const CreateVideosRequest$outboundSchema: z.ZodType< + CreateVideosRequest$Outbound, + CreateVideosRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + videoGenerationRequest: models.VideoGenerationRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + videoGenerationRequest: "VideoGenerationRequest", + }); +}); + +export function createVideosRequestToJSON( + createVideosRequest: CreateVideosRequest, +): string { + return JSON.stringify( + CreateVideosRequest$outboundSchema.parse(createVideosRequest), + ); +} diff --git a/src/models/operations/deleteguardrail.ts b/src/models/operations/deleteguardrail.ts index 8bd95167..9f9996b3 100644 --- a/src/models/operations/deleteguardrail.ts +++ b/src/models/operations/deleteguardrail.ts @@ -5,9 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteGuardrailGlobals = { /** @@ -57,16 +54,6 @@ export type DeleteGuardrailRequest = { id: string; }; -/** - * Guardrail deleted successfully - */ -export type DeleteGuardrailResponse = { - /** - * Confirmation that the guardrail was deleted - */ - deleted: true; -}; - /** @internal */ export type DeleteGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; @@ -97,21 +84,3 @@ export function deleteGuardrailRequestToJSON( DeleteGuardrailRequest$outboundSchema.parse(deleteGuardrailRequest), ); } - -/** @internal */ -export const DeleteGuardrailResponse$inboundSchema: z.ZodType< - DeleteGuardrailResponse, - unknown -> = z.object({ - deleted: z.literal(true), -}); - -export function deleteGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/exchangeauthcodeforapikey.ts b/src/models/operations/exchangeauthcodeforapikey.ts index 44356ffc..118b7a12 100644 --- a/src/models/operations/exchangeauthcodeforapikey.ts +++ b/src/models/operations/exchangeauthcodeforapikey.ts @@ -52,10 +52,6 @@ export type ExchangeAuthCodeForAPIKeyRequestBody = { * The authorization code received from the OAuth redirect */ code: string; - /** - * The code verifier if code_challenge was used in the authorization request - */ - codeVerifier?: string | undefined; /** * The method used to generate the code challenge */ @@ -63,6 +59,10 @@ export type ExchangeAuthCodeForAPIKeyRequestBody = { | ExchangeAuthCodeForAPIKeyCodeChallengeMethod | null | undefined; + /** + * The code verifier if code_challenge was used in the authorization request + */ + codeVerifier?: string | undefined; }; export type ExchangeAuthCodeForAPIKeyRequest = { @@ -110,8 +110,8 @@ export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: /** @internal */ export type ExchangeAuthCodeForAPIKeyRequestBody$Outbound = { code: string; - code_verifier?: string | undefined; code_challenge_method?: string | null | undefined; + code_verifier?: string | undefined; }; /** @internal */ @@ -120,14 +120,14 @@ export const ExchangeAuthCodeForAPIKeyRequestBody$outboundSchema: z.ZodType< ExchangeAuthCodeForAPIKeyRequestBody > = z.object({ code: z.string(), - codeVerifier: z.string().optional(), codeChallengeMethod: z.nullable( ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema, ).optional(), + codeVerifier: z.string().optional(), }).transform((v) => { return remap$(v, { - codeVerifier: "code_verifier", codeChallengeMethod: "code_challenge_method", + codeVerifier: "code_verifier", }); }); diff --git a/src/models/operations/getcurrentkey.ts b/src/models/operations/getcurrentkey.ts index 6a491a29..c94627a2 100644 --- a/src/models/operations/getcurrentkey.ts +++ b/src/models/operations/getcurrentkey.ts @@ -59,10 +59,6 @@ export type GetCurrentKeyRequest = { * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. */ export type RateLimit = { - /** - * Number of requests allowed per interval - */ - requests: number; /** * Rate limit interval */ @@ -71,36 +67,16 @@ export type RateLimit = { * Note about the rate limit */ note: string; + /** + * Number of requests allowed per interval + */ + requests: number; }; /** * Current API key information */ export type GetCurrentKeyData = { - /** - * Human-readable label for the API key - */ - label: string; - /** - * Spending limit for the API key in USD - */ - limit: number | null; - /** - * Total OpenRouter credit usage (in USD) for the API key - */ - usage: number; - /** - * OpenRouter credit usage (in USD) for the current UTC day - */ - usageDaily: number; - /** - * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) - */ - usageWeekly: number; - /** - * OpenRouter credit usage (in USD) for the current UTC month - */ - usageMonthly: number; /** * Total external BYOK usage (in USD) for the API key */ @@ -109,14 +85,26 @@ export type GetCurrentKeyData = { * External BYOK usage (in USD) for the current UTC day */ byokUsageDaily: number; + /** + * External BYOK usage (in USD) for current UTC month + */ + byokUsageMonthly: number; /** * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) */ byokUsageWeekly: number; /** - * External BYOK usage (in USD) for current UTC month + * 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. */ - byokUsageMonthly: number; + creatorUserId: string | null; + /** + * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + */ + expiresAt?: Date | null | undefined; + /** + * Whether to include external BYOK usage in the credit limit + */ + includeByokInLimit: boolean; /** * Whether this is a free tier API key */ @@ -131,32 +119,44 @@ export type GetCurrentKeyData = { * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ isProvisioningKey: boolean; + /** + * Human-readable label for the API key + */ + label: string; + /** + * Spending limit for the API key in USD + */ + limit: number; /** * Remaining spending limit in USD */ - limitRemaining: number | null; + limitRemaining: number; /** * Type of limit reset for the API key */ limitReset: string | null; /** - * Whether to include external BYOK usage in the credit limit + * Legacy rate limit information about a key. Will always return -1. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ - includeByokInLimit: boolean; + rateLimit: RateLimit; /** - * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + * Total OpenRouter credit usage (in USD) for the API key */ - expiresAt?: Date | null | undefined; + usage: number; /** - * 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. + * OpenRouter credit usage (in USD) for the current UTC day */ - creatorUserId: string | null; + usageDaily: number; /** - * Legacy rate limit information about a key. Will always return -1. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + * OpenRouter credit usage (in USD) for the current UTC month */ - rateLimit: RateLimit; + usageMonthly: number; + /** + * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + */ + usageWeekly: number; }; /** @@ -200,9 +200,9 @@ export function getCurrentKeyRequestToJSON( /** @internal */ export const RateLimit$inboundSchema: z.ZodType = z.object({ - requests: z.number(), interval: z.string(), note: z.string(), + requests: z.int(), }); export function rateLimitFromJSON( @@ -220,45 +220,45 @@ export const GetCurrentKeyData$inboundSchema: z.ZodType< GetCurrentKeyData, unknown > = z.object({ - label: z.string(), - limit: z.nullable(z.number()), - usage: z.number(), - usage_daily: z.number(), - usage_weekly: z.number(), - usage_monthly: z.number(), byok_usage: z.number(), byok_usage_daily: z.number(), - byok_usage_weekly: z.number(), byok_usage_monthly: z.number(), + byok_usage_weekly: z.number(), + creator_user_id: z.nullable(z.string()), + expires_at: z.nullable( + z.iso.datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + include_byok_in_limit: z.boolean(), is_free_tier: z.boolean(), is_management_key: z.boolean(), is_provisioning_key: z.boolean(), - limit_remaining: z.nullable(z.number()), + label: z.string(), + limit: z.number(), + limit_remaining: z.number(), limit_reset: z.nullable(z.string()), - include_byok_in_limit: z.boolean(), - expires_at: z.nullable( - z.iso.datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - creator_user_id: z.nullable(z.string()), rate_limit: z.lazy(() => RateLimit$inboundSchema), + usage: z.number(), + usage_daily: z.number(), + usage_monthly: z.number(), + usage_weekly: z.number(), }).transform((v) => { return remap$(v, { - "usage_daily": "usageDaily", - "usage_weekly": "usageWeekly", - "usage_monthly": "usageMonthly", "byok_usage": "byokUsage", "byok_usage_daily": "byokUsageDaily", - "byok_usage_weekly": "byokUsageWeekly", "byok_usage_monthly": "byokUsageMonthly", + "byok_usage_weekly": "byokUsageWeekly", + "creator_user_id": "creatorUserId", + "expires_at": "expiresAt", + "include_byok_in_limit": "includeByokInLimit", "is_free_tier": "isFreeTier", "is_management_key": "isManagementKey", "is_provisioning_key": "isProvisioningKey", "limit_remaining": "limitRemaining", "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - "expires_at": "expiresAt", - "creator_user_id": "creatorUserId", "rate_limit": "rateLimit", + "usage_daily": "usageDaily", + "usage_monthly": "usageMonthly", + "usage_weekly": "usageWeekly", }); }); diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index 3e8e3684..8d1c2aaa 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -10,6 +10,7 @@ import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type GetGenerationGlobals = { /** @@ -53,6 +54,9 @@ export type GetGenerationRequest = { * @remarks */ appCategories?: string | undefined; + /** + * The generation ID + */ id: string; }; @@ -62,6 +66,7 @@ export type GetGenerationRequest = { export const ApiType = { Completions: "completions", Embeddings: "embeddings", + Rerank: "rerank", Video: "video", } as const; /** @@ -69,272 +74,162 @@ export const ApiType = { */ export type ApiType = OpenEnum; -export const ProviderName = { - AnyScale: "AnyScale", - Atoma: "Atoma", - CentML: "Cent-ML", - CrofAI: "CrofAI", - Enfer: "Enfer", - GoPomelo: "GoPomelo", - HuggingFace: "HuggingFace", - Hyperbolic2: "Hyperbolic 2", - InoCloud: "InoCloud", - Kluster: "Kluster", - Lambda: "Lambda", - Lepton: "Lepton", - Lynn2: "Lynn 2", - Lynn: "Lynn", - Mancer: "Mancer", - Meta: "Meta", - Modal: "Modal", - Nineteen: "Nineteen", - OctoAI: "OctoAI", - Recursal: "Recursal", - Reflection: "Reflection", - Replicate: "Replicate", - SambaNova2: "SambaNova 2", - SFCompute: "SF Compute", - Targon: "Targon", - Together2: "Together 2", - Ubicloud: "Ubicloud", - OneDotAI: "01.AI", - AkashML: "AkashML", - Ai21: "AI21", - AionLabs: "AionLabs", - Alibaba: "Alibaba", - Ambient: "Ambient", - AmazonBedrock: "Amazon Bedrock", - AmazonNova: "Amazon Nova", - Anthropic: "Anthropic", - ArceeAI: "Arcee AI", - AtlasCloud: "AtlasCloud", - Avian: "Avian", - Azure: "Azure", - BaseTen: "BaseTen", - BytePlus: "BytePlus", - BlackForestLabs: "Black Forest Labs", - Cerebras: "Cerebras", - Chutes: "Chutes", - Cirrascale: "Cirrascale", - Clarifai: "Clarifai", - Cloudflare: "Cloudflare", - Cohere: "Cohere", - Crusoe: "Crusoe", - DeepInfra: "DeepInfra", - DeepSeek: "DeepSeek", - Featherless: "Featherless", - Fireworks: "Fireworks", - Friendli: "Friendli", - GMICloud: "GMICloud", - Google: "Google", - GoogleAIStudio: "Google AI Studio", - Groq: "Groq", - Hyperbolic: "Hyperbolic", - Inception: "Inception", - Inceptron: "Inceptron", - InferenceNet: "InferenceNet", - Ionstream: "Ionstream", - Infermatic: "Infermatic", - IoNet: "Io Net", - Inflection: "Inflection", - Liquid: "Liquid", - Mara: "Mara", - Mancer2: "Mancer 2", - Minimax: "Minimax", - ModelRun: "ModelRun", - Mistral: "Mistral", - Modular: "Modular", - MoonshotAI: "Moonshot AI", - Morph: "Morph", - NCompass: "NCompass", - Nebius: "Nebius", - NextBit: "NextBit", - Novita: "Novita", - Nvidia: "Nvidia", - OpenAI: "OpenAI", - OpenInference: "OpenInference", - Parasail: "Parasail", - Perplexity: "Perplexity", - Phala: "Phala", - Reka: "Reka", - Relace: "Relace", - SambaNova: "SambaNova", - Seed: "Seed", - SiliconFlow: "SiliconFlow", - Sourceful: "Sourceful", - StepFun: "StepFun", - Stealth: "Stealth", - StreamLake: "StreamLake", - Switchpoint: "Switchpoint", - Together: "Together", - Upstage: "Upstage", - Venice: "Venice", - WandB: "WandB", - Xiaomi: "Xiaomi", - XAI: "xAI", - ZAi: "Z.AI", - FakeProvider: "FakeProvider", -} as const; -export type ProviderName = OpenEnum; - -export type ProviderResponse = { - id?: string | undefined; - endpointId?: string | undefined; - modelPermaslug?: string | undefined; - providerName?: ProviderName | undefined; - status: number | null; - latency?: number | undefined; - isByok?: boolean | undefined; -}; - /** * Generation data */ export type GetGenerationData = { /** - * Unique identifier for the generation - */ - id: string; - /** - * Upstream provider's identifier for this generation + * Type of API used for the generation */ - upstreamId: string | null; + apiType: ApiType | null; /** - * Total cost of the generation in USD + * ID of the app that made the request */ - totalCost: number; + appId: number; /** * Discount applied due to caching */ - cacheDiscount: number | null; + cacheDiscount: number; /** - * Cost charged by the upstream provider + * Whether the generation was cancelled */ - upstreamInferenceCost: number | null; + cancelled: boolean | null; /** * ISO 8601 timestamp of when the generation was created */ createdAt: string; /** - * Model used for the generation - */ - model: string; - /** - * ID of the app that made the request + * External user identifier */ - appId: number | null; + externalUser: string | null; /** - * Whether the response was streamed + * Reason the generation finished */ - streamed: boolean | null; + finishReason: string | null; /** - * Whether the generation was cancelled + * Time taken for generation in milliseconds */ - cancelled: boolean | null; + generationTime: number; /** - * Name of the provider that served the request + * Referer header from the request */ - providerName: string | null; + httpReferer: string | null; /** - * Total latency in milliseconds + * Unique identifier for the generation */ - latency: number | null; + id: string; /** - * Moderation latency in milliseconds + * Whether this used bring-your-own-key */ - moderationLatency: number | null; + isByok: boolean; /** - * Time taken for generation in milliseconds + * Total latency in milliseconds */ - generationTime: number | null; + latency: number; /** - * Reason the generation finished + * Model used for the generation */ - finishReason: string | null; + model: string; /** - * Number of tokens in the prompt + * Moderation latency in milliseconds */ - tokensPrompt: number | null; + moderationLatency: number; /** - * Number of tokens in the completion + * Native finish reason as reported by provider */ - tokensCompletion: number | null; + nativeFinishReason: string | null; /** - * Native prompt tokens as reported by provider + * Native cached tokens as reported by provider */ - nativeTokensPrompt: number | null; + nativeTokensCached: number; /** * Native completion tokens as reported by provider */ - nativeTokensCompletion: number | null; + nativeTokensCompletion: number; /** * Native completion image tokens as reported by provider */ - nativeTokensCompletionImages: number | null; - /** - * Native reasoning tokens as reported by provider - */ - nativeTokensReasoning: number | null; + nativeTokensCompletionImages: number; /** - * Native cached tokens as reported by provider + * Native prompt tokens as reported by provider */ - nativeTokensCached: number | null; + nativeTokensPrompt: number; /** - * Number of media items in the prompt + * Native reasoning tokens as reported by provider */ - numMediaPrompt: number | null; + nativeTokensReasoning: number; /** * Number of audio inputs in the prompt */ - numInputAudioPrompt: number | null; + numInputAudioPrompt: number; /** * Number of media items in the completion */ - numMediaCompletion: number | null; + numMediaCompletion: number; + /** + * Number of media items in the prompt + */ + numMediaPrompt: number; /** * Number of search results included */ - numSearchResults: number | null; + numSearchResults: number; /** * Origin URL of the request */ origin: string; /** - * Usage amount in USD + * Name of the provider that served the request */ - usage: number; + providerName: string | null; /** - * Whether this used bring-your-own-key + * List of provider responses for this generation, including fallback attempts */ - isByok: boolean; + providerResponses: Array | null; /** - * Native finish reason as reported by provider + * Unique identifier grouping all generations from a single API request */ - nativeFinishReason: string | null; + requestId?: string | null | undefined; /** - * External user identifier + * Router used for the request (e.g., openrouter/auto) */ - externalUser: string | null; + router: string | null; /** - * Type of API used for the generation + * Session identifier grouping multiple generations in the same session */ - apiType: ApiType | null; + sessionId?: string | null | undefined; /** - * Router used for the request (e.g., openrouter/auto) + * Whether the response was streamed */ - router: string | null; + streamed: boolean | null; /** - * List of provider responses for this generation, including fallback attempts + * Number of tokens in the completion */ - providerResponses: Array | null; + tokensCompletion: number; /** - * User-Agent header from the request + * Number of tokens in the prompt */ - userAgent: string | null; + tokensPrompt: number; /** - * Referer header from the request + * Total cost of the generation in USD */ - httpReferer: string | null; + totalCost: number; + /** + * Upstream provider's identifier for this generation + */ + upstreamId: string | null; + /** + * Cost charged by the upstream provider + */ + upstreamInferenceCost: number; + /** + * Usage amount in USD + */ + usage: number; + /** + * User-Agent header from the request + */ + userAgent: string | null; }; /** @@ -382,114 +277,83 @@ export function getGenerationRequestToJSON( export const ApiType$inboundSchema: z.ZodType = openEnums .inboundSchema(ApiType); -/** @internal */ -export const ProviderName$inboundSchema: z.ZodType = - openEnums.inboundSchema(ProviderName); - -/** @internal */ -export const ProviderResponse$inboundSchema: z.ZodType< - ProviderResponse, - unknown -> = z.object({ - id: z.string().optional(), - endpoint_id: z.string().optional(), - model_permaslug: z.string().optional(), - provider_name: ProviderName$inboundSchema.optional(), - status: z.nullable(z.number()), - latency: z.number().optional(), - is_byok: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "endpoint_id": "endpointId", - "model_permaslug": "modelPermaslug", - "provider_name": "providerName", - "is_byok": "isByok", - }); -}); - -export function providerResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ProviderResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ProviderResponse' from JSON`, - ); -} - /** @internal */ export const GetGenerationData$inboundSchema: z.ZodType< GetGenerationData, unknown > = z.object({ - id: z.string(), - upstream_id: z.nullable(z.string()), - total_cost: z.number(), - cache_discount: z.nullable(z.number()), - upstream_inference_cost: z.nullable(z.number()), - created_at: z.string(), - model: z.string(), - app_id: z.nullable(z.number()), - streamed: z.nullable(z.boolean()), + api_type: z.nullable(ApiType$inboundSchema), + app_id: z.int(), + cache_discount: z.number(), cancelled: z.nullable(z.boolean()), - provider_name: z.nullable(z.string()), - latency: z.nullable(z.number()), - moderation_latency: z.nullable(z.number()), - generation_time: z.nullable(z.number()), + created_at: z.string(), + external_user: z.nullable(z.string()), finish_reason: z.nullable(z.string()), - tokens_prompt: z.nullable(z.number()), - tokens_completion: z.nullable(z.number()), - native_tokens_prompt: z.nullable(z.number()), - native_tokens_completion: z.nullable(z.number()), - native_tokens_completion_images: z.nullable(z.number()), - native_tokens_reasoning: z.nullable(z.number()), - native_tokens_cached: z.nullable(z.number()), - num_media_prompt: z.nullable(z.number()), - num_input_audio_prompt: z.nullable(z.number()), - num_media_completion: z.nullable(z.number()), - num_search_results: z.nullable(z.number()), - origin: z.string(), - usage: z.number(), + generation_time: z.number(), + http_referer: z.nullable(z.string()), + id: z.string(), is_byok: z.boolean(), + latency: z.number(), + model: z.string(), + moderation_latency: z.number(), native_finish_reason: z.nullable(z.string()), - external_user: z.nullable(z.string()), - api_type: z.nullable(ApiType$inboundSchema), - router: z.nullable(z.string()), + native_tokens_cached: z.int(), + native_tokens_completion: z.int(), + native_tokens_completion_images: z.int(), + native_tokens_prompt: z.int(), + native_tokens_reasoning: z.int(), + num_input_audio_prompt: z.int(), + num_media_completion: z.int(), + num_media_prompt: z.int(), + num_search_results: z.int(), + origin: z.string(), + provider_name: z.nullable(z.string()), provider_responses: z.nullable( - z.array(z.lazy(() => ProviderResponse$inboundSchema)), + z.array(models.ProviderResponse$inboundSchema), ), + request_id: z.nullable(z.string()).optional(), + router: z.nullable(z.string()), + session_id: z.nullable(z.string()).optional(), + streamed: z.nullable(z.boolean()), + tokens_completion: z.int(), + tokens_prompt: z.int(), + total_cost: z.number(), + upstream_id: z.nullable(z.string()), + upstream_inference_cost: z.number(), + usage: z.number(), user_agent: z.nullable(z.string()), - http_referer: z.nullable(z.string()), }).transform((v) => { return remap$(v, { - "upstream_id": "upstreamId", - "total_cost": "totalCost", + "api_type": "apiType", + "app_id": "appId", "cache_discount": "cacheDiscount", - "upstream_inference_cost": "upstreamInferenceCost", "created_at": "createdAt", - "app_id": "appId", - "provider_name": "providerName", - "moderation_latency": "moderationLatency", - "generation_time": "generationTime", + "external_user": "externalUser", "finish_reason": "finishReason", - "tokens_prompt": "tokensPrompt", - "tokens_completion": "tokensCompletion", - "native_tokens_prompt": "nativeTokensPrompt", + "generation_time": "generationTime", + "http_referer": "httpReferer", + "is_byok": "isByok", + "moderation_latency": "moderationLatency", + "native_finish_reason": "nativeFinishReason", + "native_tokens_cached": "nativeTokensCached", "native_tokens_completion": "nativeTokensCompletion", "native_tokens_completion_images": "nativeTokensCompletionImages", + "native_tokens_prompt": "nativeTokensPrompt", "native_tokens_reasoning": "nativeTokensReasoning", - "native_tokens_cached": "nativeTokensCached", - "num_media_prompt": "numMediaPrompt", "num_input_audio_prompt": "numInputAudioPrompt", "num_media_completion": "numMediaCompletion", + "num_media_prompt": "numMediaPrompt", "num_search_results": "numSearchResults", - "is_byok": "isByok", - "native_finish_reason": "nativeFinishReason", - "external_user": "externalUser", - "api_type": "apiType", + "provider_name": "providerName", "provider_responses": "providerResponses", + "request_id": "requestId", + "session_id": "sessionId", + "tokens_completion": "tokensCompletion", + "tokens_prompt": "tokensPrompt", + "total_cost": "totalCost", + "upstream_id": "upstreamId", + "upstream_inference_cost": "upstreamInferenceCost", "user_agent": "userAgent", - "http_referer": "httpReferer", }); }); diff --git a/src/models/operations/getguardrail.ts b/src/models/operations/getguardrail.ts index 78ba0d03..77bda268 100644 --- a/src/models/operations/getguardrail.ts +++ b/src/models/operations/getguardrail.ts @@ -5,11 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetGuardrailGlobals = { /** @@ -59,81 +54,6 @@ export type GetGuardrailRequest = { id: string; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const GetGuardrailResetInterval = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type GetGuardrailResetInterval = OpenEnum< - typeof GetGuardrailResetInterval ->; - -/** - * The guardrail - */ -export type GetGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: GetGuardrailResetInterval | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail details - */ -export type GetGuardrailResponse = { - /** - * The guardrail - */ - data: GetGuardrailData; -}; - /** @internal */ export type GetGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; @@ -164,67 +84,3 @@ export function getGuardrailRequestToJSON( GetGuardrailRequest$outboundSchema.parse(getGuardrailRequest), ); } - -/** @internal */ -export const GetGuardrailResetInterval$inboundSchema: z.ZodType< - GetGuardrailResetInterval, - unknown -> = openEnums.inboundSchema(GetGuardrailResetInterval); - -/** @internal */ -export const GetGuardrailData$inboundSchema: z.ZodType< - GetGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(GetGuardrailResetInterval$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function getGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const GetGuardrailResponse$inboundSchema: z.ZodType< - GetGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => GetGuardrailData$inboundSchema), -}); - -export function getGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/getkey.ts b/src/models/operations/getkey.ts index 70043ed0..a56315d0 100644 --- a/src/models/operations/getkey.ts +++ b/src/models/operations/getkey.ts @@ -62,85 +62,85 @@ export type GetKeyRequest = { */ export type GetKeyData = { /** - * Unique hash identifier for the API key + * Total external BYOK usage (in USD) for the API key */ - hash: string; + byokUsage: number; /** - * Name of the API key + * External BYOK usage (in USD) for the current UTC day */ - name: string; + byokUsageDaily: number; /** - * Human-readable label for the API key + * External BYOK usage (in USD) for current UTC month */ - label: string; + byokUsageMonthly: number; /** - * Whether the API key is disabled + * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) */ - disabled: boolean; + byokUsageWeekly: number; /** - * Spending limit for the API key in USD + * ISO 8601 timestamp of when the API key was created */ - limit: number | null; + createdAt: string; /** - * Remaining spending limit in USD + * 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. */ - limitRemaining: number | null; + creatorUserId: string | null; /** - * Type of limit reset for the API key + * Whether the API key is disabled */ - limitReset: string | null; + disabled: boolean; /** - * Whether to include external BYOK usage in the credit limit + * ISO 8601 UTC timestamp when the API key expires, or null if no expiration */ - includeByokInLimit: boolean; + expiresAt?: Date | null | undefined; /** - * Total OpenRouter credit usage (in USD) for the API key + * Unique hash identifier for the API key */ - usage: number; + hash: string; /** - * OpenRouter credit usage (in USD) for the current UTC day + * Whether to include external BYOK usage in the credit limit */ - usageDaily: number; + includeByokInLimit: boolean; /** - * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + * Human-readable label for the API key */ - usageWeekly: number; + label: string; /** - * OpenRouter credit usage (in USD) for the current UTC month + * Spending limit for the API key in USD */ - usageMonthly: number; + limit: number; /** - * Total external BYOK usage (in USD) for the API key + * Remaining spending limit in USD */ - byokUsage: number; + limitRemaining: number; /** - * External BYOK usage (in USD) for the current UTC day + * Type of limit reset for the API key */ - byokUsageDaily: number; + limitReset: string | null; /** - * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + * Name of the API key */ - byokUsageWeekly: number; + name: string; /** - * External BYOK usage (in USD) for current UTC month + * ISO 8601 timestamp of when the API key was last updated */ - byokUsageMonthly: number; + updatedAt: string | null; /** - * ISO 8601 timestamp of when the API key was created + * Total OpenRouter credit usage (in USD) for the API key */ - createdAt: string; + usage: number; /** - * ISO 8601 timestamp of when the API key was last updated + * OpenRouter credit usage (in USD) for the current UTC day */ - updatedAt: string | null; + usageDaily: number; /** - * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + * OpenRouter credit usage (in USD) for the current UTC month */ - expiresAt?: Date | null | undefined; + usageMonthly: number; /** - * 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. + * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) */ - creatorUserId: string | null; + usageWeekly: number; }; /** @@ -183,44 +183,44 @@ export function getKeyRequestToJSON(getKeyRequest: GetKeyRequest): string { /** @internal */ export const GetKeyData$inboundSchema: z.ZodType = z .object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), - limit_reset: z.nullable(z.string()), - include_byok_in_limit: z.boolean(), - usage: z.number(), - usage_daily: z.number(), - usage_weekly: z.number(), - usage_monthly: z.number(), byok_usage: z.number(), byok_usage_daily: z.number(), - byok_usage_weekly: z.number(), byok_usage_monthly: z.number(), + byok_usage_weekly: z.number(), created_at: z.string(), - updated_at: z.nullable(z.string()), + creator_user_id: z.nullable(z.string()), + disabled: z.boolean(), expires_at: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - creator_user_id: z.nullable(z.string()), + hash: z.string(), + include_byok_in_limit: z.boolean(), + label: z.string(), + limit: z.number(), + limit_remaining: z.number(), + limit_reset: z.nullable(z.string()), + name: z.string(), + updated_at: z.nullable(z.string()), + usage: z.number(), + usage_daily: z.number(), + usage_monthly: z.number(), + usage_weekly: z.number(), }).transform((v) => { return remap$(v, { - "limit_remaining": "limitRemaining", - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - "usage_daily": "usageDaily", - "usage_weekly": "usageWeekly", - "usage_monthly": "usageMonthly", "byok_usage": "byokUsage", "byok_usage_daily": "byokUsageDaily", - "byok_usage_weekly": "byokUsageWeekly", "byok_usage_monthly": "byokUsageMonthly", + "byok_usage_weekly": "byokUsageWeekly", "created_at": "createdAt", - "updated_at": "updatedAt", - "expires_at": "expiresAt", "creator_user_id": "creatorUserId", + "expires_at": "expiresAt", + "include_byok_in_limit": "includeByokInLimit", + "limit_remaining": "limitRemaining", + "limit_reset": "limitReset", + "updated_at": "updatedAt", + "usage_daily": "usageDaily", + "usage_monthly": "usageMonthly", + "usage_weekly": "usageWeekly", }); }); diff --git a/src/models/operations/getmodels.ts b/src/models/operations/getmodels.ts index e69ff472..623a0b46 100644 --- a/src/models/operations/getmodels.ts +++ b/src/models/operations/getmodels.ts @@ -76,6 +76,9 @@ export type GetModelsRequest = { * Filter models by use case category */ category?: Category | undefined; + /** + * Filter models by supported parameter (comma-separated) + */ supportedParameters?: string | undefined; /** * 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". diff --git a/src/models/operations/getuseractivity.ts b/src/models/operations/getuseractivity.ts index 801fc339..8566d1dc 100644 --- a/src/models/operations/getuseractivity.ts +++ b/src/models/operations/getuseractivity.ts @@ -5,10 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as models from "../index.js"; export type GetUserActivityGlobals = { /** @@ -56,16 +52,14 @@ export type GetUserActivityRequest = { * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). */ date?: string | undefined; -}; - -/** - * Returns user activity data grouped by endpoint - */ -export type GetUserActivityResponse = { /** - * List of activity items + * Filter by API key hash (SHA-256 hex string, as returned by the keys API). */ - data: Array; + apiKeyHash?: string | undefined; + /** + * Filter by org member user ID. Only applicable for organization accounts. + */ + userId?: string | undefined; }; /** @internal */ @@ -74,6 +68,8 @@ export type GetUserActivityRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; date?: string | undefined; + api_key_hash?: string | undefined; + user_id?: string | undefined; }; /** @internal */ @@ -85,9 +81,13 @@ export const GetUserActivityRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), date: z.string().optional(), + apiKeyHash: z.string().optional(), + userId: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", + apiKeyHash: "api_key_hash", + userId: "user_id", }); }); @@ -98,21 +98,3 @@ export function getUserActivityRequestToJSON( GetUserActivityRequest$outboundSchema.parse(getUserActivityRequest), ); } - -/** @internal */ -export const GetUserActivityResponse$inboundSchema: z.ZodType< - GetUserActivityResponse, - unknown -> = z.object({ - data: z.array(models.ActivityItem$inboundSchema), -}); - -export function getUserActivityResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUserActivityResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUserActivityResponse' from JSON`, - ); -} diff --git a/src/models/operations/getvideos.ts b/src/models/operations/getvideos.ts new file mode 100644 index 00000000..460effc4 --- /dev/null +++ b/src/models/operations/getvideos.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ac332053ddd0 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type GetVideosGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type GetVideosRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + jobId: string; +}; + +/** @internal */ +export type GetVideosRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + jobId: string; +}; + +/** @internal */ +export const GetVideosRequest$outboundSchema: z.ZodType< + GetVideosRequest$Outbound, + GetVideosRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + jobId: z.string(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function getVideosRequestToJSON( + getVideosRequest: GetVideosRequest, +): string { + return JSON.stringify( + GetVideosRequest$outboundSchema.parse(getVideosRequest), + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 58437e2f..6a649326 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -8,11 +8,12 @@ export * from "./bulkassignmemberstoguardrail.js"; export * from "./bulkunassignkeysfromguardrail.js"; export * from "./bulkunassignmembersfromguardrail.js"; export * from "./createauthkeyscode.js"; -export * from "./createcoinbasecharge.js"; export * from "./createembeddings.js"; export * from "./createguardrail.js"; export * from "./createkeys.js"; +export * from "./creatererank.js"; export * from "./createresponses.js"; +export * from "./createvideos.js"; export * from "./deleteguardrail.js"; export * from "./deletekeys.js"; export * from "./exchangeauthcodeforapikey.js"; @@ -23,6 +24,7 @@ export * from "./getguardrail.js"; export * from "./getkey.js"; export * from "./getmodels.js"; export * from "./getuseractivity.js"; +export * from "./getvideos.js"; export * from "./list.js"; export * from "./listembeddingsmodels.js"; export * from "./listendpoints.js"; @@ -34,7 +36,10 @@ export * from "./listkeyassignments.js"; export * from "./listmemberassignments.js"; export * from "./listmodelscount.js"; export * from "./listmodelsuser.js"; +export * from "./listorganizationmembers.js"; export * from "./listproviders.js"; +export * from "./listvideoscontent.js"; +export * from "./listvideosmodels.js"; export * from "./sendchatcompletionrequest.js"; export * from "./updateguardrail.js"; export * from "./updatekeys.js"; diff --git a/src/models/operations/list.ts b/src/models/operations/list.ts index c1af76db..40a1a33b 100644 --- a/src/models/operations/list.ts +++ b/src/models/operations/list.ts @@ -54,94 +54,94 @@ export type ListRequest = { /** * Whether to include disabled API keys in the response */ - includeDisabled?: string | undefined; + includeDisabled?: boolean | undefined; /** * Number of API keys to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; }; export type ListData = { /** - * Unique hash identifier for the API key + * Total external BYOK usage (in USD) for the API key */ - hash: string; + byokUsage: number; /** - * Name of the API key + * External BYOK usage (in USD) for the current UTC day */ - name: string; + byokUsageDaily: number; /** - * Human-readable label for the API key + * External BYOK usage (in USD) for current UTC month */ - label: string; + byokUsageMonthly: number; /** - * Whether the API key is disabled + * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) */ - disabled: boolean; + byokUsageWeekly: number; /** - * Spending limit for the API key in USD + * ISO 8601 timestamp of when the API key was created */ - limit: number | null; + createdAt: string; /** - * Remaining spending limit in USD + * 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. */ - limitRemaining: number | null; + creatorUserId: string | null; /** - * Type of limit reset for the API key + * Whether the API key is disabled */ - limitReset: string | null; + disabled: boolean; /** - * Whether to include external BYOK usage in the credit limit + * ISO 8601 UTC timestamp when the API key expires, or null if no expiration */ - includeByokInLimit: boolean; + expiresAt?: Date | null | undefined; /** - * Total OpenRouter credit usage (in USD) for the API key + * Unique hash identifier for the API key */ - usage: number; + hash: string; /** - * OpenRouter credit usage (in USD) for the current UTC day + * Whether to include external BYOK usage in the credit limit */ - usageDaily: number; + includeByokInLimit: boolean; /** - * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + * Human-readable label for the API key */ - usageWeekly: number; + label: string; /** - * OpenRouter credit usage (in USD) for the current UTC month + * Spending limit for the API key in USD */ - usageMonthly: number; + limit: number; /** - * Total external BYOK usage (in USD) for the API key + * Remaining spending limit in USD */ - byokUsage: number; + limitRemaining: number; /** - * External BYOK usage (in USD) for the current UTC day + * Type of limit reset for the API key */ - byokUsageDaily: number; + limitReset: string | null; /** - * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + * Name of the API key */ - byokUsageWeekly: number; + name: string; /** - * External BYOK usage (in USD) for current UTC month + * ISO 8601 timestamp of when the API key was last updated */ - byokUsageMonthly: number; + updatedAt: string | null; /** - * ISO 8601 timestamp of when the API key was created + * Total OpenRouter credit usage (in USD) for the API key */ - createdAt: string; + usage: number; /** - * ISO 8601 timestamp of when the API key was last updated + * OpenRouter credit usage (in USD) for the current UTC day */ - updatedAt: string | null; + usageDaily: number; /** - * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + * OpenRouter credit usage (in USD) for the current UTC month */ - expiresAt?: Date | null | undefined; + usageMonthly: number; /** - * 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. + * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) */ - creatorUserId: string | null; + usageWeekly: number; }; /** @@ -159,8 +159,8 @@ export type ListRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - include_disabled?: string | undefined; - offset?: string | undefined; + include_disabled?: boolean | undefined; + offset?: number | undefined; }; /** @internal */ @@ -171,8 +171,8 @@ export const ListRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - includeDisabled: z.string().optional(), - offset: z.string().optional(), + includeDisabled: z.boolean().optional(), + offset: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -186,44 +186,44 @@ export function listRequestToJSON(listRequest: ListRequest): string { /** @internal */ export const ListData$inboundSchema: z.ZodType = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), - limit_reset: z.nullable(z.string()), - include_byok_in_limit: z.boolean(), - usage: z.number(), - usage_daily: z.number(), - usage_weekly: z.number(), - usage_monthly: z.number(), byok_usage: z.number(), byok_usage_daily: z.number(), - byok_usage_weekly: z.number(), byok_usage_monthly: z.number(), + byok_usage_weekly: z.number(), created_at: z.string(), - updated_at: z.nullable(z.string()), + creator_user_id: z.nullable(z.string()), + disabled: z.boolean(), expires_at: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - creator_user_id: z.nullable(z.string()), + hash: z.string(), + include_byok_in_limit: z.boolean(), + label: z.string(), + limit: z.number(), + limit_remaining: z.number(), + limit_reset: z.nullable(z.string()), + name: z.string(), + updated_at: z.nullable(z.string()), + usage: z.number(), + usage_daily: z.number(), + usage_monthly: z.number(), + usage_weekly: z.number(), }).transform((v) => { return remap$(v, { - "limit_remaining": "limitRemaining", - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - "usage_daily": "usageDaily", - "usage_weekly": "usageWeekly", - "usage_monthly": "usageMonthly", "byok_usage": "byokUsage", "byok_usage_daily": "byokUsageDaily", - "byok_usage_weekly": "byokUsageWeekly", "byok_usage_monthly": "byokUsageMonthly", + "byok_usage_weekly": "byokUsageWeekly", "created_at": "createdAt", - "updated_at": "updatedAt", - "expires_at": "expiresAt", "creator_user_id": "creatorUserId", + "expires_at": "expiresAt", + "include_byok_in_limit": "includeByokInLimit", + "limit_remaining": "limitRemaining", + "limit_reset": "limitReset", + "updated_at": "updatedAt", + "usage_daily": "usageDaily", + "usage_monthly": "usageMonthly", + "usage_weekly": "usageWeekly", }); }); diff --git a/src/models/operations/listendpoints.ts b/src/models/operations/listendpoints.ts index 26e84519..f5cfb8be 100644 --- a/src/models/operations/listendpoints.ts +++ b/src/models/operations/listendpoints.ts @@ -52,7 +52,13 @@ export type ListEndpointsRequest = { * @remarks */ appCategories?: string | undefined; + /** + * The author/organization of the model + */ author: string; + /** + * The model slug + */ slug: string; }; diff --git a/src/models/operations/listguardrailkeyassignments.ts b/src/models/operations/listguardrailkeyassignments.ts index e5ae4cf2..4b2664a1 100644 --- a/src/models/operations/listguardrailkeyassignments.ts +++ b/src/models/operations/listguardrailkeyassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailKeyAssignmentsGlobals = { /** @@ -58,56 +59,15 @@ export type ListGuardrailKeyAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListGuardrailKeyAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Hash of the assigned API key - */ - keyHash: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * Name of the API key - */ - keyName: string; - /** - * Label of the API key - */ - keyLabel: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of key assignments - */ export type ListGuardrailKeyAssignmentsResponse = { - /** - * List of key assignments - */ - data: Array; - /** - * Total number of key assignments for this guardrail - */ - totalCount: number; + result: models.ListKeyAssignmentsResponse; }; /** @internal */ @@ -116,8 +76,8 @@ export type ListGuardrailKeyAssignmentsRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; id: string; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -129,8 +89,8 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -147,49 +107,15 @@ export function listGuardrailKeyAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailKeyAssignmentsData$inboundSchema: z.ZodType< - ListGuardrailKeyAssignmentsData, - unknown -> = z.object({ - id: z.string(), - key_hash: z.string(), - guardrail_id: z.string(), - key_name: z.string(), - key_label: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "key_hash": "keyHash", - "guardrail_id": "guardrailId", - "key_name": "keyName", - "key_label": "keyLabel", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listGuardrailKeyAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListGuardrailKeyAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailKeyAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailKeyAssignmentsResponse$inboundSchema: z.ZodType< ListGuardrailKeyAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailKeyAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListKeyAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listguardrailmemberassignments.ts b/src/models/operations/listguardrailmemberassignments.ts index a99c37c3..0f4110ee 100644 --- a/src/models/operations/listguardrailmemberassignments.ts +++ b/src/models/operations/listguardrailmemberassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailMemberAssignmentsGlobals = { /** @@ -58,52 +59,15 @@ export type ListGuardrailMemberAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListGuardrailMemberAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Clerk user ID of the assigned member - */ - userId: string; - /** - * Organization ID - */ - organizationId: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of member assignments - */ export type ListGuardrailMemberAssignmentsResponse = { - /** - * List of member assignments - */ - data: Array; - /** - * Total number of member assignments - */ - totalCount: number; + result: models.ListMemberAssignmentsResponse; }; /** @internal */ @@ -112,8 +76,8 @@ export type ListGuardrailMemberAssignmentsRequest$Outbound = { appTitle?: string | undefined; appCategories?: string | undefined; id: string; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -125,8 +89,8 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -143,48 +107,15 @@ export function listGuardrailMemberAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailMemberAssignmentsData$inboundSchema: z.ZodType< - ListGuardrailMemberAssignmentsData, - unknown -> = z.object({ - id: z.string(), - user_id: z.string(), - organization_id: z.string(), - guardrail_id: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "organization_id": "organizationId", - "guardrail_id": "guardrailId", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listGuardrailMemberAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ListGuardrailMemberAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailMemberAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailMemberAssignmentsResponse$inboundSchema: z.ZodType< ListGuardrailMemberAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailMemberAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListMemberAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listguardrails.ts b/src/models/operations/listguardrails.ts index 64618e35..873a94f7 100644 --- a/src/models/operations/listguardrails.ts +++ b/src/models/operations/listguardrails.ts @@ -6,10 +6,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListGuardrailsGlobals = { /** @@ -56,87 +55,15 @@ export type ListGuardrailsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const ListGuardrailsResetInterval = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type ListGuardrailsResetInterval = OpenEnum< - typeof ListGuardrailsResetInterval ->; - -export type ListGuardrailsData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: ListGuardrailsResetInterval | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * List of guardrails - */ export type ListGuardrailsResponse = { - /** - * List of guardrails - */ - data: Array; - /** - * Total number of guardrails - */ - totalCount: number; + result: models.ListGuardrailsResponse; }; /** @internal */ @@ -144,8 +71,8 @@ export type ListGuardrailsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -156,8 +83,8 @@ export const ListGuardrailsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -172,62 +99,15 @@ export function listGuardrailsRequestToJSON( ); } -/** @internal */ -export const ListGuardrailsResetInterval$inboundSchema: z.ZodType< - ListGuardrailsResetInterval, - unknown -> = openEnums.inboundSchema(ListGuardrailsResetInterval); - -/** @internal */ -export const ListGuardrailsData$inboundSchema: z.ZodType< - ListGuardrailsData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(ListGuardrailsResetInterval$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function listGuardrailsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListGuardrailsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListGuardrailsData' from JSON`, - ); -} - /** @internal */ export const ListGuardrailsResponse$inboundSchema: z.ZodType< ListGuardrailsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListGuardrailsData$inboundSchema)), - total_count: z.number(), + Result: models.ListGuardrailsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listkeyassignments.ts b/src/models/operations/listkeyassignments.ts index 800c8962..dd5b016d 100644 --- a/src/models/operations/listkeyassignments.ts +++ b/src/models/operations/listkeyassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListKeyAssignmentsGlobals = { /** @@ -54,56 +55,15 @@ export type ListKeyAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListKeyAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Hash of the assigned API key - */ - keyHash: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * Name of the API key - */ - keyName: string; - /** - * Label of the API key - */ - keyLabel: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of key assignments - */ export type ListKeyAssignmentsResponse = { - /** - * List of key assignments - */ - data: Array; - /** - * Total number of key assignments for this guardrail - */ - totalCount: number; + result: models.ListKeyAssignmentsResponse; }; /** @internal */ @@ -111,8 +71,8 @@ export type ListKeyAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -123,8 +83,8 @@ export const ListKeyAssignmentsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -139,49 +99,15 @@ export function listKeyAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListKeyAssignmentsData$inboundSchema: z.ZodType< - ListKeyAssignmentsData, - unknown -> = z.object({ - id: z.string(), - key_hash: z.string(), - guardrail_id: z.string(), - key_name: z.string(), - key_label: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "key_hash": "keyHash", - "guardrail_id": "guardrailId", - "key_name": "keyName", - "key_label": "keyLabel", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listKeyAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListKeyAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListKeyAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListKeyAssignmentsResponse$inboundSchema: z.ZodType< ListKeyAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListKeyAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListKeyAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listmemberassignments.ts b/src/models/operations/listmemberassignments.ts index 5472421e..d5f57334 100644 --- a/src/models/operations/listmemberassignments.ts +++ b/src/models/operations/listmemberassignments.ts @@ -8,6 +8,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type ListMemberAssignmentsGlobals = { /** @@ -54,52 +55,15 @@ export type ListMemberAssignmentsRequest = { /** * Number of records to skip for pagination */ - offset?: string | undefined; + offset?: number | undefined; /** * Maximum number of records to return (max 100) */ - limit?: string | undefined; + limit?: number | undefined; }; -export type ListMemberAssignmentsData = { - /** - * Unique identifier for the assignment - */ - id: string; - /** - * Clerk user ID of the assigned member - */ - userId: string; - /** - * Organization ID - */ - organizationId: string; - /** - * ID of the guardrail - */ - guardrailId: string; - /** - * User ID of who made the assignment - */ - assignedBy: string | null; - /** - * ISO 8601 timestamp of when the assignment was created - */ - createdAt: string; -}; - -/** - * List of member assignments - */ export type ListMemberAssignmentsResponse = { - /** - * List of member assignments - */ - data: Array; - /** - * Total number of member assignments - */ - totalCount: number; + result: models.ListMemberAssignmentsResponse; }; /** @internal */ @@ -107,8 +71,8 @@ export type ListMemberAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - offset?: string | undefined; - limit?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; }; /** @internal */ @@ -119,8 +83,8 @@ export const ListMemberAssignmentsRequest$outboundSchema: z.ZodType< httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - offset: z.string().optional(), - limit: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", @@ -137,47 +101,15 @@ export function listMemberAssignmentsRequestToJSON( ); } -/** @internal */ -export const ListMemberAssignmentsData$inboundSchema: z.ZodType< - ListMemberAssignmentsData, - unknown -> = z.object({ - id: z.string(), - user_id: z.string(), - organization_id: z.string(), - guardrail_id: z.string(), - assigned_by: z.nullable(z.string()), - created_at: z.string(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "organization_id": "organizationId", - "guardrail_id": "guardrailId", - "assigned_by": "assignedBy", - "created_at": "createdAt", - }); -}); - -export function listMemberAssignmentsDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListMemberAssignmentsData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListMemberAssignmentsData' from JSON`, - ); -} - /** @internal */ export const ListMemberAssignmentsResponse$inboundSchema: z.ZodType< ListMemberAssignmentsResponse, unknown > = z.object({ - data: z.array(z.lazy(() => ListMemberAssignmentsData$inboundSchema)), - total_count: z.number(), + Result: models.ListMemberAssignmentsResponse$inboundSchema, }).transform((v) => { return remap$(v, { - "total_count": "totalCount", + "Result": "result", }); }); diff --git a/src/models/operations/listorganizationmembers.ts b/src/models/operations/listorganizationmembers.ts new file mode 100644 index 00000000..975f7de9 --- /dev/null +++ b/src/models/operations/listorganizationmembers.ts @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cc21259f09b8 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListOrganizationMembersGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ListOrganizationMembersRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Number of records to skip for pagination + */ + offset?: number | undefined; + /** + * Maximum number of records to return (max 100) + */ + limit?: number | undefined; +}; + +/** + * Role of the member in the organization + */ +export const Role = { + OrgAdmin: "org:admin", + OrgMember: "org:member", +} as const; +/** + * Role of the member in the organization + */ +export type Role = OpenEnum; + +export type ListOrganizationMembersData = { + /** + * Email address of the member + */ + email: string; + /** + * First name of the member + */ + firstName: string | null; + /** + * User ID of the organization member + */ + id: string; + /** + * Last name of the member + */ + lastName: string | null; + /** + * Role of the member in the organization + */ + role: Role; +}; + +/** + * List of organization members + */ +export type ListOrganizationMembersResponseBody = { + /** + * List of organization members + */ + data: Array; + /** + * Total number of members in the organization + */ + totalCount: number; +}; + +export type ListOrganizationMembersResponse = { + result: ListOrganizationMembersResponseBody; +}; + +/** @internal */ +export type ListOrganizationMembersRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + offset?: number | undefined; + limit?: number | undefined; +}; + +/** @internal */ +export const ListOrganizationMembersRequest$outboundSchema: z.ZodType< + ListOrganizationMembersRequest$Outbound, + ListOrganizationMembersRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + offset: z.int().optional(), + limit: z.int().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listOrganizationMembersRequestToJSON( + listOrganizationMembersRequest: ListOrganizationMembersRequest, +): string { + return JSON.stringify( + ListOrganizationMembersRequest$outboundSchema.parse( + listOrganizationMembersRequest, + ), + ); +} + +/** @internal */ +export const Role$inboundSchema: z.ZodType = openEnums + .inboundSchema(Role); + +/** @internal */ +export const ListOrganizationMembersData$inboundSchema: z.ZodType< + ListOrganizationMembersData, + unknown +> = z.object({ + email: z.string(), + first_name: z.nullable(z.string()), + id: z.string(), + last_name: z.nullable(z.string()), + role: Role$inboundSchema, +}).transform((v) => { + return remap$(v, { + "first_name": "firstName", + "last_name": "lastName", + }); +}); + +export function listOrganizationMembersDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListOrganizationMembersData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersData' from JSON`, + ); +} + +/** @internal */ +export const ListOrganizationMembersResponseBody$inboundSchema: z.ZodType< + ListOrganizationMembersResponseBody, + unknown +> = z.object({ + data: z.array(z.lazy(() => ListOrganizationMembersData$inboundSchema)), + total_count: z.int(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); + +export function listOrganizationMembersResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListOrganizationMembersResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersResponseBody' from JSON`, + ); +} + +/** @internal */ +export const ListOrganizationMembersResponse$inboundSchema: z.ZodType< + ListOrganizationMembersResponse, + unknown +> = z.object({ + Result: z.lazy(() => ListOrganizationMembersResponseBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +export function listOrganizationMembersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListOrganizationMembersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationMembersResponse' from JSON`, + ); +} diff --git a/src/models/operations/listproviders.ts b/src/models/operations/listproviders.ts index 3b976f95..055f5fcf 100644 --- a/src/models/operations/listproviders.ts +++ b/src/models/operations/listproviders.ts @@ -55,10 +55,7 @@ export type ListProvidersRequest = { appCategories?: string | undefined; }; -/** - * ISO 3166-1 Alpha-2 country code of the provider headquarters - */ -export const Headquarters = { +export const Datacenter = { Ad: "AD", Ae: "AE", Af: "AF", @@ -309,12 +306,12 @@ export const Headquarters = { Zm: "ZM", Zw: "ZW", } as const; +export type Datacenter = OpenEnum; + /** * ISO 3166-1 Alpha-2 country code of the provider headquarters */ -export type Headquarters = OpenEnum; - -export const Datacenter = { +export const Headquarters = { Ad: "AD", Ae: "AE", Af: "AF", @@ -565,37 +562,40 @@ export const Datacenter = { Zm: "ZM", Zw: "ZW", } as const; -export type Datacenter = OpenEnum; +/** + * ISO 3166-1 Alpha-2 country code of the provider headquarters + */ +export type Headquarters = OpenEnum; export type ListProvidersData = { /** - * Display name of the provider + * ISO 3166-1 Alpha-2 country codes of the provider datacenter locations */ - name: string; + datacenters?: Array | null | undefined; /** - * URL-friendly identifier for the provider + * ISO 3166-1 Alpha-2 country code of the provider headquarters */ - slug: string; + headquarters?: Headquarters | null | undefined; + /** + * Display name of the provider + */ + name: string; /** * URL to the provider's privacy policy */ privacyPolicyUrl: string | null; /** - * URL to the provider's terms of service + * URL-friendly identifier for the provider */ - termsOfServiceUrl?: string | null | undefined; + slug: string; /** * URL to the provider's status page */ statusPageUrl?: string | null | undefined; /** - * ISO 3166-1 Alpha-2 country code of the provider headquarters - */ - headquarters?: Headquarters | null | undefined; - /** - * ISO 3166-1 Alpha-2 country codes of the provider datacenter locations + * URL to the provider's terms of service */ - datacenters?: Array | null | undefined; + termsOfServiceUrl?: string | null | undefined; }; /** @@ -634,31 +634,31 @@ export function listProvidersRequestToJSON( ); } -/** @internal */ -export const Headquarters$inboundSchema: z.ZodType = - openEnums.inboundSchema(Headquarters); - /** @internal */ export const Datacenter$inboundSchema: z.ZodType = openEnums.inboundSchema(Datacenter); +/** @internal */ +export const Headquarters$inboundSchema: z.ZodType = + openEnums.inboundSchema(Headquarters); + /** @internal */ export const ListProvidersData$inboundSchema: z.ZodType< ListProvidersData, unknown > = z.object({ + datacenters: z.nullable(z.array(Datacenter$inboundSchema)).optional(), + headquarters: z.nullable(Headquarters$inboundSchema).optional(), name: z.string(), - slug: z.string(), privacy_policy_url: z.nullable(z.string()), - terms_of_service_url: z.nullable(z.string()).optional(), + slug: z.string(), status_page_url: z.nullable(z.string()).optional(), - headquarters: z.nullable(Headquarters$inboundSchema).optional(), - datacenters: z.nullable(z.array(Datacenter$inboundSchema)).optional(), + terms_of_service_url: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "privacy_policy_url": "privacyPolicyUrl", - "terms_of_service_url": "termsOfServiceUrl", "status_page_url": "statusPageUrl", + "terms_of_service_url": "termsOfServiceUrl", }); }); diff --git a/src/models/operations/listvideoscontent.ts b/src/models/operations/listvideoscontent.ts new file mode 100644 index 00000000..459374b0 --- /dev/null +++ b/src/models/operations/listvideoscontent.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6d6644a39a85 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ListVideosContentGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ListVideosContentRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + jobId: string; + index?: number | null | undefined; +}; + +/** @internal */ +export type ListVideosContentRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + jobId: string; + index: number | null; +}; + +/** @internal */ +export const ListVideosContentRequest$outboundSchema: z.ZodType< + ListVideosContentRequest$Outbound, + ListVideosContentRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + jobId: z.string(), + index: z.nullable(z.int().default(0)), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listVideosContentRequestToJSON( + listVideosContentRequest: ListVideosContentRequest, +): string { + return JSON.stringify( + ListVideosContentRequest$outboundSchema.parse(listVideosContentRequest), + ); +} diff --git a/src/models/operations/listvideosmodels.ts b/src/models/operations/listvideosmodels.ts new file mode 100644 index 00000000..10957123 --- /dev/null +++ b/src/models/operations/listvideosmodels.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3c3814660d7c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ListVideosModelsGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ListVideosModelsRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +/** @internal */ +export type ListVideosModelsRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; +}; + +/** @internal */ +export const ListVideosModelsRequest$outboundSchema: z.ZodType< + ListVideosModelsRequest$Outbound, + ListVideosModelsRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listVideosModelsRequestToJSON( + listVideosModelsRequest: ListVideosModelsRequest, +): string { + return JSON.stringify( + ListVideosModelsRequest$outboundSchema.parse(listVideosModelsRequest), + ); +} diff --git a/src/models/operations/updateguardrail.ts b/src/models/operations/updateguardrail.ts index 0cc62a6c..7c5dc47c 100644 --- a/src/models/operations/updateguardrail.ts +++ b/src/models/operations/updateguardrail.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import * as openEnums from "../../types/enums.js"; -import { OpenEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; export type UpdateGuardrailGlobals = { /** @@ -33,56 +29,6 @@ export type UpdateGuardrailGlobals = { appCategories?: string | undefined; }; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const UpdateGuardrailResetIntervalRequest = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type UpdateGuardrailResetIntervalRequest = OpenEnum< - typeof UpdateGuardrailResetIntervalRequest ->; - -export type UpdateGuardrailRequestBody = { - /** - * New name for the guardrail - */ - name?: string | undefined; - /** - * New description for the guardrail - */ - description?: string | null | undefined; - /** - * New spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: UpdateGuardrailResetIntervalRequest | null | undefined; - /** - * New list of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model identifiers (slug or canonical_slug accepted) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; -}; - export type UpdateGuardrailRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -107,142 +53,16 @@ export type UpdateGuardrailRequest = { * The unique identifier of the guardrail to update */ id: string; - requestBody: UpdateGuardrailRequestBody; -}; - -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export const UpdateGuardrailResetIntervalResponse = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", -} as const; -/** - * Interval at which the limit resets (daily, weekly, monthly) - */ -export type UpdateGuardrailResetIntervalResponse = OpenEnum< - typeof UpdateGuardrailResetIntervalResponse ->; - -/** - * The updated guardrail - */ -export type UpdateGuardrailData = { - /** - * Unique identifier for the guardrail - */ - id: string; - /** - * Name of the guardrail - */ - name: string; - /** - * Description of the guardrail - */ - description?: string | null | undefined; - /** - * Spending limit in USD - */ - limitUsd?: number | null | undefined; - /** - * Interval at which the limit resets (daily, weekly, monthly) - */ - resetInterval?: UpdateGuardrailResetIntervalResponse | null | undefined; - /** - * List of allowed provider IDs - */ - allowedProviders?: Array | null | undefined; - /** - * List of provider IDs to exclude from routing - */ - ignoredProviders?: Array | null | undefined; - /** - * Array of model canonical_slugs (immutable identifiers) - */ - allowedModels?: Array | null | undefined; - /** - * Whether to enforce zero data retention - */ - enforceZdr?: boolean | null | undefined; - /** - * ISO 8601 timestamp of when the guardrail was created - */ - createdAt: string; - /** - * ISO 8601 timestamp of when the guardrail was last updated - */ - updatedAt?: string | null | undefined; -}; - -/** - * Guardrail updated successfully - */ -export type UpdateGuardrailResponse = { - /** - * The updated guardrail - */ - data: UpdateGuardrailData; + updateGuardrailRequest: models.UpdateGuardrailRequest; }; -/** @internal */ -export const UpdateGuardrailResetIntervalRequest$outboundSchema: z.ZodType< - string, - UpdateGuardrailResetIntervalRequest -> = openEnums.outboundSchema(UpdateGuardrailResetIntervalRequest); - -/** @internal */ -export type UpdateGuardrailRequestBody$Outbound = { - name?: string | undefined; - description?: string | null | undefined; - limit_usd?: number | null | undefined; - reset_interval?: string | null | undefined; - allowed_providers?: Array | null | undefined; - ignored_providers?: Array | null | undefined; - allowed_models?: Array | null | undefined; - enforce_zdr?: boolean | null | undefined; -}; - -/** @internal */ -export const UpdateGuardrailRequestBody$outboundSchema: z.ZodType< - UpdateGuardrailRequestBody$Outbound, - UpdateGuardrailRequestBody -> = z.object({ - name: z.string().optional(), - description: z.nullable(z.string()).optional(), - limitUsd: z.nullable(z.number()).optional(), - resetInterval: z.nullable(UpdateGuardrailResetIntervalRequest$outboundSchema) - .optional(), - allowedProviders: z.nullable(z.array(z.string())).optional(), - ignoredProviders: z.nullable(z.array(z.string())).optional(), - allowedModels: z.nullable(z.array(z.string())).optional(), - enforceZdr: z.nullable(z.boolean()).optional(), -}).transform((v) => { - return remap$(v, { - limitUsd: "limit_usd", - resetInterval: "reset_interval", - allowedProviders: "allowed_providers", - ignoredProviders: "ignored_providers", - allowedModels: "allowed_models", - enforceZdr: "enforce_zdr", - }); -}); - -export function updateGuardrailRequestBodyToJSON( - updateGuardrailRequestBody: UpdateGuardrailRequestBody, -): string { - return JSON.stringify( - UpdateGuardrailRequestBody$outboundSchema.parse(updateGuardrailRequestBody), - ); -} - /** @internal */ export type UpdateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; id: string; - RequestBody: UpdateGuardrailRequestBody$Outbound; + UpdateGuardrailRequest: models.UpdateGuardrailRequest$Outbound; }; /** @internal */ @@ -254,11 +74,11 @@ export const UpdateGuardrailRequest$outboundSchema: z.ZodType< appTitle: z.string().optional(), appCategories: z.string().optional(), id: z.string(), - requestBody: z.lazy(() => UpdateGuardrailRequestBody$outboundSchema), + updateGuardrailRequest: models.UpdateGuardrailRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - requestBody: "RequestBody", + updateGuardrailRequest: "UpdateGuardrailRequest", }); }); @@ -269,67 +89,3 @@ export function updateGuardrailRequestToJSON( UpdateGuardrailRequest$outboundSchema.parse(updateGuardrailRequest), ); } - -/** @internal */ -export const UpdateGuardrailResetIntervalResponse$inboundSchema: z.ZodType< - UpdateGuardrailResetIntervalResponse, - unknown -> = openEnums.inboundSchema(UpdateGuardrailResetIntervalResponse); - -/** @internal */ -export const UpdateGuardrailData$inboundSchema: z.ZodType< - UpdateGuardrailData, - unknown -> = z.object({ - id: z.string(), - name: z.string(), - description: z.nullable(z.string()).optional(), - limit_usd: z.nullable(z.number()).optional(), - reset_interval: z.nullable(UpdateGuardrailResetIntervalResponse$inboundSchema) - .optional(), - allowed_providers: z.nullable(z.array(z.string())).optional(), - ignored_providers: z.nullable(z.array(z.string())).optional(), - allowed_models: z.nullable(z.array(z.string())).optional(), - enforce_zdr: z.nullable(z.boolean()).optional(), - created_at: z.string(), - updated_at: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "limit_usd": "limitUsd", - "reset_interval": "resetInterval", - "allowed_providers": "allowedProviders", - "ignored_providers": "ignoredProviders", - "allowed_models": "allowedModels", - "enforce_zdr": "enforceZdr", - "created_at": "createdAt", - "updated_at": "updatedAt", - }); -}); - -export function updateGuardrailDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateGuardrailData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateGuardrailData' from JSON`, - ); -} - -/** @internal */ -export const UpdateGuardrailResponse$inboundSchema: z.ZodType< - UpdateGuardrailResponse, - unknown -> = z.object({ - data: z.lazy(() => UpdateGuardrailData$inboundSchema), -}); - -export function updateGuardrailResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateGuardrailResponse' from JSON`, - ); -} diff --git a/src/models/operations/updatekeys.ts b/src/models/operations/updatekeys.ts index 668b738b..629e4251 100644 --- a/src/models/operations/updatekeys.ts +++ b/src/models/operations/updatekeys.ts @@ -47,26 +47,26 @@ export const UpdateKeysLimitReset = { export type UpdateKeysLimitReset = OpenEnum; export type UpdateKeysRequestBody = { - /** - * New name for the API key - */ - name?: string | undefined; /** * Whether to disable the API key */ disabled?: boolean | undefined; + /** + * Whether to include BYOK usage in the limit + */ + includeByokInLimit?: boolean | undefined; /** * New spending limit for the API key in USD */ - limit?: number | null | undefined; + limit?: number | undefined; /** * 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. */ limitReset?: UpdateKeysLimitReset | null | undefined; /** - * Whether to include BYOK usage in the limit + * New name for the API key */ - includeByokInLimit?: boolean | undefined; + name?: string | undefined; }; export type UpdateKeysRequest = { @@ -101,85 +101,85 @@ export type UpdateKeysRequest = { */ export type UpdateKeysData = { /** - * Unique hash identifier for the API key + * Total external BYOK usage (in USD) for the API key */ - hash: string; + byokUsage: number; /** - * Name of the API key + * External BYOK usage (in USD) for the current UTC day */ - name: string; + byokUsageDaily: number; /** - * Human-readable label for the API key + * External BYOK usage (in USD) for current UTC month */ - label: string; + byokUsageMonthly: number; /** - * Whether the API key is disabled + * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) */ - disabled: boolean; + byokUsageWeekly: number; /** - * Spending limit for the API key in USD + * ISO 8601 timestamp of when the API key was created */ - limit: number | null; + createdAt: string; /** - * Remaining spending limit in USD + * 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. */ - limitRemaining: number | null; + creatorUserId: string | null; /** - * Type of limit reset for the API key + * Whether the API key is disabled */ - limitReset: string | null; + disabled: boolean; /** - * Whether to include external BYOK usage in the credit limit + * ISO 8601 UTC timestamp when the API key expires, or null if no expiration */ - includeByokInLimit: boolean; + expiresAt?: Date | null | undefined; /** - * Total OpenRouter credit usage (in USD) for the API key + * Unique hash identifier for the API key */ - usage: number; + hash: string; /** - * OpenRouter credit usage (in USD) for the current UTC day + * Whether to include external BYOK usage in the credit limit */ - usageDaily: number; + includeByokInLimit: boolean; /** - * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) + * Human-readable label for the API key */ - usageWeekly: number; + label: string; /** - * OpenRouter credit usage (in USD) for the current UTC month + * Spending limit for the API key in USD */ - usageMonthly: number; + limit: number; /** - * Total external BYOK usage (in USD) for the API key + * Remaining spending limit in USD */ - byokUsage: number; + limitRemaining: number; /** - * External BYOK usage (in USD) for the current UTC day + * Type of limit reset for the API key */ - byokUsageDaily: number; + limitReset: string | null; /** - * External BYOK usage (in USD) for the current UTC week (Monday-Sunday) + * Name of the API key */ - byokUsageWeekly: number; + name: string; /** - * External BYOK usage (in USD) for current UTC month + * ISO 8601 timestamp of when the API key was last updated */ - byokUsageMonthly: number; + updatedAt: string | null; /** - * ISO 8601 timestamp of when the API key was created + * Total OpenRouter credit usage (in USD) for the API key */ - createdAt: string; + usage: number; /** - * ISO 8601 timestamp of when the API key was last updated + * OpenRouter credit usage (in USD) for the current UTC day */ - updatedAt: string | null; + usageDaily: number; /** - * ISO 8601 UTC timestamp when the API key expires, or null if no expiration + * OpenRouter credit usage (in USD) for the current UTC month */ - expiresAt?: Date | null | undefined; + usageMonthly: number; /** - * 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. + * OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) */ - creatorUserId: string | null; + usageWeekly: number; }; /** @@ -200,11 +200,11 @@ export const UpdateKeysLimitReset$outboundSchema: z.ZodType< /** @internal */ export type UpdateKeysRequestBody$Outbound = { - name?: string | undefined; disabled?: boolean | undefined; - limit?: number | null | undefined; - limit_reset?: string | null | undefined; include_byok_in_limit?: boolean | undefined; + limit?: number | undefined; + limit_reset?: string | null | undefined; + name?: string | undefined; }; /** @internal */ @@ -212,15 +212,15 @@ export const UpdateKeysRequestBody$outboundSchema: z.ZodType< UpdateKeysRequestBody$Outbound, UpdateKeysRequestBody > = z.object({ - name: z.string().optional(), disabled: z.boolean().optional(), - limit: z.nullable(z.number()).optional(), - limitReset: z.nullable(UpdateKeysLimitReset$outboundSchema).optional(), includeByokInLimit: z.boolean().optional(), + limit: z.number().optional(), + limitReset: z.nullable(UpdateKeysLimitReset$outboundSchema).optional(), + name: z.string().optional(), }).transform((v) => { return remap$(v, { - limitReset: "limit_reset", includeByokInLimit: "include_byok_in_limit", + limitReset: "limit_reset", }); }); @@ -269,44 +269,44 @@ export function updateKeysRequestToJSON( /** @internal */ export const UpdateKeysData$inboundSchema: z.ZodType = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limit_remaining: z.nullable(z.number()), - limit_reset: z.nullable(z.string()), - include_byok_in_limit: z.boolean(), - usage: z.number(), - usage_daily: z.number(), - usage_weekly: z.number(), - usage_monthly: z.number(), byok_usage: z.number(), byok_usage_daily: z.number(), - byok_usage_weekly: z.number(), byok_usage_monthly: z.number(), + byok_usage_weekly: z.number(), created_at: z.string(), - updated_at: z.nullable(z.string()), + creator_user_id: z.nullable(z.string()), + disabled: z.boolean(), expires_at: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - creator_user_id: z.nullable(z.string()), + hash: z.string(), + include_byok_in_limit: z.boolean(), + label: z.string(), + limit: z.number(), + limit_remaining: z.number(), + limit_reset: z.nullable(z.string()), + name: z.string(), + updated_at: z.nullable(z.string()), + usage: z.number(), + usage_daily: z.number(), + usage_monthly: z.number(), + usage_weekly: z.number(), }).transform((v) => { return remap$(v, { - "limit_remaining": "limitRemaining", - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - "usage_daily": "usageDaily", - "usage_weekly": "usageWeekly", - "usage_monthly": "usageMonthly", "byok_usage": "byokUsage", "byok_usage_daily": "byokUsageDaily", - "byok_usage_weekly": "byokUsageWeekly", "byok_usage_monthly": "byokUsageMonthly", + "byok_usage_weekly": "byokUsageWeekly", "created_at": "createdAt", - "updated_at": "updatedAt", - "expires_at": "expiresAt", "creator_user_id": "creatorUserId", + "expires_at": "expiresAt", + "include_byok_in_limit": "includeByokInLimit", + "limit_remaining": "limitRemaining", + "limit_reset": "limitReset", + "updated_at": "updatedAt", + "usage_daily": "usageDaily", + "usage_monthly": "usageMonthly", + "usage_weekly": "usageWeekly", }); }); diff --git a/src/models/outputapplypatchservertoolitem.ts b/src/models/outputapplypatchservertoolitem.ts new file mode 100644 index 00000000..78c82a64 --- /dev/null +++ b/src/models/outputapplypatchservertoolitem.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 761046712899 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:apply_patch server tool output item + */ +export type OutputApplyPatchServerToolItem = { + filePath?: string | undefined; + id?: string | undefined; + patch?: string | undefined; + status: ToolCallStatus; + type: "openrouter:apply_patch"; +}; + +/** @internal */ +export const OutputApplyPatchServerToolItem$inboundSchema: z.ZodType< + OutputApplyPatchServerToolItem, + unknown +> = z.object({ + filePath: z.string().optional(), + id: z.string().optional(), + patch: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:apply_patch"), +}); + +export function outputApplyPatchServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputApplyPatchServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputApplyPatchServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputbashservertoolitem.ts b/src/models/outputbashservertoolitem.ts new file mode 100644 index 00000000..321efdac --- /dev/null +++ b/src/models/outputbashservertoolitem.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8eeee25f4818 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:bash server tool output item + */ +export type OutputBashServerToolItem = { + command?: string | undefined; + exitCode?: number | undefined; + id?: string | undefined; + status: ToolCallStatus; + stderr?: string | undefined; + stdout?: string | undefined; + type: "openrouter:bash"; +}; + +/** @internal */ +export const OutputBashServerToolItem$inboundSchema: z.ZodType< + OutputBashServerToolItem, + unknown +> = z.object({ + command: z.string().optional(), + exitCode: z.int().optional(), + id: z.string().optional(), + status: ToolCallStatus$inboundSchema, + stderr: z.string().optional(), + stdout: z.string().optional(), + type: z.literal("openrouter:bash"), +}); + +export function outputBashServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputBashServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputBashServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputbrowseruseservertoolitem.ts b/src/models/outputbrowseruseservertoolitem.ts new file mode 100644 index 00000000..7528c6ac --- /dev/null +++ b/src/models/outputbrowseruseservertoolitem.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5ad5586d0533 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:browser_use server tool output item + */ +export type OutputBrowserUseServerToolItem = { + action?: string | undefined; + id?: string | undefined; + screenshotB64?: string | undefined; + status: ToolCallStatus; + type: "openrouter:browser_use"; +}; + +/** @internal */ +export const OutputBrowserUseServerToolItem$inboundSchema: z.ZodType< + OutputBrowserUseServerToolItem, + unknown +> = z.object({ + action: z.string().optional(), + id: z.string().optional(), + screenshotB64: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:browser_use"), +}); + +export function outputBrowserUseServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputBrowserUseServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputBrowserUseServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputcodeinterpretercallitem.ts b/src/models/outputcodeinterpretercallitem.ts new file mode 100644 index 00000000..0d62c987 --- /dev/null +++ b/src/models/outputcodeinterpretercallitem.ts @@ -0,0 +1,138 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ee080e2eccae + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +export type OutputLogs = { + logs: string; + type: "logs"; +}; + +export type OutputImage = { + type: "image"; + url: string; +}; + +export type OutputCodeInterpreterCallItemOutputUnion = + | OutputImage + | OutputLogs + | discriminatedUnionTypes.Unknown<"type">; + +/** + * A code interpreter execution call with outputs + */ +export type OutputCodeInterpreterCallItem = { + code: string | null; + containerId: string; + id: string; + outputs: + | Array> + | null; + status: ToolCallStatus; + type: "code_interpreter_call"; +}; + +/** @internal */ +export const OutputLogs$inboundSchema: z.ZodType = z + .object({ + logs: z.string(), + type: z.literal("logs"), + }); + +export function outputLogsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputLogs$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputLogs' from JSON`, + ); +} + +/** @internal */ +export const OutputImage$inboundSchema: z.ZodType = z + .object({ + type: z.literal("image"), + url: z.string(), + }); + +export function outputImageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputImage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputImage' from JSON`, + ); +} + +/** @internal */ +export const OutputCodeInterpreterCallItemOutputUnion$inboundSchema: z.ZodType< + OutputCodeInterpreterCallItemOutputUnion, + unknown +> = discriminatedUnion("type", { + image: z.lazy(() => OutputImage$inboundSchema), + logs: z.lazy(() => OutputLogs$inboundSchema), +}); + +export function outputCodeInterpreterCallItemOutputUnionFromJSON( + jsonString: string, +): SafeParseResult< + OutputCodeInterpreterCallItemOutputUnion, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OutputCodeInterpreterCallItemOutputUnion$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OutputCodeInterpreterCallItemOutputUnion' from JSON`, + ); +} + +/** @internal */ +export const OutputCodeInterpreterCallItem$inboundSchema: z.ZodType< + OutputCodeInterpreterCallItem, + unknown +> = z.object({ + code: z.nullable(z.string()), + container_id: z.string(), + id: z.string(), + outputs: z.nullable( + z.array(discriminatedUnion("type", { + image: z.lazy(() => OutputImage$inboundSchema), + logs: z.lazy(() => + OutputLogs$inboundSchema + ), + })), + ), + status: ToolCallStatus$inboundSchema, + type: z.literal("code_interpreter_call"), +}).transform((v) => { + return remap$(v, { + "container_id": "containerId", + }); +}); + +export function outputCodeInterpreterCallItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputCodeInterpreterCallItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputCodeInterpreterCallItem' from JSON`, + ); +} diff --git a/src/models/outputcodeinterpreterservertoolitem.ts b/src/models/outputcodeinterpreterservertoolitem.ts new file mode 100644 index 00000000..26cce532 --- /dev/null +++ b/src/models/outputcodeinterpreterservertoolitem.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 16f87f6046c4 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:code_interpreter server tool output item + */ +export type OutputCodeInterpreterServerToolItem = { + code?: string | undefined; + exitCode?: number | undefined; + id?: string | undefined; + language?: string | undefined; + status: ToolCallStatus; + stderr?: string | undefined; + stdout?: string | undefined; + type: "openrouter:code_interpreter"; +}; + +/** @internal */ +export const OutputCodeInterpreterServerToolItem$inboundSchema: z.ZodType< + OutputCodeInterpreterServerToolItem, + unknown +> = z.object({ + code: z.string().optional(), + exitCode: z.int().optional(), + id: z.string().optional(), + language: z.string().optional(), + status: ToolCallStatus$inboundSchema, + stderr: z.string().optional(), + stdout: z.string().optional(), + type: z.literal("openrouter:code_interpreter"), +}); + +export function outputCodeInterpreterServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OutputCodeInterpreterServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputCodeInterpreterServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputcomputercallitem.ts b/src/models/outputcomputercallitem.ts new file mode 100644 index 00000000..7116d303 --- /dev/null +++ b/src/models/outputcomputercallitem.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fd4439fdf358 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type PendingSafetyCheck = { + code: string; + id: string; + message: string; +}; + +export const OutputComputerCallItemStatus = { + Completed: "completed", + Incomplete: "incomplete", + InProgress: "in_progress", +} as const; +export type OutputComputerCallItemStatus = OpenEnum< + typeof OutputComputerCallItemStatus +>; + +export type OutputComputerCallItem = { + action?: any | null | undefined; + callId: string; + id?: string | undefined; + pendingSafetyChecks: Array; + status: OutputComputerCallItemStatus; + type: "computer_call"; +}; + +/** @internal */ +export const PendingSafetyCheck$inboundSchema: z.ZodType< + PendingSafetyCheck, + unknown +> = z.object({ + code: z.string(), + id: z.string(), + message: z.string(), +}); + +export function pendingSafetyCheckFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PendingSafetyCheck$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PendingSafetyCheck' from JSON`, + ); +} + +/** @internal */ +export const OutputComputerCallItemStatus$inboundSchema: z.ZodType< + OutputComputerCallItemStatus, + unknown +> = openEnums.inboundSchema(OutputComputerCallItemStatus); + +/** @internal */ +export const OutputComputerCallItem$inboundSchema: z.ZodType< + OutputComputerCallItem, + unknown +> = z.object({ + action: z.nullable(z.any()).optional(), + call_id: z.string(), + id: z.string().optional(), + pending_safety_checks: z.array( + z.lazy(() => PendingSafetyCheck$inboundSchema), + ), + status: OutputComputerCallItemStatus$inboundSchema, + type: z.literal("computer_call"), +}).transform((v) => { + return remap$(v, { + "call_id": "callId", + "pending_safety_checks": "pendingSafetyChecks", + }); +}); + +export function outputComputerCallItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputComputerCallItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputComputerCallItem' from JSON`, + ); +} diff --git a/src/models/outputdatetimeitem.ts b/src/models/outputdatetimeitem.ts index 37302b54..d40212a2 100644 --- a/src/models/outputdatetimeitem.ts +++ b/src/models/outputdatetimeitem.ts @@ -4,58 +4,65 @@ */ import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; export const OutputDatetimeItemType = { OpenrouterDatetime: "openrouter:datetime", } as const; export type OutputDatetimeItemType = ClosedEnum; -export const OutputDatetimeItemStatus = { - Completed: "completed", - InProgress: "in_progress", - Incomplete: "incomplete", -} as const; -export type OutputDatetimeItemStatus = OpenEnum< - typeof OutputDatetimeItemStatus ->; - /** * An openrouter:datetime server tool output item */ export type OutputDatetimeItem = { - type: OutputDatetimeItemType; - id?: string | undefined; - status: OutputDatetimeItemStatus; /** * ISO 8601 datetime string */ datetime: string; + id?: string | undefined; + status: ToolCallStatus; /** * IANA timezone name */ timezone: string; + type: OutputDatetimeItemType; }; /** @internal */ -export const OutputDatetimeItemType$outboundSchema: z.ZodEnum< +export const OutputDatetimeItemType$inboundSchema: z.ZodEnum< typeof OutputDatetimeItemType > = z.enum(OutputDatetimeItemType); - /** @internal */ -export const OutputDatetimeItemStatus$outboundSchema: z.ZodType< - string, - OutputDatetimeItemStatus -> = openEnums.outboundSchema(OutputDatetimeItemStatus); +export const OutputDatetimeItemType$outboundSchema: z.ZodEnum< + typeof OutputDatetimeItemType +> = OutputDatetimeItemType$inboundSchema; +/** @internal */ +export const OutputDatetimeItem$inboundSchema: z.ZodType< + OutputDatetimeItem, + unknown +> = z.object({ + datetime: z.string(), + id: z.string().optional(), + status: ToolCallStatus$inboundSchema, + timezone: z.string(), + type: OutputDatetimeItemType$inboundSchema, +}); /** @internal */ export type OutputDatetimeItem$Outbound = { - type: string; + datetime: string; id?: string | undefined; status: string; - datetime: string; timezone: string; + type: string; }; /** @internal */ @@ -63,11 +70,11 @@ export const OutputDatetimeItem$outboundSchema: z.ZodType< OutputDatetimeItem$Outbound, OutputDatetimeItem > = z.object({ - type: OutputDatetimeItemType$outboundSchema, - id: z.string().optional(), - status: OutputDatetimeItemStatus$outboundSchema, datetime: z.string(), + id: z.string().optional(), + status: ToolCallStatus$outboundSchema, timezone: z.string(), + type: OutputDatetimeItemType$outboundSchema, }); export function outputDatetimeItemToJSON( @@ -77,3 +84,12 @@ export function outputDatetimeItemToJSON( OutputDatetimeItem$outboundSchema.parse(outputDatetimeItem), ); } +export function outputDatetimeItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputDatetimeItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputDatetimeItem' from JSON`, + ); +} diff --git a/src/models/outputfilesearchcallitem.ts b/src/models/outputfilesearchcallitem.ts index 76d723fe..94f27e36 100644 --- a/src/models/outputfilesearchcallitem.ts +++ b/src/models/outputfilesearchcallitem.ts @@ -22,10 +22,10 @@ export type OutputFileSearchCallItemType = ClosedEnum< >; export type OutputFileSearchCallItem = { - type: OutputFileSearchCallItemType; id: string; queries: Array; status: WebSearchStatus; + type: OutputFileSearchCallItemType; }; /** @internal */ @@ -42,17 +42,17 @@ export const OutputFileSearchCallItem$inboundSchema: z.ZodType< OutputFileSearchCallItem, unknown > = z.object({ - type: OutputFileSearchCallItemType$inboundSchema, id: z.string(), queries: z.array(z.string()), status: WebSearchStatus$inboundSchema, + type: OutputFileSearchCallItemType$inboundSchema, }); /** @internal */ export type OutputFileSearchCallItem$Outbound = { - type: string; id: string; queries: Array; status: string; + type: string; }; /** @internal */ @@ -60,10 +60,10 @@ export const OutputFileSearchCallItem$outboundSchema: z.ZodType< OutputFileSearchCallItem$Outbound, OutputFileSearchCallItem > = z.object({ - type: OutputFileSearchCallItemType$outboundSchema, id: z.string(), queries: z.array(z.string()), status: WebSearchStatus$outboundSchema, + type: OutputFileSearchCallItemType$outboundSchema, }); export function outputFileSearchCallItemToJSON( diff --git a/src/models/outputfilesearchservertoolitem.ts b/src/models/outputfilesearchservertoolitem.ts new file mode 100644 index 00000000..8c26b44e --- /dev/null +++ b/src/models/outputfilesearchservertoolitem.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3e5afbd64572 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:file_search server tool output item + */ +export type OutputFileSearchServerToolItem = { + id?: string | undefined; + queries?: Array | undefined; + status: ToolCallStatus; + type: "openrouter:file_search"; +}; + +/** @internal */ +export const OutputFileSearchServerToolItem$inboundSchema: z.ZodType< + OutputFileSearchServerToolItem, + unknown +> = z.object({ + id: z.string().optional(), + queries: z.array(z.string()).optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:file_search"), +}); + +export function outputFileSearchServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputFileSearchServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputFileSearchServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputfunctioncallitem.ts b/src/models/outputfunctioncallitem.ts index 1669c2dc..4a899198 100644 --- a/src/models/outputfunctioncallitem.ts +++ b/src/models/outputfunctioncallitem.ts @@ -10,13 +10,6 @@ import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OutputFunctionCallItemType = { - FunctionCall: "function_call", -} as const; -export type OutputFunctionCallItemType = ClosedEnum< - typeof OutputFunctionCallItemType ->; - export const OutputFunctionCallItemStatusInProgress = { InProgress: "in_progress", } as const; @@ -43,28 +36,26 @@ export type OutputFunctionCallItemStatusUnion = | OutputFunctionCallItemStatusIncomplete | OutputFunctionCallItemStatusInProgress; +export const OutputFunctionCallItemType = { + FunctionCall: "function_call", +} as const; +export type OutputFunctionCallItemType = ClosedEnum< + typeof OutputFunctionCallItemType +>; + export type OutputFunctionCallItem = { - type: OutputFunctionCallItemType; - id?: string | undefined; - name: string; arguments: string; callId: string; + id?: string | undefined; + name: string; status?: | OutputFunctionCallItemStatusCompleted | OutputFunctionCallItemStatusIncomplete | OutputFunctionCallItemStatusInProgress | undefined; + type: OutputFunctionCallItemType; }; -/** @internal */ -export const OutputFunctionCallItemType$inboundSchema: z.ZodEnum< - typeof OutputFunctionCallItemType -> = z.enum(OutputFunctionCallItemType); -/** @internal */ -export const OutputFunctionCallItemType$outboundSchema: z.ZodEnum< - typeof OutputFunctionCallItemType -> = OutputFunctionCallItemType$inboundSchema; - /** @internal */ export const OutputFunctionCallItemStatusInProgress$inboundSchema: z.ZodEnum< typeof OutputFunctionCallItemStatusInProgress @@ -136,21 +127,30 @@ export function outputFunctionCallItemStatusUnionFromJSON( ); } +/** @internal */ +export const OutputFunctionCallItemType$inboundSchema: z.ZodEnum< + typeof OutputFunctionCallItemType +> = z.enum(OutputFunctionCallItemType); +/** @internal */ +export const OutputFunctionCallItemType$outboundSchema: z.ZodEnum< + typeof OutputFunctionCallItemType +> = OutputFunctionCallItemType$inboundSchema; + /** @internal */ export const OutputFunctionCallItem$inboundSchema: z.ZodType< OutputFunctionCallItem, unknown > = z.object({ - type: OutputFunctionCallItemType$inboundSchema, - id: z.string().optional(), - name: z.string(), arguments: z.string(), call_id: z.string(), + id: z.string().optional(), + name: z.string(), status: z.union([ OutputFunctionCallItemStatusCompleted$inboundSchema, OutputFunctionCallItemStatusIncomplete$inboundSchema, OutputFunctionCallItemStatusInProgress$inboundSchema, ]).optional(), + type: OutputFunctionCallItemType$inboundSchema, }).transform((v) => { return remap$(v, { "call_id": "callId", @@ -158,12 +158,12 @@ export const OutputFunctionCallItem$inboundSchema: z.ZodType< }); /** @internal */ export type OutputFunctionCallItem$Outbound = { - type: string; - id?: string | undefined; - name: string; arguments: string; call_id: string; + id?: string | undefined; + name: string; status?: string | string | string | undefined; + type: string; }; /** @internal */ @@ -171,16 +171,16 @@ export const OutputFunctionCallItem$outboundSchema: z.ZodType< OutputFunctionCallItem$Outbound, OutputFunctionCallItem > = z.object({ - type: OutputFunctionCallItemType$outboundSchema, - id: z.string().optional(), - name: z.string(), arguments: z.string(), callId: z.string(), + id: z.string().optional(), + name: z.string(), status: z.union([ OutputFunctionCallItemStatusCompleted$outboundSchema, OutputFunctionCallItemStatusIncomplete$outboundSchema, OutputFunctionCallItemStatusInProgress$outboundSchema, ]).optional(), + type: OutputFunctionCallItemType$outboundSchema, }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/outputimagegenerationcallitem.ts b/src/models/outputimagegenerationcallitem.ts index be54e173..25855935 100644 --- a/src/models/outputimagegenerationcallitem.ts +++ b/src/models/outputimagegenerationcallitem.ts @@ -22,10 +22,10 @@ export type OutputImageGenerationCallItemType = ClosedEnum< >; export type OutputImageGenerationCallItem = { - type: OutputImageGenerationCallItemType; id: string; result?: string | null | undefined; status: ImageGenerationStatus; + type: OutputImageGenerationCallItemType; }; /** @internal */ @@ -42,17 +42,17 @@ export const OutputImageGenerationCallItem$inboundSchema: z.ZodType< OutputImageGenerationCallItem, unknown > = z.object({ - type: OutputImageGenerationCallItemType$inboundSchema, id: z.string(), result: z.nullable(z.string()).default(null), status: ImageGenerationStatus$inboundSchema, + type: OutputImageGenerationCallItemType$inboundSchema, }); /** @internal */ export type OutputImageGenerationCallItem$Outbound = { - type: string; id: string; result: string | null; status: string; + type: string; }; /** @internal */ @@ -60,10 +60,10 @@ export const OutputImageGenerationCallItem$outboundSchema: z.ZodType< OutputImageGenerationCallItem$Outbound, OutputImageGenerationCallItem > = z.object({ - type: OutputImageGenerationCallItemType$outboundSchema, id: z.string(), result: z.nullable(z.string()).default(null), status: ImageGenerationStatus$outboundSchema, + type: OutputImageGenerationCallItemType$outboundSchema, }); export function outputImageGenerationCallItemToJSON( diff --git a/src/models/outputimagegenerationservertoolitem.ts b/src/models/outputimagegenerationservertoolitem.ts new file mode 100644 index 00000000..6aaaa94f --- /dev/null +++ b/src/models/outputimagegenerationservertoolitem.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1ea34f16eb56 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:image_generation server tool output item + */ +export type OutputImageGenerationServerToolItem = { + id?: string | undefined; + imageB64?: string | undefined; + imageUrl?: string | undefined; + revisedPrompt?: string | undefined; + status: ToolCallStatus; + type: "openrouter:image_generation"; +}; + +/** @internal */ +export const OutputImageGenerationServerToolItem$inboundSchema: z.ZodType< + OutputImageGenerationServerToolItem, + unknown +> = z.object({ + id: z.string().optional(), + imageB64: z.string().optional(), + imageUrl: z.string().optional(), + revisedPrompt: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:image_generation"), +}); + +export function outputImageGenerationServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OutputImageGenerationServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputImageGenerationServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputitemimagegenerationcall.ts b/src/models/outputitemimagegenerationcall.ts index 1a292f67..a13c08e4 100644 --- a/src/models/outputitemimagegenerationcall.ts +++ b/src/models/outputitemimagegenerationcall.ts @@ -21,10 +21,10 @@ export type OutputItemImageGenerationCallType = ClosedEnum< >; export type OutputItemImageGenerationCall = { - type: OutputItemImageGenerationCallType; id: string; result: string | null; status: ImageGenerationStatus; + type: OutputItemImageGenerationCallType; }; /** @internal */ @@ -37,10 +37,10 @@ export const OutputItemImageGenerationCall$inboundSchema: z.ZodType< OutputItemImageGenerationCall, unknown > = z.object({ - type: OutputItemImageGenerationCallType$inboundSchema, id: z.string(), result: z.nullable(z.string()).default(null), status: ImageGenerationStatus$inboundSchema, + type: OutputItemImageGenerationCallType$inboundSchema, }); export function outputItemImageGenerationCallFromJSON( diff --git a/src/models/outputitems.ts b/src/models/outputitems.ts index d085ed55..7447986a 100644 --- a/src/models/outputitems.ts +++ b/src/models/outputitems.ts @@ -5,12 +5,46 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OutputApplyPatchServerToolItem, + OutputApplyPatchServerToolItem$inboundSchema, +} from "./outputapplypatchservertoolitem.js"; +import { + OutputBashServerToolItem, + OutputBashServerToolItem$inboundSchema, +} from "./outputbashservertoolitem.js"; +import { + OutputBrowserUseServerToolItem, + OutputBrowserUseServerToolItem$inboundSchema, +} from "./outputbrowseruseservertoolitem.js"; +import { + OutputCodeInterpreterCallItem, + OutputCodeInterpreterCallItem$inboundSchema, +} from "./outputcodeinterpretercallitem.js"; +import { + OutputCodeInterpreterServerToolItem, + OutputCodeInterpreterServerToolItem$inboundSchema, +} from "./outputcodeinterpreterservertoolitem.js"; +import { + OutputComputerCallItem, + OutputComputerCallItem$inboundSchema, +} from "./outputcomputercallitem.js"; +import { + OutputDatetimeItem, + OutputDatetimeItem$inboundSchema, +} from "./outputdatetimeitem.js"; import { OutputFileSearchCallItem, OutputFileSearchCallItem$inboundSchema, } from "./outputfilesearchcallitem.js"; +import { + OutputFileSearchServerToolItem, + OutputFileSearchServerToolItem$inboundSchema, +} from "./outputfilesearchservertoolitem.js"; import { OutputFunctionCallItem, OutputFunctionCallItem$inboundSchema, @@ -19,6 +53,18 @@ import { OutputImageGenerationCallItem, OutputImageGenerationCallItem$inboundSchema, } from "./outputimagegenerationcallitem.js"; +import { + OutputImageGenerationServerToolItem, + OutputImageGenerationServerToolItem$inboundSchema, +} from "./outputimagegenerationservertoolitem.js"; +import { + OutputMcpServerToolItem, + OutputMcpServerToolItem$inboundSchema, +} from "./outputmcpservertoolitem.js"; +import { + OutputMemoryServerToolItem, + OutputMemoryServerToolItem$inboundSchema, +} from "./outputmemoryservertoolitem.js"; import { OutputMessageItem, OutputMessageItem$inboundSchema, @@ -28,37 +74,92 @@ import { OutputReasoningItem$inboundSchema, } from "./outputreasoningitem.js"; import { - OutputServerToolItem, - OutputServerToolItem$inboundSchema, -} from "./outputservertoolitem.js"; + OutputTextEditorServerToolItem, + OutputTextEditorServerToolItem$inboundSchema, +} from "./outputtexteditorservertoolitem.js"; +import { + OutputToolSearchServerToolItem, + OutputToolSearchServerToolItem$inboundSchema, +} from "./outputtoolsearchservertoolitem.js"; +import { + OutputWebFetchServerToolItem, + OutputWebFetchServerToolItem$inboundSchema, +} from "./outputwebfetchservertoolitem.js"; import { OutputWebSearchCallItem, OutputWebSearchCallItem$inboundSchema, } from "./outputwebsearchcallitem.js"; +import { + OutputWebSearchServerToolItem, + OutputWebSearchServerToolItem$inboundSchema, +} from "./outputwebsearchservertoolitem.js"; /** * An output item from the response */ export type OutputItems = + | OutputCodeInterpreterCallItem + | OutputComputerCallItem + | (OutputFileSearchCallItem & { type: "file_search_call" }) + | (OutputFunctionCallItem & { type: "function_call" }) + | (OutputImageGenerationCallItem & { type: "image_generation_call" }) | OutputMessageItem - | OutputFunctionCallItem - | OutputWebSearchCallItem - | OutputFileSearchCallItem + | OutputApplyPatchServerToolItem + | OutputBashServerToolItem + | OutputBrowserUseServerToolItem + | OutputCodeInterpreterServerToolItem + | (OutputDatetimeItem & { type: "openrouter:datetime" }) + | OutputFileSearchServerToolItem + | OutputImageGenerationServerToolItem + | OutputMcpServerToolItem + | OutputMemoryServerToolItem + | OutputTextEditorServerToolItem + | OutputToolSearchServerToolItem + | OutputWebFetchServerToolItem + | (OutputWebSearchServerToolItem & { type: "openrouter:web_search" }) | OutputReasoningItem - | OutputImageGenerationCallItem - | OutputServerToolItem; + | (OutputWebSearchCallItem & { type: "web_search_call" }) + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ -export const OutputItems$inboundSchema: z.ZodType = z - .union([ - OutputMessageItem$inboundSchema, - OutputFunctionCallItem$inboundSchema, - OutputWebSearchCallItem$inboundSchema, - OutputFileSearchCallItem$inboundSchema, - OutputReasoningItem$inboundSchema, - OutputImageGenerationCallItem$inboundSchema, - OutputServerToolItem$inboundSchema, - ]); +export const OutputItems$inboundSchema: z.ZodType = + discriminatedUnion("type", { + code_interpreter_call: OutputCodeInterpreterCallItem$inboundSchema, + computer_call: OutputComputerCallItem$inboundSchema, + file_search_call: OutputFileSearchCallItem$inboundSchema.and( + z.object({ type: z.literal("file_search_call") }), + ), + function_call: OutputFunctionCallItem$inboundSchema.and( + z.object({ type: z.literal("function_call") }), + ), + image_generation_call: OutputImageGenerationCallItem$inboundSchema.and( + z.object({ type: z.literal("image_generation_call") }), + ), + message: OutputMessageItem$inboundSchema, + ["openrouter:apply_patch"]: OutputApplyPatchServerToolItem$inboundSchema, + ["openrouter:bash"]: OutputBashServerToolItem$inboundSchema, + ["openrouter:browser_use"]: OutputBrowserUseServerToolItem$inboundSchema, + ["openrouter:code_interpreter"]: + OutputCodeInterpreterServerToolItem$inboundSchema, + ["openrouter:datetime"]: OutputDatetimeItem$inboundSchema.and( + z.object({ type: z.literal("openrouter:datetime") }), + ), + ["openrouter:file_search"]: OutputFileSearchServerToolItem$inboundSchema, + ["openrouter:image_generation"]: + OutputImageGenerationServerToolItem$inboundSchema, + ["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema, + ["openrouter:memory"]: OutputMemoryServerToolItem$inboundSchema, + ["openrouter:text_editor"]: OutputTextEditorServerToolItem$inboundSchema, + ["openrouter:tool_search"]: OutputToolSearchServerToolItem$inboundSchema, + ["openrouter:web_fetch"]: OutputWebFetchServerToolItem$inboundSchema, + ["openrouter:web_search"]: OutputWebSearchServerToolItem$inboundSchema.and( + z.object({ type: z.literal("openrouter:web_search") }), + ), + reasoning: OutputReasoningItem$inboundSchema, + web_search_call: OutputWebSearchCallItem$inboundSchema.and( + z.object({ type: z.literal("web_search_call") }), + ), + }); export function outputItemsFromJSON( jsonString: string, diff --git a/src/models/outputmcpservertoolitem.ts b/src/models/outputmcpservertoolitem.ts new file mode 100644 index 00000000..8d098a69 --- /dev/null +++ b/src/models/outputmcpservertoolitem.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dd859086c9c7 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:mcp server tool output item + */ +export type OutputMcpServerToolItem = { + id?: string | undefined; + serverLabel?: string | undefined; + status: ToolCallStatus; + toolName?: string | undefined; + type: "openrouter:mcp"; +}; + +/** @internal */ +export const OutputMcpServerToolItem$inboundSchema: z.ZodType< + OutputMcpServerToolItem, + unknown +> = z.object({ + id: z.string().optional(), + serverLabel: z.string().optional(), + status: ToolCallStatus$inboundSchema, + toolName: z.string().optional(), + type: z.literal("openrouter:mcp"), +}); + +export function outputMcpServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputMcpServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputMcpServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputmemoryservertoolitem.ts b/src/models/outputmemoryservertoolitem.ts new file mode 100644 index 00000000..84bed06d --- /dev/null +++ b/src/models/outputmemoryservertoolitem.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2fb051c8b4e9 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +export const ActionEnum = { + Read: "read", + Write: "write", + Delete: "delete", +} as const; +export type ActionEnum = OpenEnum; + +/** + * An openrouter:memory server tool output item + */ +export type OutputMemoryServerToolItem = { + action?: ActionEnum | undefined; + id?: string | undefined; + key?: string | undefined; + status: ToolCallStatus; + type: "openrouter:memory"; + value?: any | null | undefined; +}; + +/** @internal */ +export const ActionEnum$inboundSchema: z.ZodType = + openEnums.inboundSchema(ActionEnum); + +/** @internal */ +export const OutputMemoryServerToolItem$inboundSchema: z.ZodType< + OutputMemoryServerToolItem, + unknown +> = z.object({ + action: ActionEnum$inboundSchema.optional(), + id: z.string().optional(), + key: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:memory"), + value: z.nullable(z.any()).optional(), +}); + +export function outputMemoryServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputMemoryServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputMemoryServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputmessage.ts b/src/models/outputmessage.ts index fed67882..f1b3428e 100644 --- a/src/models/outputmessage.ts +++ b/src/models/outputmessage.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -17,16 +19,38 @@ import { ResponseOutputText$inboundSchema, } from "./responseoutputtext.js"; +export type OutputMessageContent = + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; + +export const OutputMessagePhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OutputMessagePhaseFinalAnswer = ClosedEnum< + typeof OutputMessagePhaseFinalAnswer +>; + +export const OutputMessagePhaseCommentary = { + Commentary: "commentary", +} as const; +export type OutputMessagePhaseCommentary = ClosedEnum< + typeof OutputMessagePhaseCommentary +>; + +/** + * 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. + */ +export type OutputMessagePhaseUnion = + | OutputMessagePhaseCommentary + | OutputMessagePhaseFinalAnswer + | any; + export const OutputMessageRole = { Assistant: "assistant", } as const; export type OutputMessageRole = ClosedEnum; -export const OutputMessageType = { - Message: "message", -} as const; -export type OutputMessageType = ClosedEnum; - export const OutputMessageStatusInProgress = { InProgress: "in_progress", } as const; @@ -53,42 +77,18 @@ export type OutputMessageStatusUnion = | OutputMessageStatusIncomplete | OutputMessageStatusInProgress; -export type OutputMessageContent = - | ResponseOutputText - | OpenAIResponsesRefusalContent; - -export const OutputMessagePhaseFinalAnswer = { - FinalAnswer: "final_answer", -} as const; -export type OutputMessagePhaseFinalAnswer = ClosedEnum< - typeof OutputMessagePhaseFinalAnswer ->; - -export const OutputMessagePhaseCommentary = { - Commentary: "commentary", +export const OutputMessageType = { + Message: "message", } as const; -export type OutputMessagePhaseCommentary = ClosedEnum< - typeof OutputMessagePhaseCommentary ->; - -/** - * 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. - */ -export type OutputMessagePhaseUnion = - | OutputMessagePhaseCommentary - | OutputMessagePhaseFinalAnswer - | any; +export type OutputMessageType = ClosedEnum; export type OutputMessage = { + content: Array< + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type"> + >; id: string; - role: OutputMessageRole; - type: OutputMessageType; - status?: - | OutputMessageStatusCompleted - | OutputMessageStatusIncomplete - | OutputMessageStatusInProgress - | undefined; - content: Array; /** * 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. */ @@ -98,61 +98,23 @@ export type OutputMessage = { | any | null | undefined; + role: OutputMessageRole; + status?: + | OutputMessageStatusCompleted + | OutputMessageStatusIncomplete + | OutputMessageStatusInProgress + | undefined; + type: OutputMessageType; }; -/** @internal */ -export const OutputMessageRole$inboundSchema: z.ZodEnum< - typeof OutputMessageRole -> = z.enum(OutputMessageRole); - -/** @internal */ -export const OutputMessageType$inboundSchema: z.ZodEnum< - typeof OutputMessageType -> = z.enum(OutputMessageType); - -/** @internal */ -export const OutputMessageStatusInProgress$inboundSchema: z.ZodEnum< - typeof OutputMessageStatusInProgress -> = z.enum(OutputMessageStatusInProgress); - -/** @internal */ -export const OutputMessageStatusIncomplete$inboundSchema: z.ZodEnum< - typeof OutputMessageStatusIncomplete -> = z.enum(OutputMessageStatusIncomplete); - -/** @internal */ -export const OutputMessageStatusCompleted$inboundSchema: z.ZodEnum< - typeof OutputMessageStatusCompleted -> = z.enum(OutputMessageStatusCompleted); - -/** @internal */ -export const OutputMessageStatusUnion$inboundSchema: z.ZodType< - OutputMessageStatusUnion, - unknown -> = z.union([ - OutputMessageStatusCompleted$inboundSchema, - OutputMessageStatusIncomplete$inboundSchema, - OutputMessageStatusInProgress$inboundSchema, -]); - -export function outputMessageStatusUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OutputMessageStatusUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OutputMessageStatusUnion' from JSON`, - ); -} - /** @internal */ export const OutputMessageContent$inboundSchema: z.ZodType< OutputMessageContent, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, -]); +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function outputMessageContentFromJSON( jsonString: string, @@ -194,23 +156,61 @@ export function outputMessagePhaseUnionFromJSON( ); } +/** @internal */ +export const OutputMessageRole$inboundSchema: z.ZodEnum< + typeof OutputMessageRole +> = z.enum(OutputMessageRole); + +/** @internal */ +export const OutputMessageStatusInProgress$inboundSchema: z.ZodEnum< + typeof OutputMessageStatusInProgress +> = z.enum(OutputMessageStatusInProgress); + +/** @internal */ +export const OutputMessageStatusIncomplete$inboundSchema: z.ZodEnum< + typeof OutputMessageStatusIncomplete +> = z.enum(OutputMessageStatusIncomplete); + +/** @internal */ +export const OutputMessageStatusCompleted$inboundSchema: z.ZodEnum< + typeof OutputMessageStatusCompleted +> = z.enum(OutputMessageStatusCompleted); + +/** @internal */ +export const OutputMessageStatusUnion$inboundSchema: z.ZodType< + OutputMessageStatusUnion, + unknown +> = z.union([ + OutputMessageStatusCompleted$inboundSchema, + OutputMessageStatusIncomplete$inboundSchema, + OutputMessageStatusInProgress$inboundSchema, +]); + +export function outputMessageStatusUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputMessageStatusUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputMessageStatusUnion' from JSON`, + ); +} + +/** @internal */ +export const OutputMessageType$inboundSchema: z.ZodEnum< + typeof OutputMessageType +> = z.enum(OutputMessageType); + /** @internal */ export const OutputMessage$inboundSchema: z.ZodType = z .object({ - id: z.string(), - role: OutputMessageRole$inboundSchema, - type: OutputMessageType$inboundSchema, - status: z.union([ - OutputMessageStatusCompleted$inboundSchema, - OutputMessageStatusIncomplete$inboundSchema, - OutputMessageStatusInProgress$inboundSchema, - ]).optional(), content: z.array( - z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, - ]), + discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), ), + id: z.string(), phase: z.nullable( z.union([ OutputMessagePhaseCommentary$inboundSchema, @@ -218,6 +218,13 @@ export const OutputMessage$inboundSchema: z.ZodType = z z.any(), ]), ).optional(), + role: OutputMessageRole$inboundSchema, + status: z.union([ + OutputMessageStatusCompleted$inboundSchema, + OutputMessageStatusIncomplete$inboundSchema, + OutputMessageStatusInProgress$inboundSchema, + ]).optional(), + type: OutputMessageType$inboundSchema, }); export function outputMessageFromJSON( diff --git a/src/models/outputmessageitem.ts b/src/models/outputmessageitem.ts index 8b41e657..0f354453 100644 --- a/src/models/outputmessageitem.ts +++ b/src/models/outputmessageitem.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -17,16 +19,38 @@ import { ResponseOutputText$inboundSchema, } from "./responseoutputtext.js"; +export type OutputMessageItemContent = + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type">; + +export const OutputMessageItemPhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OutputMessageItemPhaseFinalAnswer = ClosedEnum< + typeof OutputMessageItemPhaseFinalAnswer +>; + +export const OutputMessageItemPhaseCommentary = { + Commentary: "commentary", +} as const; +export type OutputMessageItemPhaseCommentary = ClosedEnum< + typeof OutputMessageItemPhaseCommentary +>; + +/** + * 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. + */ +export type OutputMessageItemPhaseUnion = + | OutputMessageItemPhaseCommentary + | OutputMessageItemPhaseFinalAnswer + | any; + export const OutputMessageItemRole = { Assistant: "assistant", } as const; export type OutputMessageItemRole = ClosedEnum; -export const OutputMessageItemType = { - Message: "message", -} as const; -export type OutputMessageItemType = ClosedEnum; - export const OutputMessageItemStatusInProgress = { InProgress: "in_progress", } as const; @@ -53,45 +77,16 @@ export type OutputMessageItemStatusUnion = | OutputMessageItemStatusIncomplete | OutputMessageItemStatusInProgress; -export type OutputMessageItemContent = - | ResponseOutputText - | OpenAIResponsesRefusalContent; - -export const OutputMessageItemPhaseFinalAnswer = { - FinalAnswer: "final_answer", -} as const; -export type OutputMessageItemPhaseFinalAnswer = ClosedEnum< - typeof OutputMessageItemPhaseFinalAnswer ->; - -export const OutputMessageItemPhaseCommentary = { - Commentary: "commentary", -} as const; -export type OutputMessageItemPhaseCommentary = ClosedEnum< - typeof OutputMessageItemPhaseCommentary ->; - -/** - * 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. - */ -export type OutputMessageItemPhaseUnion = - | OutputMessageItemPhaseCommentary - | OutputMessageItemPhaseFinalAnswer - | any; - /** * An output message item */ export type OutputMessageItem = { + content: Array< + | ResponseOutputText + | OpenAIResponsesRefusalContent + | discriminatedUnionTypes.Unknown<"type"> + >; id: string; - role: OutputMessageItemRole; - type: OutputMessageItemType; - status?: - | OutputMessageItemStatusCompleted - | OutputMessageItemStatusIncomplete - | OutputMessageItemStatusInProgress - | undefined; - content: Array; /** * 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. */ @@ -101,61 +96,23 @@ export type OutputMessageItem = { | any | null | undefined; + role: OutputMessageItemRole; + status?: + | OutputMessageItemStatusCompleted + | OutputMessageItemStatusIncomplete + | OutputMessageItemStatusInProgress + | undefined; + type: "message"; }; -/** @internal */ -export const OutputMessageItemRole$inboundSchema: z.ZodEnum< - typeof OutputMessageItemRole -> = z.enum(OutputMessageItemRole); - -/** @internal */ -export const OutputMessageItemType$inboundSchema: z.ZodEnum< - typeof OutputMessageItemType -> = z.enum(OutputMessageItemType); - -/** @internal */ -export const OutputMessageItemStatusInProgress$inboundSchema: z.ZodEnum< - typeof OutputMessageItemStatusInProgress -> = z.enum(OutputMessageItemStatusInProgress); - -/** @internal */ -export const OutputMessageItemStatusIncomplete$inboundSchema: z.ZodEnum< - typeof OutputMessageItemStatusIncomplete -> = z.enum(OutputMessageItemStatusIncomplete); - -/** @internal */ -export const OutputMessageItemStatusCompleted$inboundSchema: z.ZodEnum< - typeof OutputMessageItemStatusCompleted -> = z.enum(OutputMessageItemStatusCompleted); - -/** @internal */ -export const OutputMessageItemStatusUnion$inboundSchema: z.ZodType< - OutputMessageItemStatusUnion, - unknown -> = z.union([ - OutputMessageItemStatusCompleted$inboundSchema, - OutputMessageItemStatusIncomplete$inboundSchema, - OutputMessageItemStatusInProgress$inboundSchema, -]); - -export function outputMessageItemStatusUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OutputMessageItemStatusUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OutputMessageItemStatusUnion' from JSON`, - ); -} - /** @internal */ export const OutputMessageItemContent$inboundSchema: z.ZodType< OutputMessageItemContent, unknown -> = z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, -]); +> = discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, +}); export function outputMessageItemContentFromJSON( jsonString: string, @@ -197,25 +154,58 @@ export function outputMessageItemPhaseUnionFromJSON( ); } +/** @internal */ +export const OutputMessageItemRole$inboundSchema: z.ZodEnum< + typeof OutputMessageItemRole +> = z.enum(OutputMessageItemRole); + +/** @internal */ +export const OutputMessageItemStatusInProgress$inboundSchema: z.ZodEnum< + typeof OutputMessageItemStatusInProgress +> = z.enum(OutputMessageItemStatusInProgress); + +/** @internal */ +export const OutputMessageItemStatusIncomplete$inboundSchema: z.ZodEnum< + typeof OutputMessageItemStatusIncomplete +> = z.enum(OutputMessageItemStatusIncomplete); + +/** @internal */ +export const OutputMessageItemStatusCompleted$inboundSchema: z.ZodEnum< + typeof OutputMessageItemStatusCompleted +> = z.enum(OutputMessageItemStatusCompleted); + +/** @internal */ +export const OutputMessageItemStatusUnion$inboundSchema: z.ZodType< + OutputMessageItemStatusUnion, + unknown +> = z.union([ + OutputMessageItemStatusCompleted$inboundSchema, + OutputMessageItemStatusIncomplete$inboundSchema, + OutputMessageItemStatusInProgress$inboundSchema, +]); + +export function outputMessageItemStatusUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputMessageItemStatusUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputMessageItemStatusUnion' from JSON`, + ); +} + /** @internal */ export const OutputMessageItem$inboundSchema: z.ZodType< OutputMessageItem, unknown > = z.object({ - id: z.string(), - role: OutputMessageItemRole$inboundSchema, - type: OutputMessageItemType$inboundSchema, - status: z.union([ - OutputMessageItemStatusCompleted$inboundSchema, - OutputMessageItemStatusIncomplete$inboundSchema, - OutputMessageItemStatusInProgress$inboundSchema, - ]).optional(), content: z.array( - z.union([ - ResponseOutputText$inboundSchema, - OpenAIResponsesRefusalContent$inboundSchema, - ]), + discriminatedUnion("type", { + output_text: ResponseOutputText$inboundSchema, + refusal: OpenAIResponsesRefusalContent$inboundSchema, + }), ), + id: z.string(), phase: z.nullable( z.union([ OutputMessageItemPhaseCommentary$inboundSchema, @@ -223,6 +213,13 @@ export const OutputMessageItem$inboundSchema: z.ZodType< z.any(), ]), ).optional(), + role: OutputMessageItemRole$inboundSchema, + status: z.union([ + OutputMessageItemStatusCompleted$inboundSchema, + OutputMessageItemStatusIncomplete$inboundSchema, + OutputMessageItemStatusInProgress$inboundSchema, + ]).optional(), + type: z.literal("message"), }); export function outputMessageItemFromJSON( diff --git a/src/models/outputmodality.ts b/src/models/outputmodality.ts index 143ff54c..73f67ca7 100644 --- a/src/models/outputmodality.ts +++ b/src/models/outputmodality.ts @@ -13,6 +13,7 @@ export const OutputModality = { Embeddings: "embeddings", Audio: "audio", Video: "video", + Rerank: "rerank", } as const; export type OutputModality = OpenEnum; diff --git a/src/models/outputreasoningitem.ts b/src/models/outputreasoningitem.ts index 4c127753..17360bd1 100644 --- a/src/models/outputreasoningitem.ts +++ b/src/models/outputreasoningitem.ts @@ -6,10 +6,13 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, +} from "./reasoningformat.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, @@ -19,13 +22,6 @@ import { ReasoningTextContent$inboundSchema, } from "./reasoningtextcontent.js"; -export const OutputReasoningItemType = { - Reasoning: "reasoning", -} as const; -export type OutputReasoningItemType = ClosedEnum< - typeof OutputReasoningItemType ->; - export const OutputReasoningItemStatusInProgress = { InProgress: "in_progress", } as const; @@ -52,53 +48,27 @@ export type OutputReasoningItemStatusUnion = | OutputReasoningItemStatusIncomplete | OutputReasoningItemStatusInProgress; -/** - * The format of the reasoning content - */ -export const OutputReasoningItemFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -/** - * The format of the reasoning content - */ -export type OutputReasoningItemFormat = OpenEnum< - typeof OutputReasoningItemFormat ->; - /** * An output item containing reasoning */ export type OutputReasoningItem = { - type: OutputReasoningItemType; - id: string; content?: Array | null | undefined; - summary: Array; encryptedContent?: string | null | undefined; + id: string; status?: | OutputReasoningItemStatusCompleted | OutputReasoningItemStatusIncomplete | OutputReasoningItemStatusInProgress | undefined; + summary: Array; + type: "reasoning"; + format?: ReasoningFormat | null | undefined; /** * A signature for the reasoning content, used for verification */ signature?: string | null | undefined; - /** - * The format of the reasoning content - */ - format?: OutputReasoningItemFormat | null | undefined; }; -/** @internal */ -export const OutputReasoningItemType$inboundSchema: z.ZodEnum< - typeof OutputReasoningItemType -> = z.enum(OutputReasoningItemType); - /** @internal */ export const OutputReasoningItemStatusInProgress$inboundSchema: z.ZodEnum< typeof OutputReasoningItemStatusInProgress @@ -134,29 +104,23 @@ export function outputReasoningItemStatusUnionFromJSON( ); } -/** @internal */ -export const OutputReasoningItemFormat$inboundSchema: z.ZodType< - OutputReasoningItemFormat, - unknown -> = openEnums.inboundSchema(OutputReasoningItemFormat); - /** @internal */ export const OutputReasoningItem$inboundSchema: z.ZodType< OutputReasoningItem, unknown > = z.object({ - type: OutputReasoningItemType$inboundSchema, - id: z.string(), content: z.nullable(z.array(ReasoningTextContent$inboundSchema)).optional(), - summary: z.array(ReasoningSummaryText$inboundSchema), encrypted_content: z.nullable(z.string()).optional(), + id: z.string(), status: z.union([ OutputReasoningItemStatusCompleted$inboundSchema, OutputReasoningItemStatusIncomplete$inboundSchema, OutputReasoningItemStatusInProgress$inboundSchema, ]).optional(), + summary: z.array(ReasoningSummaryText$inboundSchema), + type: z.literal("reasoning"), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(OutputReasoningItemFormat$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "encrypted_content": "encryptedContent", diff --git a/src/models/outputservertoolitem.ts b/src/models/outputservertoolitem.ts deleted file mode 100644 index 889e2de5..00000000 --- a/src/models/outputservertoolitem.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: ca93d8ce3ebb - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import { - collectExtraKeys as collectExtraKeys$, - safeParse, -} from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const OutputServerToolItemStatus = { - Completed: "completed", - InProgress: "in_progress", - Incomplete: "incomplete", -} as const; -export type OutputServerToolItemStatus = OpenEnum< - typeof OutputServerToolItemStatus ->; - -/** - * A generic OpenRouter server tool output item - */ -export type OutputServerToolItem = { - /** - * Server tool type (e.g. openrouter:datetime, openrouter:web_search) - */ - type: string; - id?: string | undefined; - status: OutputServerToolItemStatus; - additionalProperties?: { [k: string]: any | null } | undefined; -}; - -/** @internal */ -export const OutputServerToolItemStatus$inboundSchema: z.ZodType< - OutputServerToolItemStatus, - unknown -> = openEnums.inboundSchema(OutputServerToolItemStatus); -/** @internal */ -export const OutputServerToolItemStatus$outboundSchema: z.ZodType< - string, - OutputServerToolItemStatus -> = openEnums.outboundSchema(OutputServerToolItemStatus); - -/** @internal */ -export const OutputServerToolItem$inboundSchema: z.ZodType< - OutputServerToolItem, - unknown -> = collectExtraKeys$( - z.object({ - type: z.string(), - id: z.string().optional(), - status: OutputServerToolItemStatus$inboundSchema, - }).catchall(z.any()), - "additionalProperties", - true, -); -/** @internal */ -export type OutputServerToolItem$Outbound = { - type: string; - id?: string | undefined; - status: string; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const OutputServerToolItem$outboundSchema: z.ZodType< - OutputServerToolItem$Outbound, - OutputServerToolItem -> = z.object({ - type: z.string(), - id: z.string().optional(), - status: OutputServerToolItemStatus$outboundSchema, - additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), -}).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; -}); - -export function outputServerToolItemToJSON( - outputServerToolItem: OutputServerToolItem, -): string { - return JSON.stringify( - OutputServerToolItem$outboundSchema.parse(outputServerToolItem), - ); -} -export function outputServerToolItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OutputServerToolItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OutputServerToolItem' from JSON`, - ); -} diff --git a/src/models/outputtexteditorservertoolitem.ts b/src/models/outputtexteditorservertoolitem.ts new file mode 100644 index 00000000..76ea68e6 --- /dev/null +++ b/src/models/outputtexteditorservertoolitem.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6c55837a703d + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +export const Command = { + View: "view", + Create: "create", + StrReplace: "str_replace", + Insert: "insert", +} as const; +export type Command = OpenEnum; + +/** + * An openrouter:text_editor server tool output item + */ +export type OutputTextEditorServerToolItem = { + command?: Command | undefined; + filePath?: string | undefined; + id?: string | undefined; + status: ToolCallStatus; + type: "openrouter:text_editor"; +}; + +/** @internal */ +export const Command$inboundSchema: z.ZodType = openEnums + .inboundSchema(Command); + +/** @internal */ +export const OutputTextEditorServerToolItem$inboundSchema: z.ZodType< + OutputTextEditorServerToolItem, + unknown +> = z.object({ + command: Command$inboundSchema.optional(), + filePath: z.string().optional(), + id: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:text_editor"), +}); + +export function outputTextEditorServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputTextEditorServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputTextEditorServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputtoolsearchservertoolitem.ts b/src/models/outputtoolsearchservertoolitem.ts new file mode 100644 index 00000000..b4b97495 --- /dev/null +++ b/src/models/outputtoolsearchservertoolitem.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54b4dacceeab + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:tool_search server tool output item + */ +export type OutputToolSearchServerToolItem = { + id?: string | undefined; + query?: string | undefined; + status: ToolCallStatus; + type: "openrouter:tool_search"; +}; + +/** @internal */ +export const OutputToolSearchServerToolItem$inboundSchema: z.ZodType< + OutputToolSearchServerToolItem, + unknown +> = z.object({ + id: z.string().optional(), + query: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: z.literal("openrouter:tool_search"), +}); + +export function outputToolSearchServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputToolSearchServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputToolSearchServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputwebfetchservertoolitem.ts b/src/models/outputwebfetchservertoolitem.ts new file mode 100644 index 00000000..d93936e8 --- /dev/null +++ b/src/models/outputwebfetchservertoolitem.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a28b106c9b49 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, +} from "./toolcallstatus.js"; + +/** + * An openrouter:web_fetch server tool output item + */ +export type OutputWebFetchServerToolItem = { + content?: string | undefined; + id?: string | undefined; + status: ToolCallStatus; + title?: string | undefined; + type: "openrouter:web_fetch"; + url?: string | undefined; +}; + +/** @internal */ +export const OutputWebFetchServerToolItem$inboundSchema: z.ZodType< + OutputWebFetchServerToolItem, + unknown +> = z.object({ + content: z.string().optional(), + id: z.string().optional(), + status: ToolCallStatus$inboundSchema, + title: z.string().optional(), + type: z.literal("openrouter:web_fetch"), + url: z.string().optional(), +}); + +export function outputWebFetchServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputWebFetchServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputWebFetchServerToolItem' from JSON`, + ); +} diff --git a/src/models/outputwebsearchcallitem.ts b/src/models/outputwebsearchcallitem.ts index c671368b..70bb5941 100644 --- a/src/models/outputwebsearchcallitem.ts +++ b/src/models/outputwebsearchcallitem.ts @@ -5,23 +5,26 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + WebSearchSource, + WebSearchSource$inboundSchema, + WebSearchSource$Outbound, + WebSearchSource$outboundSchema, +} from "./websearchsource.js"; import { WebSearchStatus, WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js"; -export const TypeWebSearchCall = { - WebSearchCall: "web_search_call", -} as const; -export type TypeWebSearchCall = ClosedEnum; - export type ActionFindInPage = { - type: "find_in_page"; pattern: string; + type: "find_in_page"; url: string; }; @@ -30,54 +33,48 @@ export type ActionOpenPage = { url?: string | null | undefined; }; -export const TypeURL = { - Url: "url", -} as const; -export type TypeURL = ClosedEnum; - -export type Source = { - type: TypeURL; - url: string; -}; - export type ActionSearch = { - type: "search"; - query: string; queries?: Array | undefined; - sources?: Array | undefined; + query: string; + sources?: Array | undefined; + type: "search"; }; -export type Action = ActionSearch | ActionOpenPage | ActionFindInPage; +export type Action = + | ActionSearch + | ActionOpenPage + | ActionFindInPage + | discriminatedUnionTypes.Unknown<"type">; + +export const TypeWebSearchCall = { + WebSearchCall: "web_search_call", +} as const; +export type TypeWebSearchCall = ClosedEnum; export type OutputWebSearchCallItem = { - type: TypeWebSearchCall; + action: + | ActionSearch + | ActionOpenPage + | ActionFindInPage + | discriminatedUnionTypes.Unknown<"type">; id: string; - action: ActionSearch | ActionOpenPage | ActionFindInPage; status: WebSearchStatus; + type: TypeWebSearchCall; }; -/** @internal */ -export const TypeWebSearchCall$inboundSchema: z.ZodEnum< - typeof TypeWebSearchCall -> = z.enum(TypeWebSearchCall); -/** @internal */ -export const TypeWebSearchCall$outboundSchema: z.ZodEnum< - typeof TypeWebSearchCall -> = TypeWebSearchCall$inboundSchema; - /** @internal */ export const ActionFindInPage$inboundSchema: z.ZodType< ActionFindInPage, unknown > = z.object({ - type: z.literal("find_in_page"), pattern: z.string(), + type: z.literal("find_in_page"), url: z.string(), }); /** @internal */ export type ActionFindInPage$Outbound = { - type: "find_in_page"; pattern: string; + type: "find_in_page"; url: string; }; @@ -86,8 +83,8 @@ export const ActionFindInPage$outboundSchema: z.ZodType< ActionFindInPage$Outbound, ActionFindInPage > = z.object({ - type: z.literal("find_in_page"), pattern: z.string(), + type: z.literal("find_in_page"), url: z.string(), }); @@ -142,57 +139,20 @@ export function actionOpenPageFromJSON( ); } -/** @internal */ -export const TypeURL$inboundSchema: z.ZodEnum = z.enum(TypeURL); -/** @internal */ -export const TypeURL$outboundSchema: z.ZodEnum = - TypeURL$inboundSchema; - -/** @internal */ -export const Source$inboundSchema: z.ZodType = z.object({ - type: TypeURL$inboundSchema, - url: z.string(), -}); -/** @internal */ -export type Source$Outbound = { - type: string; - url: string; -}; - -/** @internal */ -export const Source$outboundSchema: z.ZodType = z - .object({ - type: TypeURL$outboundSchema, - url: z.string(), - }); - -export function sourceToJSON(source: Source): string { - return JSON.stringify(Source$outboundSchema.parse(source)); -} -export function sourceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Source$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Source' from JSON`, - ); -} - /** @internal */ export const ActionSearch$inboundSchema: z.ZodType = z .object({ - type: z.literal("search"), - query: z.string(), queries: z.array(z.string()).optional(), - sources: z.array(z.lazy(() => Source$inboundSchema)).optional(), + query: z.string(), + sources: z.array(WebSearchSource$inboundSchema).optional(), + type: z.literal("search"), }); /** @internal */ export type ActionSearch$Outbound = { - type: "search"; - query: string; queries?: Array | undefined; - sources?: Array | undefined; + query: string; + sources?: Array | undefined; + type: "search"; }; /** @internal */ @@ -200,10 +160,10 @@ export const ActionSearch$outboundSchema: z.ZodType< ActionSearch$Outbound, ActionSearch > = z.object({ - type: z.literal("search"), - query: z.string(), queries: z.array(z.string()).optional(), - sources: z.array(z.lazy(() => Source$outboundSchema)).optional(), + query: z.string(), + sources: z.array(WebSearchSource$outboundSchema).optional(), + type: z.literal("search"), }); export function actionSearchToJSON(actionSearch: ActionSearch): string { @@ -220,11 +180,12 @@ export function actionSearchFromJSON( } /** @internal */ -export const Action$inboundSchema: z.ZodType = z.union([ - z.lazy(() => ActionSearch$inboundSchema), - z.lazy(() => ActionOpenPage$inboundSchema), - z.lazy(() => ActionFindInPage$inboundSchema), -]); +export const Action$inboundSchema: z.ZodType = + discriminatedUnion("type", { + search: z.lazy(() => ActionSearch$inboundSchema), + open_page: z.lazy(() => ActionOpenPage$inboundSchema), + find_in_page: z.lazy(() => ActionFindInPage$inboundSchema), + }); /** @internal */ export type Action$Outbound = | ActionSearch$Outbound @@ -252,29 +213,38 @@ export function actionFromJSON( ); } +/** @internal */ +export const TypeWebSearchCall$inboundSchema: z.ZodEnum< + typeof TypeWebSearchCall +> = z.enum(TypeWebSearchCall); +/** @internal */ +export const TypeWebSearchCall$outboundSchema: z.ZodEnum< + typeof TypeWebSearchCall +> = TypeWebSearchCall$inboundSchema; + /** @internal */ export const OutputWebSearchCallItem$inboundSchema: z.ZodType< OutputWebSearchCallItem, unknown > = z.object({ - type: TypeWebSearchCall$inboundSchema, + action: discriminatedUnion("type", { + search: z.lazy(() => ActionSearch$inboundSchema), + open_page: z.lazy(() => ActionOpenPage$inboundSchema), + find_in_page: z.lazy(() => ActionFindInPage$inboundSchema), + }), id: z.string(), - action: z.union([ - z.lazy(() => ActionSearch$inboundSchema), - z.lazy(() => ActionOpenPage$inboundSchema), - z.lazy(() => ActionFindInPage$inboundSchema), - ]), status: WebSearchStatus$inboundSchema, + type: TypeWebSearchCall$inboundSchema, }); /** @internal */ export type OutputWebSearchCallItem$Outbound = { - type: string; - id: string; action: | ActionSearch$Outbound | ActionOpenPage$Outbound | ActionFindInPage$Outbound; + id: string; status: string; + type: string; }; /** @internal */ @@ -282,14 +252,14 @@ export const OutputWebSearchCallItem$outboundSchema: z.ZodType< OutputWebSearchCallItem$Outbound, OutputWebSearchCallItem > = z.object({ - type: TypeWebSearchCall$outboundSchema, - id: z.string(), action: z.union([ z.lazy(() => ActionSearch$outboundSchema), z.lazy(() => ActionOpenPage$outboundSchema), z.lazy(() => ActionFindInPage$outboundSchema), ]), + id: z.string(), status: WebSearchStatus$outboundSchema, + type: TypeWebSearchCall$outboundSchema, }); export function outputWebSearchCallItemToJSON( diff --git a/src/models/outputwebsearchservertoolitem.ts b/src/models/outputwebsearchservertoolitem.ts new file mode 100644 index 00000000..9f622e60 --- /dev/null +++ b/src/models/outputwebsearchservertoolitem.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 92114d9bad95 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ToolCallStatus, + ToolCallStatus$inboundSchema, + ToolCallStatus$outboundSchema, +} from "./toolcallstatus.js"; + +export const OutputWebSearchServerToolItemType = { + OpenrouterWebSearch: "openrouter:web_search", +} as const; +export type OutputWebSearchServerToolItemType = ClosedEnum< + typeof OutputWebSearchServerToolItemType +>; + +/** + * An openrouter:web_search server tool output item + */ +export type OutputWebSearchServerToolItem = { + id?: string | undefined; + status: ToolCallStatus; + type: OutputWebSearchServerToolItemType; +}; + +/** @internal */ +export const OutputWebSearchServerToolItemType$inboundSchema: z.ZodEnum< + typeof OutputWebSearchServerToolItemType +> = z.enum(OutputWebSearchServerToolItemType); +/** @internal */ +export const OutputWebSearchServerToolItemType$outboundSchema: z.ZodEnum< + typeof OutputWebSearchServerToolItemType +> = OutputWebSearchServerToolItemType$inboundSchema; + +/** @internal */ +export const OutputWebSearchServerToolItem$inboundSchema: z.ZodType< + OutputWebSearchServerToolItem, + unknown +> = z.object({ + id: z.string().optional(), + status: ToolCallStatus$inboundSchema, + type: OutputWebSearchServerToolItemType$inboundSchema, +}); +/** @internal */ +export type OutputWebSearchServerToolItem$Outbound = { + id?: string | undefined; + status: string; + type: string; +}; + +/** @internal */ +export const OutputWebSearchServerToolItem$outboundSchema: z.ZodType< + OutputWebSearchServerToolItem$Outbound, + OutputWebSearchServerToolItem +> = z.object({ + id: z.string().optional(), + status: ToolCallStatus$outboundSchema, + type: OutputWebSearchServerToolItemType$outboundSchema, +}); + +export function outputWebSearchServerToolItemToJSON( + outputWebSearchServerToolItem: OutputWebSearchServerToolItem, +): string { + return JSON.stringify( + OutputWebSearchServerToolItem$outboundSchema.parse( + outputWebSearchServerToolItem, + ), + ); +} +export function outputWebSearchServerToolItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputWebSearchServerToolItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputWebSearchServerToolItem' from JSON`, + ); +} diff --git a/src/models/parameter.ts b/src/models/parameter.ts index df6c3118..62e727dc 100644 --- a/src/models/parameter.ts +++ b/src/models/parameter.ts @@ -17,6 +17,7 @@ export const Parameter = { PresencePenalty: "presence_penalty", RepetitionPenalty: "repetition_penalty", MaxTokens: "max_tokens", + MaxCompletionTokens: "max_completion_tokens", LogitBias: "logit_bias", Logprobs: "logprobs", TopLogprobs: "top_logprobs", diff --git a/src/models/percentilelatencycutoffs.ts b/src/models/percentilelatencycutoffs.ts index aea49c29..7c77bcc5 100644 --- a/src/models/percentilelatencycutoffs.ts +++ b/src/models/percentilelatencycutoffs.ts @@ -12,27 +12,27 @@ export type PercentileLatencyCutoffs = { /** * Maximum p50 latency (seconds) */ - p50?: number | null | undefined; + p50?: number | undefined; /** * Maximum p75 latency (seconds) */ - p75?: number | null | undefined; + p75?: number | undefined; /** * Maximum p90 latency (seconds) */ - p90?: number | null | undefined; + p90?: number | undefined; /** * Maximum p99 latency (seconds) */ - p99?: number | null | undefined; + p99?: number | undefined; }; /** @internal */ export type PercentileLatencyCutoffs$Outbound = { - p50?: number | null | undefined; - p75?: number | null | undefined; - p90?: number | null | undefined; - p99?: number | null | undefined; + p50?: number | undefined; + p75?: number | undefined; + p90?: number | undefined; + p99?: number | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const PercentileLatencyCutoffs$outboundSchema: z.ZodType< PercentileLatencyCutoffs$Outbound, PercentileLatencyCutoffs > = z.object({ - p50: z.nullable(z.number()).optional(), - p75: z.nullable(z.number()).optional(), - p90: z.nullable(z.number()).optional(), - p99: z.nullable(z.number()).optional(), + p50: z.number().optional(), + p75: z.number().optional(), + p90: z.number().optional(), + p99: z.number().optional(), }); export function percentileLatencyCutoffsToJSON( diff --git a/src/models/percentilethroughputcutoffs.ts b/src/models/percentilethroughputcutoffs.ts index 64350cb9..35149cce 100644 --- a/src/models/percentilethroughputcutoffs.ts +++ b/src/models/percentilethroughputcutoffs.ts @@ -12,27 +12,27 @@ export type PercentileThroughputCutoffs = { /** * Minimum p50 throughput (tokens/sec) */ - p50?: number | null | undefined; + p50?: number | undefined; /** * Minimum p75 throughput (tokens/sec) */ - p75?: number | null | undefined; + p75?: number | undefined; /** * Minimum p90 throughput (tokens/sec) */ - p90?: number | null | undefined; + p90?: number | undefined; /** * Minimum p99 throughput (tokens/sec) */ - p99?: number | null | undefined; + p99?: number | undefined; }; /** @internal */ export type PercentileThroughputCutoffs$Outbound = { - p50?: number | null | undefined; - p75?: number | null | undefined; - p90?: number | null | undefined; - p99?: number | null | undefined; + p50?: number | undefined; + p75?: number | undefined; + p90?: number | undefined; + p99?: number | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const PercentileThroughputCutoffs$outboundSchema: z.ZodType< PercentileThroughputCutoffs$Outbound, PercentileThroughputCutoffs > = z.object({ - p50: z.nullable(z.number()).optional(), - p75: z.nullable(z.number()).optional(), - p90: z.nullable(z.number()).optional(), - p99: z.nullable(z.number()).optional(), + p50: z.number().optional(), + p75: z.number().optional(), + p90: z.number().optional(), + p99: z.number().optional(), }); export function percentileThroughputCutoffsToJSON( diff --git a/src/models/perrequestlimits.ts b/src/models/perrequestlimits.ts index a5bfb5dc..34e6bd83 100644 --- a/src/models/perrequestlimits.ts +++ b/src/models/perrequestlimits.ts @@ -13,14 +13,14 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Per-request token limits */ export type PerRequestLimits = { - /** - * Maximum prompt tokens per request - */ - promptTokens: number; /** * Maximum completion tokens per request */ completionTokens: number; + /** + * Maximum prompt tokens per request + */ + promptTokens: number; }; /** @internal */ @@ -28,12 +28,12 @@ export const PerRequestLimits$inboundSchema: z.ZodType< PerRequestLimits, unknown > = z.object({ - prompt_tokens: z.number(), completion_tokens: z.number(), + prompt_tokens: z.number(), }).transform((v) => { return remap$(v, { - "prompt_tokens": "promptTokens", "completion_tokens": "completionTokens", + "prompt_tokens": "promptTokens", }); }); diff --git a/src/models/preview20250311websearchservertool.ts b/src/models/preview20250311websearchservertool.ts index fe5f5d90..99bdc45b 100644 --- a/src/models/preview20250311websearchservertool.ts +++ b/src/models/preview20250311websearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -21,153 +19,66 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; - -/** - * 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. - */ -export const Preview20250311WebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type Preview20250311WebSearchServerToolEngine = OpenEnum< - typeof Preview20250311WebSearchServerToolEngine ->; - -export type Preview20250311WebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; /** * Web search preview tool configuration (2025-03-11 version) */ export type Preview20250311WebSearchServerTool = { - type: "web_search_preview_2025_03_11"; - /** - * Size of the search context for web search tools - */ - searchContextSize?: SearchContextSizeEnum | undefined; - userLocation?: PreviewWebSearchUserLocation | null | undefined; /** * 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. */ - engine?: Preview20250311WebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** * 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. */ maxResults?: number | undefined; - filters?: Preview20250311WebSearchServerToolFilters | null | undefined; -}; - -/** @internal */ -export const Preview20250311WebSearchServerToolEngine$inboundSchema: z.ZodType< - Preview20250311WebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(Preview20250311WebSearchServerToolEngine); -/** @internal */ -export const Preview20250311WebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - Preview20250311WebSearchServerToolEngine -> = openEnums.outboundSchema(Preview20250311WebSearchServerToolEngine); - -/** @internal */ -export const Preview20250311WebSearchServerToolFilters$inboundSchema: z.ZodType< - Preview20250311WebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type Preview20250311WebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + /** + * Size of the search context for web search tools + */ + searchContextSize?: SearchContextSizeEnum | undefined; + type: "web_search_preview_2025_03_11"; + userLocation?: PreviewWebSearchUserLocation | null | undefined; }; -/** @internal */ -export const Preview20250311WebSearchServerToolFilters$outboundSchema: - z.ZodType< - Preview20250311WebSearchServerToolFilters$Outbound, - Preview20250311WebSearchServerToolFilters - > = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), - }).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); - }); - -export function preview20250311WebSearchServerToolFiltersToJSON( - preview20250311WebSearchServerToolFilters: - Preview20250311WebSearchServerToolFilters, -): string { - return JSON.stringify( - Preview20250311WebSearchServerToolFilters$outboundSchema.parse( - preview20250311WebSearchServerToolFilters, - ), - ); -} -export function preview20250311WebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult< - Preview20250311WebSearchServerToolFilters, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - Preview20250311WebSearchServerToolFilters$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'Preview20250311WebSearchServerToolFilters' from JSON`, - ); -} - /** @internal */ export const Preview20250311WebSearchServerTool$inboundSchema: z.ZodType< Preview20250311WebSearchServerTool, unknown > = z.object({ - type: z.literal("web_search_preview_2025_03_11"), + engine: WebSearchEngineEnum$inboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), + max_results: z.int().optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), + type: z.literal("web_search_preview_2025_03_11"), user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema) .optional(), - engine: Preview20250311WebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), - filters: z.nullable( - z.lazy(() => Preview20250311WebSearchServerToolFilters$inboundSchema), - ).optional(), }).transform((v) => { return remap$(v, { + "max_results": "maxResults", "search_context_size": "searchContextSize", "user_location": "userLocation", - "max_results": "maxResults", }); }); /** @internal */ export type Preview20250311WebSearchServerTool$Outbound = { - type: "web_search_preview_2025_03_11"; - search_context_size?: string | undefined; - user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; max_results?: number | undefined; - filters?: - | Preview20250311WebSearchServerToolFilters$Outbound - | null - | undefined; + search_context_size?: string | undefined; + type: "web_search_preview_2025_03_11"; + user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; }; /** @internal */ @@ -175,20 +86,18 @@ export const Preview20250311WebSearchServerTool$outboundSchema: z.ZodType< Preview20250311WebSearchServerTool$Outbound, Preview20250311WebSearchServerTool > = z.object({ - type: z.literal("web_search_preview_2025_03_11"), + engine: WebSearchEngineEnum$outboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), + maxResults: z.int().optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), + type: z.literal("web_search_preview_2025_03_11"), userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema) .optional(), - engine: Preview20250311WebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - filters: z.nullable( - z.lazy(() => Preview20250311WebSearchServerToolFilters$outboundSchema), - ).optional(), }).transform((v) => { return remap$(v, { + maxResults: "max_results", searchContextSize: "search_context_size", userLocation: "user_location", - maxResults: "max_results", }); }); diff --git a/src/models/previewwebsearchservertool.ts b/src/models/previewwebsearchservertool.ts index d760913a..15b2dbd5 100644 --- a/src/models/previewwebsearchservertool.ts +++ b/src/models/previewwebsearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -21,142 +19,66 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; - -/** - * 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. - */ -export const PreviewWebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type PreviewWebSearchServerToolEngine = OpenEnum< - typeof PreviewWebSearchServerToolEngine ->; - -export type PreviewWebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; /** * Web search preview tool configuration */ export type PreviewWebSearchServerTool = { - type: "web_search_preview"; - /** - * Size of the search context for web search tools - */ - searchContextSize?: SearchContextSizeEnum | undefined; - userLocation?: PreviewWebSearchUserLocation | null | undefined; /** * 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. */ - engine?: PreviewWebSearchServerToolEngine | undefined; + engine?: WebSearchEngineEnum | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** * 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. */ maxResults?: number | undefined; - filters?: PreviewWebSearchServerToolFilters | null | undefined; -}; - -/** @internal */ -export const PreviewWebSearchServerToolEngine$inboundSchema: z.ZodType< - PreviewWebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(PreviewWebSearchServerToolEngine); -/** @internal */ -export const PreviewWebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - PreviewWebSearchServerToolEngine -> = openEnums.outboundSchema(PreviewWebSearchServerToolEngine); - -/** @internal */ -export const PreviewWebSearchServerToolFilters$inboundSchema: z.ZodType< - PreviewWebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type PreviewWebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + /** + * Size of the search context for web search tools + */ + searchContextSize?: SearchContextSizeEnum | undefined; + type: "web_search_preview"; + userLocation?: PreviewWebSearchUserLocation | null | undefined; }; -/** @internal */ -export const PreviewWebSearchServerToolFilters$outboundSchema: z.ZodType< - PreviewWebSearchServerToolFilters$Outbound, - PreviewWebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function previewWebSearchServerToolFiltersToJSON( - previewWebSearchServerToolFilters: PreviewWebSearchServerToolFilters, -): string { - return JSON.stringify( - PreviewWebSearchServerToolFilters$outboundSchema.parse( - previewWebSearchServerToolFilters, - ), - ); -} -export function previewWebSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PreviewWebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PreviewWebSearchServerToolFilters' from JSON`, - ); -} - /** @internal */ export const PreviewWebSearchServerTool$inboundSchema: z.ZodType< PreviewWebSearchServerTool, unknown > = z.object({ - type: z.literal("web_search_preview"), + engine: WebSearchEngineEnum$inboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), + max_results: z.int().optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), + type: z.literal("web_search_preview"), user_location: z.nullable(PreviewWebSearchUserLocation$inboundSchema) .optional(), - engine: PreviewWebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), - filters: z.nullable( - z.lazy(() => PreviewWebSearchServerToolFilters$inboundSchema), - ).optional(), }).transform((v) => { return remap$(v, { + "max_results": "maxResults", "search_context_size": "searchContextSize", "user_location": "userLocation", - "max_results": "maxResults", }); }); /** @internal */ export type PreviewWebSearchServerTool$Outbound = { - type: "web_search_preview"; - search_context_size?: string | undefined; - user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; max_results?: number | undefined; - filters?: PreviewWebSearchServerToolFilters$Outbound | null | undefined; + search_context_size?: string | undefined; + type: "web_search_preview"; + user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; }; /** @internal */ @@ -164,20 +86,18 @@ export const PreviewWebSearchServerTool$outboundSchema: z.ZodType< PreviewWebSearchServerTool$Outbound, PreviewWebSearchServerTool > = z.object({ - type: z.literal("web_search_preview"), + engine: WebSearchEngineEnum$outboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), + maxResults: z.int().optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), + type: z.literal("web_search_preview"), userLocation: z.nullable(PreviewWebSearchUserLocation$outboundSchema) .optional(), - engine: PreviewWebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), - filters: z.nullable( - z.lazy(() => PreviewWebSearchServerToolFilters$outboundSchema), - ).optional(), }).transform((v) => { return remap$(v, { + maxResults: "max_results", searchContextSize: "search_context_size", userLocation: "user_location", - maxResults: "max_results", }); }); diff --git a/src/models/previewwebsearchuserlocation.ts b/src/models/previewwebsearchuserlocation.ts index e17b2d2d..789ab79f 100644 --- a/src/models/previewwebsearchuserlocation.ts +++ b/src/models/previewwebsearchuserlocation.ts @@ -17,11 +17,11 @@ export type PreviewWebSearchUserLocationType = ClosedEnum< >; export type PreviewWebSearchUserLocation = { - type: PreviewWebSearchUserLocationType; city?: string | null | undefined; country?: string | null | undefined; region?: string | null | undefined; timezone?: string | null | undefined; + type: PreviewWebSearchUserLocationType; }; /** @internal */ @@ -38,19 +38,19 @@ export const PreviewWebSearchUserLocation$inboundSchema: z.ZodType< PreviewWebSearchUserLocation, unknown > = z.object({ - type: PreviewWebSearchUserLocationType$inboundSchema, city: z.nullable(z.string()).optional(), country: z.nullable(z.string()).optional(), region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), + type: PreviewWebSearchUserLocationType$inboundSchema, }); /** @internal */ export type PreviewWebSearchUserLocation$Outbound = { - type: string; city?: string | null | undefined; country?: string | null | undefined; region?: string | null | undefined; timezone?: string | null | undefined; + type: string; }; /** @internal */ @@ -58,11 +58,11 @@ export const PreviewWebSearchUserLocation$outboundSchema: z.ZodType< PreviewWebSearchUserLocation$Outbound, PreviewWebSearchUserLocation > = z.object({ - type: PreviewWebSearchUserLocationType$outboundSchema, city: z.nullable(z.string()).optional(), country: z.nullable(z.string()).optional(), region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), + type: PreviewWebSearchUserLocationType$outboundSchema, }); export function previewWebSearchUserLocationToJSON( diff --git a/src/models/providerpreferences.ts b/src/models/providerpreferences.ts index d06fa3ea..bf002879 100644 --- a/src/models/providerpreferences.ts +++ b/src/models/providerpreferences.ts @@ -6,11 +6,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; -import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; +import { OpenEnum } from "../types/enums.js"; import { PreferredMaxLatency, PreferredMaxLatency$Outbound, @@ -22,121 +18,63 @@ import { PreferredMinThroughput$outboundSchema, } from "./preferredminthroughput.js"; import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; +import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; +import { + ProviderSortConfig, + ProviderSortConfig$Outbound, + ProviderSortConfig$outboundSchema, +} from "./providersortconfig.js"; import { Quantization, Quantization$outboundSchema } from "./quantization.js"; -export type ProviderPreferencesOrder = ProviderName | string; - -export type ProviderPreferencesOnly = ProviderName | string; - -export type ProviderPreferencesIgnore = ProviderName | string; - -export const ProviderPreferencesSortEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ProviderPreferencesSortEnum = OpenEnum< - typeof ProviderPreferencesSortEnum ->; - -export const ProviderPreferencesProviderSortConfigEnum = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -export type ProviderPreferencesProviderSortConfigEnum = ClosedEnum< - typeof ProviderPreferencesProviderSortConfigEnum ->; - /** - * The provider sorting strategy (price, throughput, latency) + * Data collection setting. If no available model provider meets the requirement, your request will return an error. + * + * @remarks + * - 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. */ -export const ProviderPreferencesBy = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", +export const DataCollection = { + Deny: "deny", + Allow: "allow", } as const; /** - * The provider sorting strategy (price, throughput, latency) + * Data collection setting. If no available model provider meets the requirement, your request will return an error. + * + * @remarks + * - 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. */ -export type ProviderPreferencesBy = OpenEnum; +export type DataCollection = OpenEnum; + +export type Ignore = ProviderName | string; /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. - */ -export const ProviderPreferencesPartition = { - Model: "model", - None: "none", -} as const; -/** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ -export type ProviderPreferencesPartition = OpenEnum< - typeof ProviderPreferencesPartition ->; - -export type ProviderPreferencesProviderSortConfig = { - /** - * The provider sorting strategy (price, throughput, latency) - */ - by?: ProviderPreferencesBy | null | undefined; +export type MaxPrice = { + audio?: string | undefined; + completion?: string | undefined; + image?: string | undefined; /** - * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + * Price per million prompt tokens */ - partition?: ProviderPreferencesPartition | null | undefined; + prompt?: string | undefined; + request?: string | undefined; }; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ProviderPreferencesProviderSortConfigUnion = - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum; +export type Only = ProviderName | string; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export const ProviderPreferencesProviderSort = { - Price: "price", - Throughput: "throughput", - Latency: "latency", - Exacto: "exacto", -} as const; -/** - * The provider sorting strategy (price, throughput, latency) - */ -export type ProviderPreferencesProviderSort = OpenEnum< - typeof ProviderPreferencesProviderSort ->; +export type Order = ProviderName | string; /** * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ -export type ProviderPreferencesSortUnion = - | ProviderPreferencesProviderSort - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum - | ProviderPreferencesSortEnum; - -/** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ -export type ProviderPreferencesMaxPrice = { - /** - * Price per million prompt tokens - */ - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; +export type Sort = ProviderSort | ProviderSortConfig | any; /** - * Provider routing preferences for the request. + * When multiple model providers are available, optionally indicate your routing preference. */ export type ProviderPreferences = { /** @@ -147,10 +85,6 @@ export type ProviderPreferences = { * - false: use only the primary/custom provider, and return the upstream error if it's unavailable. */ allowFallbacks?: boolean | null | undefined; - /** - * 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. - */ - requireParameters?: boolean | null | undefined; /** * Data collection setting. If no available model provider meets the requirement, your request will return an error. * @@ -160,265 +94,145 @@ export type ProviderPreferences = { * - deny: use only providers which do not collect user data. */ dataCollection?: DataCollection | null | undefined; - /** - * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - */ - zdr?: boolean | null | undefined; /** * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. */ enforceDistillableText?: boolean | null | undefined; /** - * 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. + * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. */ - order?: Array | null | undefined; + ignore?: Array | null | undefined; + /** + * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. + */ + maxPrice?: MaxPrice | undefined; /** * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. */ only?: Array | null | undefined; /** - * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * 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?: Array | null | undefined; + order?: Array | null | undefined; + /** + * 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. + */ + preferredMaxLatency?: PreferredMaxLatency | null | undefined; + /** + * 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. + */ + preferredMinThroughput?: PreferredMinThroughput | null | undefined; /** * A list of quantization levels to filter the provider by. */ quantizations?: Array | null | undefined; - sort?: - | ProviderPreferencesProviderSort - | ProviderPreferencesProviderSortConfig - | ProviderPreferencesProviderSortConfigEnum - | ProviderPreferencesSortEnum - | null - | undefined; /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. + * 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. */ - maxPrice?: ProviderPreferencesMaxPrice | undefined; + requireParameters?: boolean | null | undefined; /** - * 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. + * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. */ - preferredMinThroughput?: PreferredMinThroughput | null | undefined; + sort?: ProviderSort | ProviderSortConfig | any | null | undefined; /** - * 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. + * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. */ - preferredMaxLatency?: PreferredMaxLatency | null | undefined; + zdr?: boolean | null | undefined; }; /** @internal */ -export type ProviderPreferencesOrder$Outbound = string | string; +export const DataCollection$outboundSchema: z.ZodType = + openEnums.outboundSchema(DataCollection); /** @internal */ -export const ProviderPreferencesOrder$outboundSchema: z.ZodType< - ProviderPreferencesOrder$Outbound, - ProviderPreferencesOrder -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function providerPreferencesOrderToJSON( - providerPreferencesOrder: ProviderPreferencesOrder, -): string { - return JSON.stringify( - ProviderPreferencesOrder$outboundSchema.parse(providerPreferencesOrder), - ); -} - -/** @internal */ -export type ProviderPreferencesOnly$Outbound = string | string; +export type Ignore$Outbound = string | string; /** @internal */ -export const ProviderPreferencesOnly$outboundSchema: z.ZodType< - ProviderPreferencesOnly$Outbound, - ProviderPreferencesOnly -> = z.union([ProviderName$outboundSchema, z.string()]); +export const Ignore$outboundSchema: z.ZodType = z + .union([ProviderName$outboundSchema, z.string()]); -export function providerPreferencesOnlyToJSON( - providerPreferencesOnly: ProviderPreferencesOnly, -): string { - return JSON.stringify( - ProviderPreferencesOnly$outboundSchema.parse(providerPreferencesOnly), - ); +export function ignoreToJSON(ignore: Ignore): string { + return JSON.stringify(Ignore$outboundSchema.parse(ignore)); } /** @internal */ -export type ProviderPreferencesIgnore$Outbound = string | string; - -/** @internal */ -export const ProviderPreferencesIgnore$outboundSchema: z.ZodType< - ProviderPreferencesIgnore$Outbound, - ProviderPreferencesIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function providerPreferencesIgnoreToJSON( - providerPreferencesIgnore: ProviderPreferencesIgnore, -): string { - return JSON.stringify( - ProviderPreferencesIgnore$outboundSchema.parse(providerPreferencesIgnore), - ); -} - -/** @internal */ -export const ProviderPreferencesSortEnum$outboundSchema: z.ZodType< - string, - ProviderPreferencesSortEnum -> = openEnums.outboundSchema(ProviderPreferencesSortEnum); - -/** @internal */ -export const ProviderPreferencesProviderSortConfigEnum$outboundSchema: - z.ZodEnum = z.enum( - ProviderPreferencesProviderSortConfigEnum, - ); - -/** @internal */ -export const ProviderPreferencesBy$outboundSchema: z.ZodType< - string, - ProviderPreferencesBy -> = openEnums.outboundSchema(ProviderPreferencesBy); - -/** @internal */ -export const ProviderPreferencesPartition$outboundSchema: z.ZodType< - string, - ProviderPreferencesPartition -> = openEnums.outboundSchema(ProviderPreferencesPartition); - -/** @internal */ -export type ProviderPreferencesProviderSortConfig$Outbound = { - by?: string | null | undefined; - partition?: string | null | undefined; +export type MaxPrice$Outbound = { + audio?: string | undefined; + completion?: string | undefined; + image?: string | undefined; + prompt?: string | undefined; + request?: string | undefined; }; /** @internal */ -export const ProviderPreferencesProviderSortConfig$outboundSchema: z.ZodType< - ProviderPreferencesProviderSortConfig$Outbound, - ProviderPreferencesProviderSortConfig -> = z.object({ - by: z.nullable(ProviderPreferencesBy$outboundSchema).optional(), - partition: z.nullable(ProviderPreferencesPartition$outboundSchema).optional(), -}); +export const MaxPrice$outboundSchema: z.ZodType = z + .object({ + audio: z.string().optional(), + completion: z.string().optional(), + image: z.string().optional(), + prompt: z.string().optional(), + request: z.string().optional(), + }); -export function providerPreferencesProviderSortConfigToJSON( - providerPreferencesProviderSortConfig: ProviderPreferencesProviderSortConfig, -): string { - return JSON.stringify( - ProviderPreferencesProviderSortConfig$outboundSchema.parse( - providerPreferencesProviderSortConfig, - ), - ); +export function maxPriceToJSON(maxPrice: MaxPrice): string { + return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice)); } /** @internal */ -export type ProviderPreferencesProviderSortConfigUnion$Outbound = - | ProviderPreferencesProviderSortConfig$Outbound - | string; +export type Only$Outbound = string | string; /** @internal */ -export const ProviderPreferencesProviderSortConfigUnion$outboundSchema: - z.ZodType< - ProviderPreferencesProviderSortConfigUnion$Outbound, - ProviderPreferencesProviderSortConfigUnion - > = z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]); +export const Only$outboundSchema: z.ZodType = z.union([ + ProviderName$outboundSchema, + z.string(), +]); -export function providerPreferencesProviderSortConfigUnionToJSON( - providerPreferencesProviderSortConfigUnion: - ProviderPreferencesProviderSortConfigUnion, -): string { - return JSON.stringify( - ProviderPreferencesProviderSortConfigUnion$outboundSchema.parse( - providerPreferencesProviderSortConfigUnion, - ), - ); +export function onlyToJSON(only: Only): string { + return JSON.stringify(Only$outboundSchema.parse(only)); } /** @internal */ -export const ProviderPreferencesProviderSort$outboundSchema: z.ZodType< - string, - ProviderPreferencesProviderSort -> = openEnums.outboundSchema(ProviderPreferencesProviderSort); - -/** @internal */ -export type ProviderPreferencesSortUnion$Outbound = - | string - | ProviderPreferencesProviderSortConfig$Outbound - | string - | string; +export type Order$Outbound = string | string; /** @internal */ -export const ProviderPreferencesSortUnion$outboundSchema: z.ZodType< - ProviderPreferencesSortUnion$Outbound, - ProviderPreferencesSortUnion -> = z.union([ - ProviderPreferencesProviderSort$outboundSchema, - z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]), - ProviderPreferencesSortEnum$outboundSchema, +export const Order$outboundSchema: z.ZodType = z.union([ + ProviderName$outboundSchema, + z.string(), ]); -export function providerPreferencesSortUnionToJSON( - providerPreferencesSortUnion: ProviderPreferencesSortUnion, -): string { - return JSON.stringify( - ProviderPreferencesSortUnion$outboundSchema.parse( - providerPreferencesSortUnion, - ), - ); +export function orderToJSON(order: Order): string { + return JSON.stringify(Order$outboundSchema.parse(order)); } /** @internal */ -export type ProviderPreferencesMaxPrice$Outbound = { - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; +export type Sort$Outbound = string | ProviderSortConfig$Outbound | any; /** @internal */ -export const ProviderPreferencesMaxPrice$outboundSchema: z.ZodType< - ProviderPreferencesMaxPrice$Outbound, - ProviderPreferencesMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); +export const Sort$outboundSchema: z.ZodType = z.union([ + ProviderSort$outboundSchema, + ProviderSortConfig$outboundSchema, + z.any(), +]); -export function providerPreferencesMaxPriceToJSON( - providerPreferencesMaxPrice: ProviderPreferencesMaxPrice, -): string { - return JSON.stringify( - ProviderPreferencesMaxPrice$outboundSchema.parse( - providerPreferencesMaxPrice, - ), - ); +export function sortToJSON(sort: Sort): string { + return JSON.stringify(Sort$outboundSchema.parse(sort)); } /** @internal */ export type ProviderPreferences$Outbound = { allow_fallbacks?: boolean | null | undefined; - require_parameters?: boolean | null | undefined; data_collection?: string | null | undefined; - zdr?: boolean | null | undefined; enforce_distillable_text?: boolean | null | undefined; - order?: Array | null | undefined; - only?: Array | null | undefined; ignore?: Array | null | undefined; - quantizations?: Array | null | undefined; - sort?: - | string - | ProviderPreferencesProviderSortConfig$Outbound - | string - | string - | null - | undefined; - max_price?: ProviderPreferencesMaxPrice$Outbound | undefined; - preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; + max_price?: MaxPrice$Outbound | undefined; + only?: Array | null | undefined; + order?: Array | null | undefined; preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; + preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; + quantizations?: Array | null | undefined; + require_parameters?: boolean | null | undefined; + sort?: string | ProviderSortConfig$Outbound | any | null | undefined; + zdr?: boolean | null | undefined; }; /** @internal */ @@ -427,42 +241,39 @@ export const ProviderPreferences$outboundSchema: z.ZodType< ProviderPreferences > = z.object({ allowFallbacks: z.nullable(z.boolean()).optional(), - requireParameters: z.nullable(z.boolean()).optional(), dataCollection: z.nullable(DataCollection$outboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), enforceDistillableText: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), ignore: z.nullable( z.array(z.union([ProviderName$outboundSchema, z.string()])), ).optional(), + maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(), + only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) + .optional(), + order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) + .optional(), + preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) + .optional(), + preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) + .optional(), quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), + requireParameters: z.nullable(z.boolean()).optional(), sort: z.nullable( z.union([ - ProviderPreferencesProviderSort$outboundSchema, - z.union([ - z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema), - ProviderPreferencesProviderSortConfigEnum$outboundSchema, - ]), - ProviderPreferencesSortEnum$outboundSchema, + ProviderSort$outboundSchema, + ProviderSortConfig$outboundSchema, + z.any(), ]), ).optional(), - maxPrice: z.lazy(() => ProviderPreferencesMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) - .optional(), - preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) - .optional(), + zdr: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { allowFallbacks: "allow_fallbacks", - requireParameters: "require_parameters", dataCollection: "data_collection", enforceDistillableText: "enforce_distillable_text", maxPrice: "max_price", - preferredMinThroughput: "preferred_min_throughput", preferredMaxLatency: "preferred_max_latency", + preferredMinThroughput: "preferred_min_throughput", + requireParameters: "require_parameters", }); }); diff --git a/src/models/providerresponse.ts b/src/models/providerresponse.ts new file mode 100644 index 00000000..a520f49f --- /dev/null +++ b/src/models/providerresponse.ts @@ -0,0 +1,199 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7427d17a27bc + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Name of the provider + */ +export const ProviderResponseProviderName = { + AnyScale: "AnyScale", + Atoma: "Atoma", + CentML: "Cent-ML", + CrofAI: "CrofAI", + Enfer: "Enfer", + GoPomelo: "GoPomelo", + HuggingFace: "HuggingFace", + Hyperbolic2: "Hyperbolic 2", + InoCloud: "InoCloud", + Kluster: "Kluster", + Lambda: "Lambda", + Lepton: "Lepton", + Lynn2: "Lynn 2", + Lynn: "Lynn", + Mancer: "Mancer", + Meta: "Meta", + Modal: "Modal", + Nineteen: "Nineteen", + OctoAI: "OctoAI", + Recursal: "Recursal", + Reflection: "Reflection", + Replicate: "Replicate", + SambaNova2: "SambaNova 2", + SFCompute: "SF Compute", + Targon: "Targon", + Together2: "Together 2", + Ubicloud: "Ubicloud", + OneDotAI: "01.AI", + AkashML: "AkashML", + Ai21: "AI21", + AionLabs: "AionLabs", + Alibaba: "Alibaba", + Ambient: "Ambient", + AmazonBedrock: "Amazon Bedrock", + AmazonNova: "Amazon Nova", + Anthropic: "Anthropic", + ArceeAI: "Arcee AI", + AtlasCloud: "AtlasCloud", + Avian: "Avian", + Azure: "Azure", + BaseTen: "BaseTen", + BytePlus: "BytePlus", + BlackForestLabs: "Black Forest Labs", + Cerebras: "Cerebras", + Chutes: "Chutes", + Cirrascale: "Cirrascale", + Clarifai: "Clarifai", + Cloudflare: "Cloudflare", + Cohere: "Cohere", + Crusoe: "Crusoe", + DeepInfra: "DeepInfra", + DeepSeek: "DeepSeek", + Featherless: "Featherless", + Fireworks: "Fireworks", + Friendli: "Friendli", + GMICloud: "GMICloud", + Google: "Google", + GoogleAIStudio: "Google AI Studio", + Groq: "Groq", + Hyperbolic: "Hyperbolic", + Inception: "Inception", + Inceptron: "Inceptron", + InferenceNet: "InferenceNet", + Ionstream: "Ionstream", + Infermatic: "Infermatic", + IoNet: "Io Net", + Inflection: "Inflection", + Liquid: "Liquid", + Mara: "Mara", + Mancer2: "Mancer 2", + Minimax: "Minimax", + ModelRun: "ModelRun", + Mistral: "Mistral", + Modular: "Modular", + MoonshotAI: "Moonshot AI", + Morph: "Morph", + NCompass: "NCompass", + Nebius: "Nebius", + NextBit: "NextBit", + Novita: "Novita", + Nvidia: "Nvidia", + OpenAI: "OpenAI", + OpenInference: "OpenInference", + Parasail: "Parasail", + Perplexity: "Perplexity", + Phala: "Phala", + Reka: "Reka", + Relace: "Relace", + SambaNova: "SambaNova", + Seed: "Seed", + SiliconFlow: "SiliconFlow", + Sourceful: "Sourceful", + StepFun: "StepFun", + Stealth: "Stealth", + StreamLake: "StreamLake", + Switchpoint: "Switchpoint", + Together: "Together", + Upstage: "Upstage", + Venice: "Venice", + WandB: "WandB", + Xiaomi: "Xiaomi", + XAI: "xAI", + ZAi: "Z.AI", + FakeProvider: "FakeProvider", +} as const; +/** + * Name of the provider + */ +export type ProviderResponseProviderName = OpenEnum< + typeof ProviderResponseProviderName +>; + +/** + * Details of a provider response for a generation attempt + */ +export type ProviderResponse = { + /** + * Internal endpoint identifier + */ + endpointId?: string | undefined; + /** + * Upstream provider response identifier + */ + id?: string | undefined; + /** + * Whether the request used a bring-your-own-key + */ + isByok?: boolean | undefined; + /** + * Response latency in milliseconds + */ + latency?: number | undefined; + /** + * Canonical model slug + */ + modelPermaslug?: string | undefined; + /** + * Name of the provider + */ + providerName?: ProviderResponseProviderName | undefined; + /** + * HTTP status code from the provider + */ + status: number | null; +}; + +/** @internal */ +export const ProviderResponseProviderName$inboundSchema: z.ZodType< + ProviderResponseProviderName, + unknown +> = openEnums.inboundSchema(ProviderResponseProviderName); + +/** @internal */ +export const ProviderResponse$inboundSchema: z.ZodType< + ProviderResponse, + unknown +> = z.object({ + endpoint_id: z.string().optional(), + id: z.string().optional(), + is_byok: z.boolean().optional(), + latency: z.number().optional(), + model_permaslug: z.string().optional(), + provider_name: ProviderResponseProviderName$inboundSchema.optional(), + status: z.nullable(z.number()), +}).transform((v) => { + return remap$(v, { + "endpoint_id": "endpointId", + "is_byok": "isByok", + "model_permaslug": "modelPermaslug", + "provider_name": "providerName", + }); +}); + +export function providerResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProviderResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProviderResponse' from JSON`, + ); +} diff --git a/src/models/publicendpoint.ts b/src/models/publicendpoint.ts index 01ca674a..5912315f 100644 --- a/src/models/publicendpoint.ts +++ b/src/models/publicendpoint.ts @@ -22,20 +22,20 @@ import { import { ProviderName, ProviderName$inboundSchema } from "./providername.js"; export type Pricing = { - prompt: string; + audio?: string | undefined; + audioOutput?: string | undefined; completion: string; - request?: string | undefined; + discount?: number | undefined; image?: string | undefined; - imageToken?: string | undefined; imageOutput?: string | undefined; - audio?: string | undefined; - audioOutput?: string | undefined; + imageToken?: string | undefined; inputAudioCache?: string | undefined; - webSearch?: string | undefined; - internalReasoning?: string | undefined; inputCacheRead?: string | undefined; inputCacheWrite?: string | undefined; - discount?: number | undefined; + internalReasoning?: string | undefined; + prompt: string; + request?: string | undefined; + webSearch?: string | undefined; }; export const PublicEndpointQuantization = { @@ -57,56 +57,64 @@ export type PublicEndpointQuantization = OpenEnum< * Information about a specific model endpoint */ export type PublicEndpoint = { - name: string; + contextLength: number; + /** + * 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. + */ + latencyLast30m: PercentileStats | null; + maxCompletionTokens: number; + maxPromptTokens: number; /** * The unique identifier for the model (permaslug) */ modelId: string; modelName: string; - contextLength: number; + name: string; pricing: Pricing; providerName: ProviderName; - tag: string; quantization: PublicEndpointQuantization | null; - maxCompletionTokens: number | null; - maxPromptTokens: number | null; - supportedParameters: Array; status?: EndpointStatus | undefined; - uptimeLast30m: number | null; + supportedParameters: Array; supportsImplicitCaching: boolean; + tag: string; + throughputLast30m: PercentileStats | null; /** - * 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. + * 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. */ - latencyLast30m: PercentileStats | null; - throughputLast30m: PercentileStats | null; + uptimeLast1d: number; + uptimeLast30m: number; + /** + * 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. + */ + uptimeLast5m: number; }; /** @internal */ export const Pricing$inboundSchema: z.ZodType = z.object({ - prompt: z.string(), + audio: z.string().optional(), + audio_output: z.string().optional(), completion: z.string(), - request: z.string().optional(), + discount: z.number().optional(), image: z.string().optional(), - image_token: z.string().optional(), image_output: z.string().optional(), - audio: z.string().optional(), - audio_output: z.string().optional(), + image_token: z.string().optional(), input_audio_cache: z.string().optional(), - web_search: z.string().optional(), - internal_reasoning: z.string().optional(), input_cache_read: z.string().optional(), input_cache_write: z.string().optional(), - discount: z.number().optional(), + internal_reasoning: z.string().optional(), + prompt: z.string(), + request: z.string().optional(), + web_search: z.string().optional(), }).transform((v) => { return remap$(v, { - "image_token": "imageToken", - "image_output": "imageOutput", "audio_output": "audioOutput", + "image_output": "imageOutput", + "image_token": "imageToken", "input_audio_cache": "inputAudioCache", - "web_search": "webSearch", - "internal_reasoning": "internalReasoning", "input_cache_read": "inputCacheRead", "input_cache_write": "inputCacheWrite", + "internal_reasoning": "internalReasoning", + "web_search": "webSearch", }); }); @@ -129,35 +137,39 @@ export const PublicEndpointQuantization$inboundSchema: z.ZodType< /** @internal */ export const PublicEndpoint$inboundSchema: z.ZodType = z.object({ - name: z.string(), + context_length: z.int(), + latency_last_30m: z.nullable(PercentileStats$inboundSchema), + max_completion_tokens: z.int(), + max_prompt_tokens: z.int(), model_id: z.string(), model_name: z.string(), - context_length: z.number(), + name: z.string(), pricing: z.lazy(() => Pricing$inboundSchema), provider_name: ProviderName$inboundSchema, - tag: z.string(), quantization: z.nullable(PublicEndpointQuantization$inboundSchema), - max_completion_tokens: z.nullable(z.number()), - max_prompt_tokens: z.nullable(z.number()), - supported_parameters: z.array(Parameter$inboundSchema), status: EndpointStatus$inboundSchema.optional(), - uptime_last_30m: z.nullable(z.number()), + supported_parameters: z.array(Parameter$inboundSchema), supports_implicit_caching: z.boolean(), - latency_last_30m: z.nullable(PercentileStats$inboundSchema), + tag: z.string(), throughput_last_30m: z.nullable(PercentileStats$inboundSchema), + uptime_last_1d: z.number(), + uptime_last_30m: z.number(), + uptime_last_5m: z.number(), }).transform((v) => { return remap$(v, { - "model_id": "modelId", - "model_name": "modelName", "context_length": "contextLength", - "provider_name": "providerName", + "latency_last_30m": "latencyLast30m", "max_completion_tokens": "maxCompletionTokens", "max_prompt_tokens": "maxPromptTokens", + "model_id": "modelId", + "model_name": "modelName", + "provider_name": "providerName", "supported_parameters": "supportedParameters", - "uptime_last_30m": "uptimeLast30m", "supports_implicit_caching": "supportsImplicitCaching", - "latency_last_30m": "latencyLast30m", "throughput_last_30m": "throughputLast30m", + "uptime_last_1d": "uptimeLast1d", + "uptime_last_30m": "uptimeLast30m", + "uptime_last_5m": "uptimeLast5m", }); }); diff --git a/src/models/publicpricing.ts b/src/models/publicpricing.ts index f3a1a801..58037756 100644 --- a/src/models/publicpricing.ts +++ b/src/models/publicpricing.ts @@ -13,49 +13,49 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Pricing information for the model */ export type PublicPricing = { - prompt: string; + audio?: string | undefined; + audioOutput?: string | undefined; completion: string; - request?: string | undefined; + discount?: number | undefined; image?: string | undefined; - imageToken?: string | undefined; imageOutput?: string | undefined; - audio?: string | undefined; - audioOutput?: string | undefined; + imageToken?: string | undefined; inputAudioCache?: string | undefined; - webSearch?: string | undefined; - internalReasoning?: string | undefined; inputCacheRead?: string | undefined; inputCacheWrite?: string | undefined; - discount?: number | undefined; + internalReasoning?: string | undefined; + prompt: string; + request?: string | undefined; + webSearch?: string | undefined; }; /** @internal */ export const PublicPricing$inboundSchema: z.ZodType = z .object({ - prompt: z.string(), + audio: z.string().optional(), + audio_output: z.string().optional(), completion: z.string(), - request: z.string().optional(), + discount: z.number().optional(), image: z.string().optional(), - image_token: z.string().optional(), image_output: z.string().optional(), - audio: z.string().optional(), - audio_output: z.string().optional(), + image_token: z.string().optional(), input_audio_cache: z.string().optional(), - web_search: z.string().optional(), - internal_reasoning: z.string().optional(), input_cache_read: z.string().optional(), input_cache_write: z.string().optional(), - discount: z.number().optional(), + internal_reasoning: z.string().optional(), + prompt: z.string(), + request: z.string().optional(), + web_search: z.string().optional(), }).transform((v) => { return remap$(v, { - "image_token": "imageToken", - "image_output": "imageOutput", "audio_output": "audioOutput", + "image_output": "imageOutput", + "image_token": "imageToken", "input_audio_cache": "inputAudioCache", - "web_search": "webSearch", - "internal_reasoning": "internalReasoning", "input_cache_read": "inputCacheRead", "input_cache_write": "inputCacheWrite", + "internal_reasoning": "internalReasoning", + "web_search": "webSearch", }); }); diff --git a/src/models/reasoningconfig.ts b/src/models/reasoningconfig.ts index d471de6d..caa10c60 100644 --- a/src/models/reasoningconfig.ts +++ b/src/models/reasoningconfig.ts @@ -6,30 +6,30 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { - ReasoningEffortEnum, - ReasoningEffortEnum$outboundSchema, -} from "./reasoningeffortenum.js"; + ReasoningEffort, + ReasoningEffort$outboundSchema, +} from "./reasoningeffort.js"; import { - ReasoningSummaryVerbosityEnum, - ReasoningSummaryVerbosityEnum$outboundSchema, -} from "./reasoningsummaryverbosityenum.js"; + ReasoningSummaryVerbosity, + ReasoningSummaryVerbosity$outboundSchema, +} from "./reasoningsummaryverbosity.js"; /** * Configuration for reasoning mode in the response */ export type ReasoningConfig = { - effort?: ReasoningEffortEnum | null | undefined; - summary?: ReasoningSummaryVerbosityEnum | null | undefined; - maxTokens?: number | null | undefined; + effort?: ReasoningEffort | null | undefined; + summary?: ReasoningSummaryVerbosity | null | undefined; enabled?: boolean | null | undefined; + maxTokens?: number | undefined; }; /** @internal */ export type ReasoningConfig$Outbound = { effort?: string | null | undefined; summary?: string | null | undefined; - max_tokens?: number | null | undefined; enabled?: boolean | null | undefined; + max_tokens?: number | undefined; }; /** @internal */ @@ -37,10 +37,10 @@ export const ReasoningConfig$outboundSchema: z.ZodType< ReasoningConfig$Outbound, ReasoningConfig > = z.object({ - effort: z.nullable(ReasoningEffortEnum$outboundSchema).optional(), - summary: z.nullable(ReasoningSummaryVerbosityEnum$outboundSchema).optional(), - maxTokens: z.nullable(z.number()).optional(), + effort: z.nullable(ReasoningEffort$outboundSchema).optional(), + summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(), enabled: z.nullable(z.boolean()).optional(), + maxTokens: z.int().optional(), }).transform((v) => { return remap$(v, { maxTokens: "max_tokens", diff --git a/src/models/reasoningdeltaevent.ts b/src/models/reasoningdeltaevent.ts index 8091842f..cc635d9b 100644 --- a/src/models/reasoningdeltaevent.ts +++ b/src/models/reasoningdeltaevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when reasoning text delta is streamed */ export type ReasoningDeltaEvent = { - type: "response.reasoning_text.delta"; - outputIndex: number; - itemId: string; contentIndex: number; delta: string; + itemId: string; + outputIndex: number; sequenceNumber: number; + type: "response.reasoning_text.delta"; }; /** @internal */ @@ -26,17 +26,17 @@ export const ReasoningDeltaEvent$inboundSchema: z.ZodType< ReasoningDeltaEvent, unknown > = z.object({ - type: z.literal("response.reasoning_text.delta"), - output_index: z.number(), - item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + item_id: z.string(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.reasoning_text.delta"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/reasoningdetailencrypted.ts b/src/models/reasoningdetailencrypted.ts index 8f8217ed..1bd75c9c 100644 --- a/src/models/reasoningdetailencrypted.ts +++ b/src/models/reasoningdetailencrypted.ts @@ -5,63 +5,43 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailEncryptedFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailEncryptedFormat = OpenEnum< - typeof ReasoningDetailEncryptedFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail encrypted schema */ export type ReasoningDetailEncrypted = { - type: "reasoning.encrypted"; data: string; + format?: ReasoningFormat | null | undefined; id?: string | null | undefined; - format?: ReasoningDetailEncryptedFormat | null | undefined; index?: number | undefined; + type: "reasoning.encrypted"; }; -/** @internal */ -export const ReasoningDetailEncryptedFormat$inboundSchema: z.ZodType< - ReasoningDetailEncryptedFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailEncryptedFormat); -/** @internal */ -export const ReasoningDetailEncryptedFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailEncryptedFormat -> = openEnums.outboundSchema(ReasoningDetailEncryptedFormat); - /** @internal */ export const ReasoningDetailEncrypted$inboundSchema: z.ZodType< ReasoningDetailEncrypted, unknown > = z.object({ - type: z.literal("reasoning.encrypted"), data: z.string(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailEncryptedFormat$inboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + type: z.literal("reasoning.encrypted"), }); /** @internal */ export type ReasoningDetailEncrypted$Outbound = { - type: "reasoning.encrypted"; data: string; - id?: string | null | undefined; format?: string | null | undefined; + id?: string | null | undefined; index?: number | undefined; + type: "reasoning.encrypted"; }; /** @internal */ @@ -69,11 +49,11 @@ export const ReasoningDetailEncrypted$outboundSchema: z.ZodType< ReasoningDetailEncrypted$Outbound, ReasoningDetailEncrypted > = z.object({ - type: z.literal("reasoning.encrypted"), data: z.string(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailEncryptedFormat$outboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + type: z.literal("reasoning.encrypted"), }); export function reasoningDetailEncryptedToJSON( diff --git a/src/models/reasoningdetailsummary.ts b/src/models/reasoningdetailsummary.ts index 4370c07c..b572e734 100644 --- a/src/models/reasoningdetailsummary.ts +++ b/src/models/reasoningdetailsummary.ts @@ -5,63 +5,43 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailSummaryFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailSummaryFormat = OpenEnum< - typeof ReasoningDetailSummaryFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail summary schema */ export type ReasoningDetailSummary = { - type: "reasoning.summary"; - summary: string; + format?: ReasoningFormat | null | undefined; id?: string | null | undefined; - format?: ReasoningDetailSummaryFormat | null | undefined; index?: number | undefined; + summary: string; + type: "reasoning.summary"; }; -/** @internal */ -export const ReasoningDetailSummaryFormat$inboundSchema: z.ZodType< - ReasoningDetailSummaryFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailSummaryFormat); -/** @internal */ -export const ReasoningDetailSummaryFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailSummaryFormat -> = openEnums.outboundSchema(ReasoningDetailSummaryFormat); - /** @internal */ export const ReasoningDetailSummary$inboundSchema: z.ZodType< ReasoningDetailSummary, unknown > = z.object({ - type: z.literal("reasoning.summary"), - summary: z.string(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailSummaryFormat$inboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + summary: z.string(), + type: z.literal("reasoning.summary"), }); /** @internal */ export type ReasoningDetailSummary$Outbound = { - type: "reasoning.summary"; - summary: string; - id?: string | null | undefined; format?: string | null | undefined; + id?: string | null | undefined; index?: number | undefined; + summary: string; + type: "reasoning.summary"; }; /** @internal */ @@ -69,11 +49,11 @@ export const ReasoningDetailSummary$outboundSchema: z.ZodType< ReasoningDetailSummary$Outbound, ReasoningDetailSummary > = z.object({ - type: z.literal("reasoning.summary"), - summary: z.string(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailSummaryFormat$outboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + summary: z.string(), + type: z.literal("reasoning.summary"), }); export function reasoningDetailSummaryToJSON( diff --git a/src/models/reasoningdetailtext.ts b/src/models/reasoningdetailtext.ts index 4735b882..3dab7e04 100644 --- a/src/models/reasoningdetailtext.ts +++ b/src/models/reasoningdetailtext.ts @@ -5,66 +5,46 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const ReasoningDetailTextFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type ReasoningDetailTextFormat = OpenEnum< - typeof ReasoningDetailTextFormat ->; +import { + ReasoningFormat, + ReasoningFormat$inboundSchema, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; /** * Reasoning detail text schema */ export type ReasoningDetailText = { - type: "reasoning.text"; - text?: string | null | undefined; - signature?: string | null | undefined; + format?: ReasoningFormat | null | undefined; id?: string | null | undefined; - format?: ReasoningDetailTextFormat | null | undefined; index?: number | undefined; + signature?: string | null | undefined; + text?: string | null | undefined; + type: "reasoning.text"; }; -/** @internal */ -export const ReasoningDetailTextFormat$inboundSchema: z.ZodType< - ReasoningDetailTextFormat, - unknown -> = openEnums.inboundSchema(ReasoningDetailTextFormat); -/** @internal */ -export const ReasoningDetailTextFormat$outboundSchema: z.ZodType< - string, - ReasoningDetailTextFormat -> = openEnums.outboundSchema(ReasoningDetailTextFormat); - /** @internal */ export const ReasoningDetailText$inboundSchema: z.ZodType< ReasoningDetailText, unknown > = z.object({ - type: z.literal("reasoning.text"), - text: z.nullable(z.string()).optional(), - signature: z.nullable(z.string()).optional(), + format: z.nullable(ReasoningFormat$inboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailTextFormat$inboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + signature: z.nullable(z.string()).optional(), + text: z.nullable(z.string()).optional(), + type: z.literal("reasoning.text"), }); /** @internal */ export type ReasoningDetailText$Outbound = { - type: "reasoning.text"; - text?: string | null | undefined; - signature?: string | null | undefined; - id?: string | null | undefined; format?: string | null | undefined; + id?: string | null | undefined; index?: number | undefined; + signature?: string | null | undefined; + text?: string | null | undefined; + type: "reasoning.text"; }; /** @internal */ @@ -72,12 +52,12 @@ export const ReasoningDetailText$outboundSchema: z.ZodType< ReasoningDetailText$Outbound, ReasoningDetailText > = z.object({ - type: z.literal("reasoning.text"), - text: z.nullable(z.string()).optional(), - signature: z.nullable(z.string()).optional(), + format: z.nullable(ReasoningFormat$outboundSchema).optional(), id: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningDetailTextFormat$outboundSchema).optional(), - index: z.number().optional(), + index: z.int().optional(), + signature: z.nullable(z.string()).optional(), + text: z.nullable(z.string()).optional(), + type: z.literal("reasoning.text"), }); export function reasoningDetailTextToJSON( diff --git a/src/models/reasoningdetailunion.ts b/src/models/reasoningdetailunion.ts index 08cb14ea..3a0b240a 100644 --- a/src/models/reasoningdetailunion.ts +++ b/src/models/reasoningdetailunion.ts @@ -5,6 +5,8 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -30,23 +32,24 @@ import { * Reasoning detail union schema */ export type ReasoningDetailUnion = - | ReasoningDetailSummary | ReasoningDetailEncrypted - | ReasoningDetailText; + | ReasoningDetailSummary + | ReasoningDetailText + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ export const ReasoningDetailUnion$inboundSchema: z.ZodType< ReasoningDetailUnion, unknown -> = z.union([ - ReasoningDetailSummary$inboundSchema, - ReasoningDetailEncrypted$inboundSchema, - ReasoningDetailText$inboundSchema, -]); +> = discriminatedUnion("type", { + ["reasoning.encrypted"]: ReasoningDetailEncrypted$inboundSchema, + ["reasoning.summary"]: ReasoningDetailSummary$inboundSchema, + ["reasoning.text"]: ReasoningDetailText$inboundSchema, +}); /** @internal */ export type ReasoningDetailUnion$Outbound = - | ReasoningDetailSummary$Outbound | ReasoningDetailEncrypted$Outbound + | ReasoningDetailSummary$Outbound | ReasoningDetailText$Outbound; /** @internal */ @@ -54,8 +57,8 @@ export const ReasoningDetailUnion$outboundSchema: z.ZodType< ReasoningDetailUnion$Outbound, ReasoningDetailUnion > = z.union([ - ReasoningDetailSummary$outboundSchema, ReasoningDetailEncrypted$outboundSchema, + ReasoningDetailSummary$outboundSchema, ReasoningDetailText$outboundSchema, ]); diff --git a/src/models/reasoningdoneevent.ts b/src/models/reasoningdoneevent.ts index 2f44cfa0..440711e1 100644 --- a/src/models/reasoningdoneevent.ts +++ b/src/models/reasoningdoneevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when reasoning text streaming is complete */ export type ReasoningDoneEvent = { - type: "response.reasoning_text.done"; - outputIndex: number; - itemId: string; contentIndex: number; - text: string; + itemId: string; + outputIndex: number; sequenceNumber: number; + text: string; + type: "response.reasoning_text.done"; }; /** @internal */ @@ -26,17 +26,17 @@ export const ReasoningDoneEvent$inboundSchema: z.ZodType< ReasoningDoneEvent, unknown > = z.object({ - type: z.literal("response.reasoning_text.done"), - output_index: z.number(), + content_index: z.int(), item_id: z.string(), - content_index: z.number(), + output_index: z.int(), + sequence_number: z.int(), text: z.string(), - sequence_number: z.number(), + type: z.literal("response.reasoning_text.done"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/reasoningeffort.ts b/src/models/reasoningeffort.ts new file mode 100644 index 00000000..2804617c --- /dev/null +++ b/src/models/reasoningeffort.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dd747014f9d3 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningEffort = { + Xhigh: "xhigh", + High: "high", + Medium: "medium", + Low: "low", + Minimal: "minimal", + None: "none", +} as const; +export type ReasoningEffort = OpenEnum; + +/** @internal */ +export const ReasoningEffort$inboundSchema: z.ZodType< + ReasoningEffort, + unknown +> = openEnums.inboundSchema(ReasoningEffort); +/** @internal */ +export const ReasoningEffort$outboundSchema: z.ZodType< + string, + ReasoningEffort +> = openEnums.outboundSchema(ReasoningEffort); diff --git a/src/models/reasoningeffortenum.ts b/src/models/reasoningeffortenum.ts deleted file mode 100644 index 931b6ef9..00000000 --- a/src/models/reasoningeffortenum.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 9559eb443bab - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ReasoningEffortEnum = { - Xhigh: "xhigh", - High: "high", - Medium: "medium", - Low: "low", - Minimal: "minimal", - None: "none", -} as const; -export type ReasoningEffortEnum = OpenEnum; - -/** @internal */ -export const ReasoningEffortEnum$inboundSchema: z.ZodType< - ReasoningEffortEnum, - unknown -> = openEnums.inboundSchema(ReasoningEffortEnum); -/** @internal */ -export const ReasoningEffortEnum$outboundSchema: z.ZodType< - string, - ReasoningEffortEnum -> = openEnums.outboundSchema(ReasoningEffortEnum); diff --git a/src/models/reasoningformat.ts b/src/models/reasoningformat.ts new file mode 100644 index 00000000..4e550e5c --- /dev/null +++ b/src/models/reasoningformat.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b523cf757168 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningFormat = { + Unknown: "unknown", + OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", + XaiResponsesV1: "xai-responses-v1", + AnthropicClaudeV1: "anthropic-claude-v1", + GoogleGeminiV1: "google-gemini-v1", +} as const; +export type ReasoningFormat = OpenEnum; + +/** @internal */ +export const ReasoningFormat$inboundSchema: z.ZodType< + ReasoningFormat, + unknown +> = openEnums.inboundSchema(ReasoningFormat); +/** @internal */ +export const ReasoningFormat$outboundSchema: z.ZodType< + string, + ReasoningFormat +> = openEnums.outboundSchema(ReasoningFormat); diff --git a/src/models/reasoningitem.ts b/src/models/reasoningitem.ts index 0c680d0f..02743fed 100644 --- a/src/models/reasoningitem.ts +++ b/src/models/reasoningitem.ts @@ -5,8 +5,11 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { ClosedEnum } from "../types/enums.js"; +import { + ReasoningFormat, + ReasoningFormat$outboundSchema, +} from "./reasoningformat.js"; import { ReasoningSummaryText, ReasoningSummaryText$Outbound, @@ -18,11 +21,6 @@ import { ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js"; -export const ReasoningItemType = { - Reasoning: "reasoning", -} as const; -export type ReasoningItemType = ClosedEnum; - export const ReasoningItemStatusInProgress = { InProgress: "in_progress", } as const; @@ -49,39 +47,29 @@ export type ReasoningItemStatusUnion = | ReasoningItemStatusIncomplete | ReasoningItemStatusInProgress; -export const ReasoningItemFormat = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", +export const ReasoningItemType = { + Reasoning: "reasoning", } as const; -export type ReasoningItemFormat = OpenEnum; +export type ReasoningItemType = ClosedEnum; /** * Reasoning output item with signature and format extensions */ export type ReasoningItem = { - type: ReasoningItemType; - id: string; content?: Array | null | undefined; - summary: Array; encryptedContent?: string | null | undefined; + id: string; status?: | ReasoningItemStatusCompleted | ReasoningItemStatusIncomplete | ReasoningItemStatusInProgress | undefined; + summary: Array; + type: ReasoningItemType; + format?: ReasoningFormat | null | undefined; signature?: string | null | undefined; - format?: ReasoningItemFormat | null | undefined; }; -/** @internal */ -export const ReasoningItemType$outboundSchema: z.ZodEnum< - typeof ReasoningItemType -> = z.enum(ReasoningItemType); - /** @internal */ export const ReasoningItemStatusInProgress$outboundSchema: z.ZodEnum< typeof ReasoningItemStatusInProgress @@ -119,21 +107,20 @@ export function reasoningItemStatusUnionToJSON( } /** @internal */ -export const ReasoningItemFormat$outboundSchema: z.ZodType< - string, - ReasoningItemFormat -> = openEnums.outboundSchema(ReasoningItemFormat); +export const ReasoningItemType$outboundSchema: z.ZodEnum< + typeof ReasoningItemType +> = z.enum(ReasoningItemType); /** @internal */ export type ReasoningItem$Outbound = { - type: string; - id: string; content?: Array | null | undefined; - summary: Array; encrypted_content?: string | null | undefined; + id: string; status?: string | string | string | undefined; - signature?: string | null | undefined; + summary: Array; + type: string; format?: string | null | undefined; + signature?: string | null | undefined; }; /** @internal */ @@ -141,18 +128,18 @@ export const ReasoningItem$outboundSchema: z.ZodType< ReasoningItem$Outbound, ReasoningItem > = z.object({ - type: ReasoningItemType$outboundSchema, - id: z.string(), content: z.nullable(z.array(ReasoningTextContent$outboundSchema)).optional(), - summary: z.array(ReasoningSummaryText$outboundSchema), encryptedContent: z.nullable(z.string()).optional(), + id: z.string(), status: z.union([ ReasoningItemStatusCompleted$outboundSchema, ReasoningItemStatusIncomplete$outboundSchema, ReasoningItemStatusInProgress$outboundSchema, ]).optional(), + summary: z.array(ReasoningSummaryText$outboundSchema), + type: ReasoningItemType$outboundSchema, + format: z.nullable(ReasoningFormat$outboundSchema).optional(), signature: z.nullable(z.string()).optional(), - format: z.nullable(ReasoningItemFormat$outboundSchema).optional(), }).transform((v) => { return remap$(v, { encryptedContent: "encrypted_content", diff --git a/src/models/reasoningsummarypartaddedevent.ts b/src/models/reasoningsummarypartaddedevent.ts index 1cda44b2..fac6ff09 100644 --- a/src/models/reasoningsummarypartaddedevent.ts +++ b/src/models/reasoningsummarypartaddedevent.ts @@ -17,12 +17,12 @@ import { * Event emitted when a reasoning summary part is added */ export type ReasoningSummaryPartAddedEvent = { - type: "response.reasoning_summary_part.added"; - outputIndex: number; itemId: string; - summaryIndex: number; + outputIndex: number; part: ReasoningSummaryText; sequenceNumber: number; + summaryIndex: number; + type: "response.reasoning_summary_part.added"; }; /** @internal */ @@ -30,18 +30,18 @@ export const ReasoningSummaryPartAddedEvent$inboundSchema: z.ZodType< ReasoningSummaryPartAddedEvent, unknown > = z.object({ - type: z.literal("response.reasoning_summary_part.added"), - output_index: z.number(), item_id: z.string(), - summary_index: z.number(), + output_index: z.int(), part: ReasoningSummaryText$inboundSchema, - sequence_number: z.number(), + sequence_number: z.int(), + summary_index: z.int(), + type: z.literal("response.reasoning_summary_part.added"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", "item_id": "itemId", - "summary_index": "summaryIndex", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", + "summary_index": "summaryIndex", }); }); diff --git a/src/models/reasoningsummarypartdoneevent.ts b/src/models/reasoningsummarypartdoneevent.ts index 851b09e9..0a5bd9af 100644 --- a/src/models/reasoningsummarypartdoneevent.ts +++ b/src/models/reasoningsummarypartdoneevent.ts @@ -17,12 +17,12 @@ import { * Event emitted when a reasoning summary part is complete */ export type ReasoningSummaryPartDoneEvent = { - type: "response.reasoning_summary_part.done"; - outputIndex: number; itemId: string; - summaryIndex: number; + outputIndex: number; part: ReasoningSummaryText; sequenceNumber: number; + summaryIndex: number; + type: "response.reasoning_summary_part.done"; }; /** @internal */ @@ -30,18 +30,18 @@ export const ReasoningSummaryPartDoneEvent$inboundSchema: z.ZodType< ReasoningSummaryPartDoneEvent, unknown > = z.object({ - type: z.literal("response.reasoning_summary_part.done"), - output_index: z.number(), item_id: z.string(), - summary_index: z.number(), + output_index: z.int(), part: ReasoningSummaryText$inboundSchema, - sequence_number: z.number(), + sequence_number: z.int(), + summary_index: z.int(), + type: z.literal("response.reasoning_summary_part.done"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", "item_id": "itemId", - "summary_index": "summaryIndex", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", + "summary_index": "summaryIndex", }); }); diff --git a/src/models/reasoningsummarytext.ts b/src/models/reasoningsummarytext.ts index b9720f51..c1d37da8 100644 --- a/src/models/reasoningsummarytext.ts +++ b/src/models/reasoningsummarytext.ts @@ -17,8 +17,8 @@ export type ReasoningSummaryTextType = ClosedEnum< >; export type ReasoningSummaryText = { - type: ReasoningSummaryTextType; text: string; + type: ReasoningSummaryTextType; }; /** @internal */ @@ -35,13 +35,13 @@ export const ReasoningSummaryText$inboundSchema: z.ZodType< ReasoningSummaryText, unknown > = z.object({ - type: ReasoningSummaryTextType$inboundSchema, text: z.string(), + type: ReasoningSummaryTextType$inboundSchema, }); /** @internal */ export type ReasoningSummaryText$Outbound = { - type: string; text: string; + type: string; }; /** @internal */ @@ -49,8 +49,8 @@ export const ReasoningSummaryText$outboundSchema: z.ZodType< ReasoningSummaryText$Outbound, ReasoningSummaryText > = z.object({ - type: ReasoningSummaryTextType$outboundSchema, text: z.string(), + type: ReasoningSummaryTextType$outboundSchema, }); export function reasoningSummaryTextToJSON( diff --git a/src/models/reasoningsummarytextdeltaevent.ts b/src/models/reasoningsummarytextdeltaevent.ts index b93846ca..eec19504 100644 --- a/src/models/reasoningsummarytextdeltaevent.ts +++ b/src/models/reasoningsummarytextdeltaevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when reasoning summary text delta is streamed */ export type ReasoningSummaryTextDeltaEvent = { - type: "response.reasoning_summary_text.delta"; + delta: string; itemId: string; outputIndex: number; - summaryIndex: number; - delta: string; sequenceNumber: number; + summaryIndex: number; + type: "response.reasoning_summary_text.delta"; }; /** @internal */ @@ -26,18 +26,18 @@ export const ReasoningSummaryTextDeltaEvent$inboundSchema: z.ZodType< ReasoningSummaryTextDeltaEvent, unknown > = z.object({ - type: z.literal("response.reasoning_summary_text.delta"), - item_id: z.string(), - output_index: z.number(), - summary_index: z.number(), delta: z.string(), - sequence_number: z.number(), + item_id: z.string(), + output_index: z.int(), + sequence_number: z.int(), + summary_index: z.int(), + type: z.literal("response.reasoning_summary_text.delta"), }).transform((v) => { return remap$(v, { "item_id": "itemId", "output_index": "outputIndex", - "summary_index": "summaryIndex", "sequence_number": "sequenceNumber", + "summary_index": "summaryIndex", }); }); diff --git a/src/models/reasoningsummarytextdoneevent.ts b/src/models/reasoningsummarytextdoneevent.ts index 61d4c4f1..052357a1 100644 --- a/src/models/reasoningsummarytextdoneevent.ts +++ b/src/models/reasoningsummarytextdoneevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when reasoning summary text streaming is complete */ export type ReasoningSummaryTextDoneEvent = { - type: "response.reasoning_summary_text.done"; itemId: string; outputIndex: number; + sequenceNumber: number; summaryIndex: number; text: string; - sequenceNumber: number; + type: "response.reasoning_summary_text.done"; }; /** @internal */ @@ -26,18 +26,18 @@ export const ReasoningSummaryTextDoneEvent$inboundSchema: z.ZodType< ReasoningSummaryTextDoneEvent, unknown > = z.object({ - type: z.literal("response.reasoning_summary_text.done"), item_id: z.string(), - output_index: z.number(), - summary_index: z.number(), + output_index: z.int(), + sequence_number: z.int(), + summary_index: z.int(), text: z.string(), - sequence_number: z.number(), + type: z.literal("response.reasoning_summary_text.done"), }).transform((v) => { return remap$(v, { "item_id": "itemId", "output_index": "outputIndex", - "summary_index": "summaryIndex", "sequence_number": "sequenceNumber", + "summary_index": "summaryIndex", }); }); diff --git a/src/models/reasoningsummaryverbosity.ts b/src/models/reasoningsummaryverbosity.ts new file mode 100644 index 00000000..58291795 --- /dev/null +++ b/src/models/reasoningsummaryverbosity.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a51c85f04729 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ReasoningSummaryVerbosity = { + Auto: "auto", + Concise: "concise", + Detailed: "detailed", +} as const; +export type ReasoningSummaryVerbosity = OpenEnum< + typeof ReasoningSummaryVerbosity +>; + +/** @internal */ +export const ReasoningSummaryVerbosity$inboundSchema: z.ZodType< + ReasoningSummaryVerbosity, + unknown +> = openEnums.inboundSchema(ReasoningSummaryVerbosity); +/** @internal */ +export const ReasoningSummaryVerbosity$outboundSchema: z.ZodType< + string, + ReasoningSummaryVerbosity +> = openEnums.outboundSchema(ReasoningSummaryVerbosity); diff --git a/src/models/reasoningsummaryverbosityenum.ts b/src/models/reasoningsummaryverbosityenum.ts deleted file mode 100644 index d24150d5..00000000 --- a/src/models/reasoningsummaryverbosityenum.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 2d2055f25ddc - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ReasoningSummaryVerbosityEnum = { - Auto: "auto", - Concise: "concise", - Detailed: "detailed", -} as const; -export type ReasoningSummaryVerbosityEnum = OpenEnum< - typeof ReasoningSummaryVerbosityEnum ->; - -/** @internal */ -export const ReasoningSummaryVerbosityEnum$inboundSchema: z.ZodType< - ReasoningSummaryVerbosityEnum, - unknown -> = openEnums.inboundSchema(ReasoningSummaryVerbosityEnum); -/** @internal */ -export const ReasoningSummaryVerbosityEnum$outboundSchema: z.ZodType< - string, - ReasoningSummaryVerbosityEnum -> = openEnums.outboundSchema(ReasoningSummaryVerbosityEnum); diff --git a/src/models/reasoningtextcontent.ts b/src/models/reasoningtextcontent.ts index 10912a90..fe015c15 100644 --- a/src/models/reasoningtextcontent.ts +++ b/src/models/reasoningtextcontent.ts @@ -17,8 +17,8 @@ export type ReasoningTextContentType = ClosedEnum< >; export type ReasoningTextContent = { - type: ReasoningTextContentType; text: string; + type: ReasoningTextContentType; }; /** @internal */ @@ -35,13 +35,13 @@ export const ReasoningTextContent$inboundSchema: z.ZodType< ReasoningTextContent, unknown > = z.object({ - type: ReasoningTextContentType$inboundSchema, text: z.string(), + type: ReasoningTextContentType$inboundSchema, }); /** @internal */ export type ReasoningTextContent$Outbound = { - type: string; text: string; + type: string; }; /** @internal */ @@ -49,8 +49,8 @@ export const ReasoningTextContent$outboundSchema: z.ZodType< ReasoningTextContent$Outbound, ReasoningTextContent > = z.object({ - type: ReasoningTextContentType$outboundSchema, text: z.string(), + type: ReasoningTextContentType$outboundSchema, }); export function reasoningTextContentToJSON( diff --git a/src/models/refusaldeltaevent.ts b/src/models/refusaldeltaevent.ts index 72b72f16..3f2392eb 100644 --- a/src/models/refusaldeltaevent.ts +++ b/src/models/refusaldeltaevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when a refusal delta is streamed */ export type RefusalDeltaEvent = { - type: "response.refusal.delta"; - outputIndex: number; - itemId: string; contentIndex: number; delta: string; + itemId: string; + outputIndex: number; sequenceNumber: number; + type: "response.refusal.delta"; }; /** @internal */ @@ -26,17 +26,17 @@ export const RefusalDeltaEvent$inboundSchema: z.ZodType< RefusalDeltaEvent, unknown > = z.object({ - type: z.literal("response.refusal.delta"), - output_index: z.number(), - item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + item_id: z.string(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.refusal.delta"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/refusaldoneevent.ts b/src/models/refusaldoneevent.ts index 16621be5..6a00e55b 100644 --- a/src/models/refusaldoneevent.ts +++ b/src/models/refusaldoneevent.ts @@ -13,12 +13,12 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Event emitted when refusal streaming is complete */ export type RefusalDoneEvent = { - type: "response.refusal.done"; - outputIndex: number; - itemId: string; contentIndex: number; + itemId: string; + outputIndex: number; refusal: string; sequenceNumber: number; + type: "response.refusal.done"; }; /** @internal */ @@ -26,17 +26,17 @@ export const RefusalDoneEvent$inboundSchema: z.ZodType< RefusalDoneEvent, unknown > = z.object({ - type: z.literal("response.refusal.done"), - output_index: z.number(), + content_index: z.int(), item_id: z.string(), - content_index: z.number(), + output_index: z.int(), refusal: z.string(), - sequence_number: z.number(), + sequence_number: z.int(), + type: z.literal("response.refusal.done"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/responsehealingplugin.ts b/src/models/responsehealingplugin.ts new file mode 100644 index 00000000..9e40ea7f --- /dev/null +++ b/src/models/responsehealingplugin.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 622c12ba88e2 + */ + +import * as z from "zod/v4"; + +export type ResponseHealingPlugin = { + /** + * Set to false to disable the response-healing plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + id: "response-healing"; +}; + +/** @internal */ +export type ResponseHealingPlugin$Outbound = { + enabled?: boolean | undefined; + id: "response-healing"; +}; + +/** @internal */ +export const ResponseHealingPlugin$outboundSchema: z.ZodType< + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin +> = z.object({ + enabled: z.boolean().optional(), + id: z.literal("response-healing"), +}); + +export function responseHealingPluginToJSON( + responseHealingPlugin: ResponseHealingPlugin, +): string { + return JSON.stringify( + ResponseHealingPlugin$outboundSchema.parse(responseHealingPlugin), + ); +} diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index d97cb115..9e0f7474 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -16,23 +16,23 @@ import { } from "./openairesponsesannotation.js"; export type ResponseOutputTextTopLogprob = { - token: string; bytes: Array; logprob: number; + token: string; }; -export type ResponseOutputTextLogprob = { - token: string; +export type Logprob = { bytes: Array; logprob: number; + token: string; topLogprobs: Array; }; export type ResponseOutputText = { - type: "output_text"; - text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; + text: string; + type: "output_text"; }; /** @internal */ @@ -40,15 +40,15 @@ export const ResponseOutputTextTopLogprob$inboundSchema: z.ZodType< ResponseOutputTextTopLogprob, unknown > = z.object({ - token: z.string(), - bytes: z.array(z.number()), + bytes: z.array(z.int()), logprob: z.number(), + token: z.string(), }); /** @internal */ export type ResponseOutputTextTopLogprob$Outbound = { - token: string; bytes: Array; logprob: number; + token: string; }; /** @internal */ @@ -56,9 +56,9 @@ export const ResponseOutputTextTopLogprob$outboundSchema: z.ZodType< ResponseOutputTextTopLogprob$Outbound, ResponseOutputTextTopLogprob > = z.object({ - token: z.string(), - bytes: z.array(z.number()), + bytes: z.array(z.int()), logprob: z.number(), + token: z.string(), }); export function responseOutputTextTopLogprobToJSON( @@ -81,13 +81,10 @@ export function responseOutputTextTopLogprobFromJSON( } /** @internal */ -export const ResponseOutputTextLogprob$inboundSchema: z.ZodType< - ResponseOutputTextLogprob, - unknown -> = z.object({ - token: z.string(), - bytes: z.array(z.number()), +export const Logprob$inboundSchema: z.ZodType = z.object({ + bytes: z.array(z.int()), logprob: z.number(), + token: z.string(), top_logprobs: z.array( z.lazy(() => ResponseOutputTextTopLogprob$inboundSchema), ), @@ -97,44 +94,38 @@ export const ResponseOutputTextLogprob$inboundSchema: z.ZodType< }); }); /** @internal */ -export type ResponseOutputTextLogprob$Outbound = { - token: string; +export type Logprob$Outbound = { bytes: Array; logprob: number; + token: string; top_logprobs: Array; }; /** @internal */ -export const ResponseOutputTextLogprob$outboundSchema: z.ZodType< - ResponseOutputTextLogprob$Outbound, - ResponseOutputTextLogprob -> = z.object({ - token: z.string(), - bytes: z.array(z.number()), - logprob: z.number(), - topLogprobs: z.array( - z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), - ), -}).transform((v) => { - return remap$(v, { - topLogprobs: "top_logprobs", +export const Logprob$outboundSchema: z.ZodType = z + .object({ + bytes: z.array(z.int()), + logprob: z.number(), + token: z.string(), + topLogprobs: z.array( + z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), + ), + }).transform((v) => { + return remap$(v, { + topLogprobs: "top_logprobs", + }); }); -}); -export function responseOutputTextLogprobToJSON( - responseOutputTextLogprob: ResponseOutputTextLogprob, -): string { - return JSON.stringify( - ResponseOutputTextLogprob$outboundSchema.parse(responseOutputTextLogprob), - ); +export function logprobToJSON(logprob: Logprob): string { + return JSON.stringify(Logprob$outboundSchema.parse(logprob)); } -export function responseOutputTextLogprobFromJSON( +export function logprobFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ResponseOutputTextLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ResponseOutputTextLogprob' from JSON`, + (x) => Logprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Logprob' from JSON`, ); } @@ -143,18 +134,17 @@ export const ResponseOutputText$inboundSchema: z.ZodType< ResponseOutputText, unknown > = z.object({ - type: z.literal("output_text"), - text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), - logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$inboundSchema)) - .optional(), + logprobs: z.array(z.lazy(() => Logprob$inboundSchema)).optional(), + text: z.string(), + type: z.literal("output_text"), }); /** @internal */ export type ResponseOutputText$Outbound = { - type: "output_text"; - text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; + text: string; + type: "output_text"; }; /** @internal */ @@ -162,11 +152,10 @@ export const ResponseOutputText$outboundSchema: z.ZodType< ResponseOutputText$Outbound, ResponseOutputText > = z.object({ - type: z.literal("output_text"), - text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), - logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$outboundSchema)) - .optional(), + logprobs: z.array(z.lazy(() => Logprob$outboundSchema)).optional(), + text: z.string(), + type: z.literal("output_text"), }); export function responseOutputTextToJSON( diff --git a/src/models/responsesrequest.ts b/src/models/responsesrequest.ts index 0b44340d..c1813040 100644 --- a/src/models/responsesrequest.ts +++ b/src/models/responsesrequest.ts @@ -12,6 +12,11 @@ import { ApplyPatchServerTool$Outbound, ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js"; +import { + AutoRouterPlugin, + AutoRouterPlugin$Outbound, + AutoRouterPlugin$outboundSchema, +} from "./autorouterplugin.js"; import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound, @@ -28,23 +33,25 @@ import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js"; import { - ContextCompressionEngine, - ContextCompressionEngine$outboundSchema, -} from "./contextcompressionengine.js"; + ContextCompressionPlugin, + ContextCompressionPlugin$Outbound, + ContextCompressionPlugin$outboundSchema, +} from "./contextcompressionplugin.js"; import { CustomTool, CustomTool$Outbound, CustomTool$outboundSchema, } from "./customtool.js"; -import { - DataCollection, - DataCollection$outboundSchema, -} from "./datacollection.js"; import { DatetimeServerTool, DatetimeServerTool$Outbound, DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js"; +import { + FileParserPlugin, + FileParserPlugin$Outbound, + FileParserPlugin$outboundSchema, +} from "./fileparserplugin.js"; import { FileSearchServerTool, FileSearchServerTool$Outbound, @@ -70,6 +77,11 @@ import { McpServerTool$Outbound, McpServerTool$outboundSchema, } from "./mcpservertool.js"; +import { + ModerationPlugin, + ModerationPlugin$Outbound, + ModerationPlugin$outboundSchema, +} from "./moderationplugin.js"; import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound, @@ -83,21 +95,6 @@ import { OutputModalityEnum, OutputModalityEnum$outboundSchema, } from "./outputmodalityenum.js"; -import { - PDFParserOptions, - PDFParserOptions$Outbound, - PDFParserOptions$outboundSchema, -} from "./pdfparseroptions.js"; -import { - PreferredMaxLatency, - PreferredMaxLatency$Outbound, - PreferredMaxLatency$outboundSchema, -} from "./preferredmaxlatency.js"; -import { - PreferredMinThroughput, - PreferredMinThroughput$Outbound, - PreferredMinThroughput$outboundSchema, -} from "./preferredminthroughput.js"; import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound, @@ -108,19 +105,21 @@ import { PreviewWebSearchServerTool$Outbound, PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js"; -import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; -import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; import { - ProviderSortConfig, - ProviderSortConfig$Outbound, - ProviderSortConfig$outboundSchema, -} from "./providersortconfig.js"; -import { Quantization, Quantization$outboundSchema } from "./quantization.js"; + ProviderPreferences, + ProviderPreferences$Outbound, + ProviderPreferences$outboundSchema, +} from "./providerpreferences.js"; import { ReasoningConfig, ReasoningConfig$Outbound, ReasoningConfig$outboundSchema, } from "./reasoningconfig.js"; +import { + ResponseHealingPlugin, + ResponseHealingPlugin$Outbound, + ResponseHealingPlugin$outboundSchema, +} from "./responsehealingplugin.js"; import { ResponseIncludesEnum, ResponseIncludesEnum$outboundSchema, @@ -141,9 +140,15 @@ import { TextExtendedConfig$outboundSchema, } from "./textextendedconfig.js"; import { - WebSearchEngine, - WebSearchEngine$outboundSchema, -} from "./websearchengine.js"; + TraceConfig, + TraceConfig$Outbound, + TraceConfig$outboundSchema, +} from "./traceconfig.js"; +import { + WebSearchPlugin, + WebSearchPlugin$Outbound, + WebSearchPlugin$outboundSchema, +} from "./websearchplugin.js"; import { WebSearchServerTool, WebSearchServerTool$Outbound, @@ -155,15 +160,36 @@ import { WebSearchServerToolOpenRouter$outboundSchema, } from "./websearchservertoolopenrouter.js"; +export type ResponsesRequestImageConfig = string | number; + +export type ResponsesRequestPlugin = + | AutoRouterPlugin + | ContextCompressionPlugin + | FileParserPlugin + | ModerationPlugin + | ResponseHealingPlugin + | WebSearchPlugin; + +export const ResponsesRequestServiceTier = { + Auto: "auto", + Default: "default", + Flex: "flex", + Priority: "priority", + Scale: "scale", +} as const; +export type ResponsesRequestServiceTier = OpenEnum< + typeof ResponsesRequestServiceTier +>; + /** * Function tool definition */ export type ResponsesRequestToolFunction = { - type: "function"; - name: string; description?: string | null | undefined; - strict?: boolean | null | undefined; + name: string; parameters: { [k: string]: any | null } | null; + strict?: boolean | null | undefined; + type: "function"; }; export type ResponsesRequestToolUnion = @@ -184,214 +210,74 @@ export type ResponsesRequestToolUnion = | (DatetimeServerTool & { type: "openrouter:datetime" }) | WebSearchServerToolOpenRouter; -export type ResponsesRequestImageConfig = string | number; - -export const ResponsesRequestServiceTier = { - Auto: "auto", - Default: "default", - Flex: "flex", - Priority: "priority", - Scale: "scale", -} as const; -export type ResponsesRequestServiceTier = OpenEnum< - typeof ResponsesRequestServiceTier ->; - -export type ResponsesRequestOrder = ProviderName | string; - -export type ResponsesRequestOnly = ProviderName | string; - -export type ResponsesRequestIgnore = ProviderName | string; - -/** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ -export type ResponsesRequestSort = ProviderSort | ProviderSortConfig | any; - /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ -export type ResponsesRequestMaxPrice = { - /** - * Price per million prompt tokens - */ - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** - * When multiple model providers are available, optionally indicate your routing preference. + * Request schema for Responses endpoint */ -export type ResponsesRequestProvider = { - /** - * Whether to allow backup providers to serve requests - * - * @remarks - * - 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. - */ - allowFallbacks?: boolean | null | undefined; - /** - * 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. - */ - requireParameters?: boolean | null | undefined; - /** - * Data collection setting. If no available model provider meets the requirement, your request will return an error. - * - * @remarks - * - 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. - */ - dataCollection?: DataCollection | null | undefined; - /** - * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. - */ - zdr?: boolean | null | undefined; - /** - * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. - */ - enforceDistillableText?: boolean | null | undefined; - /** - * 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. - */ - order?: Array | null | undefined; - /** - * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. - */ - only?: Array | null | undefined; - /** - * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. - */ - ignore?: Array | null | undefined; - /** - * A list of quantization levels to filter the provider by. - */ - quantizations?: Array | null | undefined; - /** - * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. - */ - sort?: ProviderSort | ProviderSortConfig | any | null | undefined; - /** - * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. - */ - maxPrice?: ResponsesRequestMaxPrice | undefined; - /** - * 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. - */ - preferredMinThroughput?: PreferredMinThroughput | null | undefined; - /** - * 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. - */ - preferredMaxLatency?: PreferredMaxLatency | null | undefined; -}; - -export type ResponsesRequestPluginContextCompression = { - id: "context-compression"; - /** - * Set to false to disable the context-compression plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; - /** - * The compression engine to use. Defaults to "middle-out". - */ - engine?: ContextCompressionEngine | undefined; -}; - -export type ResponsesRequestPluginResponseHealing = { - id: "response-healing"; - /** - * Set to false to disable the response-healing plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; -}; - -export type ResponsesRequestPluginFileParser = { - id: "file-parser"; - /** - * Set to false to disable the file-parser plugin for this request. Defaults to true. - */ - enabled?: boolean | undefined; +export type ResponsesRequest = { + background?: boolean | null | undefined; + frequencyPenalty?: number | undefined; /** - * Options for PDF parsing. + * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. */ - pdf?: PDFParserOptions | undefined; -}; - -export type ResponsesRequestPluginWeb = { - id: "web"; + imageConfig?: { [k: string]: string | number } | undefined; + include?: Array | null | undefined; /** - * Set to false to disable the web-search plugin for this request. Defaults to true. + * Input for a response request - can be a string or array of items */ - enabled?: boolean | undefined; - maxResults?: number | undefined; - searchPrompt?: string | undefined; + input?: InputsUnion | undefined; + instructions?: string | null | undefined; + maxOutputTokens?: number | undefined; + maxToolCalls?: number | undefined; /** - * The search engine to use for web search. + * 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. */ - engine?: WebSearchEngine | undefined; + metadata?: { [k: string]: string } | null | undefined; /** - * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + * Output modalities for the response. Supported values are "text" and "image". */ - includeDomains?: Array | undefined; + modalities?: Array | undefined; + model?: string | undefined; + models?: Array | undefined; + parallelToolCalls?: boolean | null | undefined; /** - * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + * Plugins you want to enable for this request, including their settings. */ - excludeDomains?: Array | undefined; -}; - -export type ResponsesRequestPluginModeration = { - id: "moderation"; -}; - -export type ResponsesRequestPluginAutoRouter = { - id: "auto-router"; + plugins?: + | Array< + | AutoRouterPlugin + | ContextCompressionPlugin + | FileParserPlugin + | ModerationPlugin + | ResponseHealingPlugin + | WebSearchPlugin + > + | undefined; + presencePenalty?: number | undefined; + previousResponseId?: string | null | undefined; + prompt?: StoredPromptTemplate | null | undefined; + promptCacheKey?: string | null | undefined; /** - * Set to false to disable the auto-router plugin for this request. Defaults to true. + * When multiple model providers are available, optionally indicate your routing preference. */ - enabled?: boolean | undefined; + provider?: ProviderPreferences | null | undefined; /** - * 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. + * Configuration for reasoning mode in the response */ - allowedModels?: Array | undefined; -}; - -export type ResponsesRequestPluginUnion = - | ResponsesRequestPluginAutoRouter - | ResponsesRequestPluginModeration - | ResponsesRequestPluginWeb - | ResponsesRequestPluginFileParser - | ResponsesRequestPluginResponseHealing - | ResponsesRequestPluginContextCompression; - -/** - * 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. - */ -export type ResponsesRequestTrace = { - traceId?: string | undefined; - traceName?: string | undefined; - spanName?: string | undefined; - generationName?: string | undefined; - parentSpanId?: string | undefined; - additionalProperties?: { [k: string]: any | null } | undefined; -}; - -/** - * Request schema for Responses endpoint - */ -export type ResponsesRequest = { + reasoning?: ReasoningConfig | null | undefined; + safetyIdentifier?: string | null | undefined; + serviceTier?: ResponsesRequestServiceTier | null | undefined; /** - * Input for a response request - can be a string or array of items + * 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. */ - input?: InputsUnion | undefined; - instructions?: string | null | undefined; + sessionId?: string | undefined; + store?: false | undefined; + stream?: boolean | undefined; + temperature?: number | undefined; /** - * 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. + * Text output configuration including format and verbosity */ - metadata?: { [k: string]: string } | null | undefined; + text?: TextExtendedConfig | undefined; + toolChoice?: OpenAIResponsesToolChoiceUnion | undefined; tools?: | Array< | ResponsesRequestToolFunction @@ -412,82 +298,82 @@ export type ResponsesRequest = { | WebSearchServerToolOpenRouter > | undefined; - toolChoice?: OpenAIResponsesToolChoiceUnion | undefined; - parallelToolCalls?: boolean | null | undefined; - model?: string | undefined; - models?: Array | undefined; - /** - * Text output configuration including format and verbosity - */ - text?: TextExtendedConfig | undefined; - /** - * Configuration for reasoning mode in the response - */ - reasoning?: ReasoningConfig | null | undefined; - maxOutputTokens?: number | null | undefined; - temperature?: number | null | undefined; - topP?: number | null | undefined; - topLogprobs?: number | null | undefined; - maxToolCalls?: number | null | undefined; - presencePenalty?: number | null | undefined; - frequencyPenalty?: number | null | undefined; topK?: number | undefined; + topLogprobs?: number | undefined; + topP?: number | undefined; /** - * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. - */ - imageConfig?: { [k: string]: string | number } | undefined; - /** - * Output modalities for the response. Supported values are "text" and "image". + * 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. */ - modalities?: Array | undefined; - promptCacheKey?: string | null | undefined; - previousResponseId?: string | null | undefined; - prompt?: StoredPromptTemplate | null | undefined; - include?: Array | null | undefined; - background?: boolean | null | undefined; - safetyIdentifier?: string | null | undefined; - store?: false | undefined; - serviceTier?: ResponsesRequestServiceTier | null | undefined; + trace?: TraceConfig | undefined; truncation?: OpenAIResponsesTruncation | null | undefined; - stream?: boolean | undefined; - /** - * When multiple model providers are available, optionally indicate your routing preference. - */ - provider?: ResponsesRequestProvider | null | undefined; - /** - * Plugins you want to enable for this request, including their settings. - */ - plugins?: - | Array< - | ResponsesRequestPluginAutoRouter - | ResponsesRequestPluginModeration - | ResponsesRequestPluginWeb - | ResponsesRequestPluginFileParser - | ResponsesRequestPluginResponseHealing - | ResponsesRequestPluginContextCompression - > - | undefined; /** * 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. */ user?: string | undefined; - /** - * 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. - */ - sessionId?: string | undefined; - /** - * 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?: ResponsesRequestTrace | undefined; }; +/** @internal */ +export type ResponsesRequestImageConfig$Outbound = string | number; + +/** @internal */ +export const ResponsesRequestImageConfig$outboundSchema: z.ZodType< + ResponsesRequestImageConfig$Outbound, + ResponsesRequestImageConfig +> = z.union([z.string(), z.number()]); + +export function responsesRequestImageConfigToJSON( + responsesRequestImageConfig: ResponsesRequestImageConfig, +): string { + return JSON.stringify( + ResponsesRequestImageConfig$outboundSchema.parse( + responsesRequestImageConfig, + ), + ); +} + +/** @internal */ +export type ResponsesRequestPlugin$Outbound = + | AutoRouterPlugin$Outbound + | ContextCompressionPlugin$Outbound + | FileParserPlugin$Outbound + | ModerationPlugin$Outbound + | ResponseHealingPlugin$Outbound + | WebSearchPlugin$Outbound; + +/** @internal */ +export const ResponsesRequestPlugin$outboundSchema: z.ZodType< + ResponsesRequestPlugin$Outbound, + ResponsesRequestPlugin +> = z.union([ + AutoRouterPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, +]); + +export function responsesRequestPluginToJSON( + responsesRequestPlugin: ResponsesRequestPlugin, +): string { + return JSON.stringify( + ResponsesRequestPlugin$outboundSchema.parse(responsesRequestPlugin), + ); +} + +/** @internal */ +export const ResponsesRequestServiceTier$outboundSchema: z.ZodType< + string, + ResponsesRequestServiceTier +> = openEnums.outboundSchema(ResponsesRequestServiceTier); + /** @internal */ export type ResponsesRequestToolFunction$Outbound = { - type: "function"; - name: string; description?: string | null | undefined; - strict?: boolean | null | undefined; + name: string; parameters: { [k: string]: any | null } | null; + strict?: boolean | null | undefined; + type: "function"; }; /** @internal */ @@ -495,11 +381,11 @@ export const ResponsesRequestToolFunction$outboundSchema: z.ZodType< ResponsesRequestToolFunction$Outbound, ResponsesRequestToolFunction > = z.object({ - type: z.literal("function"), - name: z.string(), description: z.nullable(z.string()).optional(), - strict: z.nullable(z.boolean()).optional(), + name: z.string(), parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), + strict: z.nullable(z.boolean()).optional(), + type: z.literal("function"), }); export function responsesRequestToolFunctionToJSON( @@ -564,456 +450,45 @@ export function responsesRequestToolUnionToJSON( ); } -/** @internal */ -export type ResponsesRequestImageConfig$Outbound = string | number; - -/** @internal */ -export const ResponsesRequestImageConfig$outboundSchema: z.ZodType< - ResponsesRequestImageConfig$Outbound, - ResponsesRequestImageConfig -> = z.union([z.string(), z.number()]); - -export function responsesRequestImageConfigToJSON( - responsesRequestImageConfig: ResponsesRequestImageConfig, -): string { - return JSON.stringify( - ResponsesRequestImageConfig$outboundSchema.parse( - responsesRequestImageConfig, - ), - ); -} - -/** @internal */ -export const ResponsesRequestServiceTier$outboundSchema: z.ZodType< - string, - ResponsesRequestServiceTier -> = openEnums.outboundSchema(ResponsesRequestServiceTier); - -/** @internal */ -export type ResponsesRequestOrder$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestOrder$outboundSchema: z.ZodType< - ResponsesRequestOrder$Outbound, - ResponsesRequestOrder -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestOrderToJSON( - responsesRequestOrder: ResponsesRequestOrder, -): string { - return JSON.stringify( - ResponsesRequestOrder$outboundSchema.parse(responsesRequestOrder), - ); -} - -/** @internal */ -export type ResponsesRequestOnly$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestOnly$outboundSchema: z.ZodType< - ResponsesRequestOnly$Outbound, - ResponsesRequestOnly -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestOnlyToJSON( - responsesRequestOnly: ResponsesRequestOnly, -): string { - return JSON.stringify( - ResponsesRequestOnly$outboundSchema.parse(responsesRequestOnly), - ); -} - -/** @internal */ -export type ResponsesRequestIgnore$Outbound = string | string; - -/** @internal */ -export const ResponsesRequestIgnore$outboundSchema: z.ZodType< - ResponsesRequestIgnore$Outbound, - ResponsesRequestIgnore -> = z.union([ProviderName$outboundSchema, z.string()]); - -export function responsesRequestIgnoreToJSON( - responsesRequestIgnore: ResponsesRequestIgnore, -): string { - return JSON.stringify( - ResponsesRequestIgnore$outboundSchema.parse(responsesRequestIgnore), - ); -} - -/** @internal */ -export type ResponsesRequestSort$Outbound = - | string - | ProviderSortConfig$Outbound - | any; - -/** @internal */ -export const ResponsesRequestSort$outboundSchema: z.ZodType< - ResponsesRequestSort$Outbound, - ResponsesRequestSort -> = z.union([ - ProviderSort$outboundSchema, - ProviderSortConfig$outboundSchema, - z.any(), -]); - -export function responsesRequestSortToJSON( - responsesRequestSort: ResponsesRequestSort, -): string { - return JSON.stringify( - ResponsesRequestSort$outboundSchema.parse(responsesRequestSort), - ); -} - -/** @internal */ -export type ResponsesRequestMaxPrice$Outbound = { - prompt?: string | undefined; - completion?: string | undefined; - image?: string | undefined; - audio?: string | undefined; - request?: string | undefined; -}; - -/** @internal */ -export const ResponsesRequestMaxPrice$outboundSchema: z.ZodType< - ResponsesRequestMaxPrice$Outbound, - ResponsesRequestMaxPrice -> = z.object({ - prompt: z.string().optional(), - completion: z.string().optional(), - image: z.string().optional(), - audio: z.string().optional(), - request: z.string().optional(), -}); - -export function responsesRequestMaxPriceToJSON( - responsesRequestMaxPrice: ResponsesRequestMaxPrice, -): string { - return JSON.stringify( - ResponsesRequestMaxPrice$outboundSchema.parse(responsesRequestMaxPrice), - ); -} - -/** @internal */ -export type ResponsesRequestProvider$Outbound = { - allow_fallbacks?: boolean | null | undefined; - require_parameters?: boolean | null | undefined; - data_collection?: string | null | undefined; - zdr?: boolean | null | undefined; - enforce_distillable_text?: boolean | null | undefined; - order?: Array | null | undefined; - only?: Array | null | undefined; - ignore?: Array | null | undefined; - quantizations?: Array | null | undefined; - sort?: string | ProviderSortConfig$Outbound | any | null | undefined; - max_price?: ResponsesRequestMaxPrice$Outbound | undefined; - preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; - preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; -}; - -/** @internal */ -export const ResponsesRequestProvider$outboundSchema: z.ZodType< - ResponsesRequestProvider$Outbound, - ResponsesRequestProvider -> = z.object({ - allowFallbacks: z.nullable(z.boolean()).optional(), - requireParameters: z.nullable(z.boolean()).optional(), - dataCollection: z.nullable(DataCollection$outboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - enforceDistillableText: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))) - .optional(), - ignore: z.nullable( - z.array(z.union([ProviderName$outboundSchema, z.string()])), - ).optional(), - quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(), - sort: z.nullable( - z.union([ - ProviderSort$outboundSchema, - ProviderSortConfig$outboundSchema, - z.any(), - ]), - ).optional(), - maxPrice: z.lazy(() => ResponsesRequestMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) - .optional(), - preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - allowFallbacks: "allow_fallbacks", - requireParameters: "require_parameters", - dataCollection: "data_collection", - enforceDistillableText: "enforce_distillable_text", - maxPrice: "max_price", - preferredMinThroughput: "preferred_min_throughput", - preferredMaxLatency: "preferred_max_latency", - }); -}); - -export function responsesRequestProviderToJSON( - responsesRequestProvider: ResponsesRequestProvider, -): string { - return JSON.stringify( - ResponsesRequestProvider$outboundSchema.parse(responsesRequestProvider), - ); -} - -/** @internal */ -export type ResponsesRequestPluginContextCompression$Outbound = { - id: "context-compression"; - enabled?: boolean | undefined; - engine?: string | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginContextCompression$outboundSchema: z.ZodType< - ResponsesRequestPluginContextCompression$Outbound, - ResponsesRequestPluginContextCompression -> = z.object({ - id: z.literal("context-compression"), - enabled: z.boolean().optional(), - engine: ContextCompressionEngine$outboundSchema.optional(), -}); - -export function responsesRequestPluginContextCompressionToJSON( - responsesRequestPluginContextCompression: - ResponsesRequestPluginContextCompression, -): string { - return JSON.stringify( - ResponsesRequestPluginContextCompression$outboundSchema.parse( - responsesRequestPluginContextCompression, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginResponseHealing$Outbound = { - id: "response-healing"; - enabled?: boolean | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginResponseHealing$outboundSchema: z.ZodType< - ResponsesRequestPluginResponseHealing$Outbound, - ResponsesRequestPluginResponseHealing -> = z.object({ - id: z.literal("response-healing"), - enabled: z.boolean().optional(), -}); - -export function responsesRequestPluginResponseHealingToJSON( - responsesRequestPluginResponseHealing: ResponsesRequestPluginResponseHealing, -): string { - return JSON.stringify( - ResponsesRequestPluginResponseHealing$outboundSchema.parse( - responsesRequestPluginResponseHealing, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginFileParser$Outbound = { - id: "file-parser"; - enabled?: boolean | undefined; - pdf?: PDFParserOptions$Outbound | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginFileParser$outboundSchema: z.ZodType< - ResponsesRequestPluginFileParser$Outbound, - ResponsesRequestPluginFileParser -> = z.object({ - id: z.literal("file-parser"), - enabled: z.boolean().optional(), - pdf: PDFParserOptions$outboundSchema.optional(), -}); - -export function responsesRequestPluginFileParserToJSON( - responsesRequestPluginFileParser: ResponsesRequestPluginFileParser, -): string { - return JSON.stringify( - ResponsesRequestPluginFileParser$outboundSchema.parse( - responsesRequestPluginFileParser, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginWeb$Outbound = { - id: "web"; - enabled?: boolean | undefined; - max_results?: number | undefined; - search_prompt?: string | undefined; - engine?: string | undefined; - include_domains?: Array | undefined; - exclude_domains?: Array | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginWeb$outboundSchema: z.ZodType< - ResponsesRequestPluginWeb$Outbound, - ResponsesRequestPluginWeb -> = z.object({ - id: z.literal("web"), - enabled: z.boolean().optional(), - maxResults: z.number().optional(), - searchPrompt: z.string().optional(), - engine: WebSearchEngine$outboundSchema.optional(), - includeDomains: z.array(z.string()).optional(), - excludeDomains: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - maxResults: "max_results", - searchPrompt: "search_prompt", - includeDomains: "include_domains", - excludeDomains: "exclude_domains", - }); -}); - -export function responsesRequestPluginWebToJSON( - responsesRequestPluginWeb: ResponsesRequestPluginWeb, -): string { - return JSON.stringify( - ResponsesRequestPluginWeb$outboundSchema.parse(responsesRequestPluginWeb), - ); -} - -/** @internal */ -export type ResponsesRequestPluginModeration$Outbound = { - id: "moderation"; -}; - -/** @internal */ -export const ResponsesRequestPluginModeration$outboundSchema: z.ZodType< - ResponsesRequestPluginModeration$Outbound, - ResponsesRequestPluginModeration -> = z.object({ - id: z.literal("moderation"), -}); - -export function responsesRequestPluginModerationToJSON( - responsesRequestPluginModeration: ResponsesRequestPluginModeration, -): string { - return JSON.stringify( - ResponsesRequestPluginModeration$outboundSchema.parse( - responsesRequestPluginModeration, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginAutoRouter$Outbound = { - id: "auto-router"; - enabled?: boolean | undefined; - allowed_models?: Array | undefined; -}; - -/** @internal */ -export const ResponsesRequestPluginAutoRouter$outboundSchema: z.ZodType< - ResponsesRequestPluginAutoRouter$Outbound, - ResponsesRequestPluginAutoRouter -> = z.object({ - id: z.literal("auto-router"), - enabled: z.boolean().optional(), - allowedModels: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - allowedModels: "allowed_models", - }); -}); - -export function responsesRequestPluginAutoRouterToJSON( - responsesRequestPluginAutoRouter: ResponsesRequestPluginAutoRouter, -): string { - return JSON.stringify( - ResponsesRequestPluginAutoRouter$outboundSchema.parse( - responsesRequestPluginAutoRouter, - ), - ); -} - -/** @internal */ -export type ResponsesRequestPluginUnion$Outbound = - | ResponsesRequestPluginAutoRouter$Outbound - | ResponsesRequestPluginModeration$Outbound - | ResponsesRequestPluginWeb$Outbound - | ResponsesRequestPluginFileParser$Outbound - | ResponsesRequestPluginResponseHealing$Outbound - | ResponsesRequestPluginContextCompression$Outbound; - -/** @internal */ -export const ResponsesRequestPluginUnion$outboundSchema: z.ZodType< - ResponsesRequestPluginUnion$Outbound, - ResponsesRequestPluginUnion -> = z.union([ - z.lazy(() => ResponsesRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ResponsesRequestPluginModeration$outboundSchema), - z.lazy(() => ResponsesRequestPluginWeb$outboundSchema), - z.lazy(() => ResponsesRequestPluginFileParser$outboundSchema), - z.lazy(() => ResponsesRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ResponsesRequestPluginContextCompression$outboundSchema), -]); - -export function responsesRequestPluginUnionToJSON( - responsesRequestPluginUnion: ResponsesRequestPluginUnion, -): string { - return JSON.stringify( - ResponsesRequestPluginUnion$outboundSchema.parse( - responsesRequestPluginUnion, - ), - ); -} - -/** @internal */ -export type ResponsesRequestTrace$Outbound = { - trace_id?: string | undefined; - trace_name?: string | undefined; - span_name?: string | undefined; - generation_name?: string | undefined; - parent_span_id?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const ResponsesRequestTrace$outboundSchema: z.ZodType< - ResponsesRequestTrace$Outbound, - ResponsesRequestTrace -> = z.object({ - traceId: z.string().optional(), - traceName: z.string().optional(), - spanName: z.string().optional(), - generationName: z.string().optional(), - parentSpanId: z.string().optional(), - additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), -}).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - traceId: "trace_id", - traceName: "trace_name", - spanName: "span_name", - generationName: "generation_name", - parentSpanId: "parent_span_id", - additionalProperties: null, - }), - }; -}); - -export function responsesRequestTraceToJSON( - responsesRequestTrace: ResponsesRequestTrace, -): string { - return JSON.stringify( - ResponsesRequestTrace$outboundSchema.parse(responsesRequestTrace), - ); -} - /** @internal */ export type ResponsesRequest$Outbound = { + background?: boolean | null | undefined; + frequency_penalty?: number | undefined; + image_config?: { [k: string]: string | number } | undefined; + include?: Array | null | undefined; input?: InputsUnion$Outbound | undefined; instructions?: string | null | undefined; + max_output_tokens?: number | undefined; + max_tool_calls?: number | undefined; metadata?: { [k: string]: string } | null | undefined; + modalities?: Array | undefined; + model?: string | undefined; + models?: Array | undefined; + parallel_tool_calls?: boolean | null | undefined; + plugins?: + | Array< + | AutoRouterPlugin$Outbound + | ContextCompressionPlugin$Outbound + | FileParserPlugin$Outbound + | ModerationPlugin$Outbound + | ResponseHealingPlugin$Outbound + | WebSearchPlugin$Outbound + > + | undefined; + presence_penalty?: number | undefined; + previous_response_id?: string | null | undefined; + prompt?: StoredPromptTemplate$Outbound | null | undefined; + prompt_cache_key?: string | null | undefined; + provider?: ProviderPreferences$Outbound | null | undefined; + reasoning?: ReasoningConfig$Outbound | null | undefined; + safety_identifier?: string | null | undefined; + service_tier: string | null; + session_id?: string | undefined; + store: false; + stream: boolean; + temperature?: number | undefined; + text?: TextExtendedConfig$Outbound | undefined; + tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined; tools?: | Array< | ResponsesRequestToolFunction$Outbound @@ -1034,46 +509,12 @@ export type ResponsesRequest$Outbound = { | WebSearchServerToolOpenRouter$Outbound > | undefined; - tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined; - parallel_tool_calls?: boolean | null | undefined; - model?: string | undefined; - models?: Array | undefined; - text?: TextExtendedConfig$Outbound | undefined; - reasoning?: ReasoningConfig$Outbound | null | undefined; - max_output_tokens?: number | null | undefined; - temperature?: number | null | undefined; - top_p?: number | null | undefined; - top_logprobs?: number | null | undefined; - max_tool_calls?: number | null | undefined; - presence_penalty?: number | null | undefined; - frequency_penalty?: number | null | undefined; top_k?: number | undefined; - image_config?: { [k: string]: string | number } | undefined; - modalities?: Array | undefined; - prompt_cache_key?: string | null | undefined; - previous_response_id?: string | null | undefined; - prompt?: StoredPromptTemplate$Outbound | null | undefined; - include?: Array | null | undefined; - background?: boolean | null | undefined; - safety_identifier?: string | null | undefined; - store: false; - service_tier: string | null; + top_logprobs?: number | undefined; + top_p?: number | undefined; + trace?: TraceConfig$Outbound | undefined; truncation?: string | null | undefined; - stream: boolean; - provider?: ResponsesRequestProvider$Outbound | null | undefined; - plugins?: - | Array< - | ResponsesRequestPluginAutoRouter$Outbound - | ResponsesRequestPluginModeration$Outbound - | ResponsesRequestPluginWeb$Outbound - | ResponsesRequestPluginFileParser$Outbound - | ResponsesRequestPluginResponseHealing$Outbound - | ResponsesRequestPluginContextCompression$Outbound - > - | undefined; user?: string | undefined; - session_id?: string | undefined; - trace?: ResponsesRequestTrace$Outbound | undefined; }; /** @internal */ @@ -1081,9 +522,46 @@ export const ResponsesRequest$outboundSchema: z.ZodType< ResponsesRequest$Outbound, ResponsesRequest > = z.object({ + background: z.nullable(z.boolean()).optional(), + frequencyPenalty: z.number().optional(), + imageConfig: z.record(z.string(), z.union([z.string(), z.number()])) + .optional(), + include: z.nullable(z.array(ResponseIncludesEnum$outboundSchema)).optional(), input: InputsUnion$outboundSchema.optional(), instructions: z.nullable(z.string()).optional(), + maxOutputTokens: z.int().optional(), + maxToolCalls: z.int().optional(), metadata: z.nullable(z.record(z.string(), z.string())).optional(), + modalities: z.array(OutputModalityEnum$outboundSchema).optional(), + model: z.string().optional(), + models: z.array(z.string()).optional(), + parallelToolCalls: z.nullable(z.boolean()).optional(), + plugins: z.array( + z.union([ + AutoRouterPlugin$outboundSchema, + ContextCompressionPlugin$outboundSchema, + FileParserPlugin$outboundSchema, + ModerationPlugin$outboundSchema, + ResponseHealingPlugin$outboundSchema, + WebSearchPlugin$outboundSchema, + ]), + ).optional(), + presencePenalty: z.number().optional(), + previousResponseId: z.nullable(z.string()).optional(), + prompt: z.nullable(StoredPromptTemplate$outboundSchema).optional(), + promptCacheKey: z.nullable(z.string()).optional(), + provider: z.nullable(ProviderPreferences$outboundSchema).optional(), + reasoning: z.nullable(ReasoningConfig$outboundSchema).optional(), + safetyIdentifier: z.nullable(z.string()).optional(), + serviceTier: z.nullable( + ResponsesRequestServiceTier$outboundSchema.default("auto"), + ), + sessionId: z.string().optional(), + store: z.literal(false).default(false as const), + stream: z.boolean().default(false), + temperature: z.number().optional(), + text: TextExtendedConfig$outboundSchema.optional(), + toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema.optional(), tools: z.array( z.union([ z.lazy(() => ResponsesRequestToolFunction$outboundSchema), @@ -1106,67 +584,29 @@ export const ResponsesRequest$outboundSchema: z.ZodType< WebSearchServerToolOpenRouter$outboundSchema, ]), ).optional(), - toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema.optional(), - parallelToolCalls: z.nullable(z.boolean()).optional(), - model: z.string().optional(), - models: z.array(z.string()).optional(), - text: TextExtendedConfig$outboundSchema.optional(), - reasoning: z.nullable(ReasoningConfig$outboundSchema).optional(), - maxOutputTokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()).optional(), - topP: z.nullable(z.number()).optional(), - topLogprobs: z.nullable(z.int()).optional(), - maxToolCalls: z.nullable(z.int()).optional(), - presencePenalty: z.nullable(z.number()).optional(), - frequencyPenalty: z.nullable(z.number()).optional(), - topK: z.number().optional(), - imageConfig: z.record(z.string(), z.union([z.string(), z.number()])) - .optional(), - modalities: z.array(OutputModalityEnum$outboundSchema).optional(), - promptCacheKey: z.nullable(z.string()).optional(), - previousResponseId: z.nullable(z.string()).optional(), - prompt: z.nullable(StoredPromptTemplate$outboundSchema).optional(), - include: z.nullable(z.array(ResponseIncludesEnum$outboundSchema)).optional(), - background: z.nullable(z.boolean()).optional(), - safetyIdentifier: z.nullable(z.string()).optional(), - store: z.literal(false).default(false as const), - serviceTier: z.nullable( - ResponsesRequestServiceTier$outboundSchema.default("auto"), - ), + topK: z.int().optional(), + topLogprobs: z.int().optional(), + topP: z.number().optional(), + trace: TraceConfig$outboundSchema.optional(), truncation: z.nullable(OpenAIResponsesTruncation$outboundSchema).optional(), - stream: z.boolean().default(false), - provider: z.nullable(z.lazy(() => ResponsesRequestProvider$outboundSchema)) - .optional(), - plugins: z.array( - z.union([ - z.lazy(() => ResponsesRequestPluginAutoRouter$outboundSchema), - z.lazy(() => ResponsesRequestPluginModeration$outboundSchema), - z.lazy(() => ResponsesRequestPluginWeb$outboundSchema), - z.lazy(() => ResponsesRequestPluginFileParser$outboundSchema), - z.lazy(() => ResponsesRequestPluginResponseHealing$outboundSchema), - z.lazy(() => ResponsesRequestPluginContextCompression$outboundSchema), - ]), - ).optional(), user: z.string().optional(), - sessionId: z.string().optional(), - trace: z.lazy(() => ResponsesRequestTrace$outboundSchema).optional(), }).transform((v) => { return remap$(v, { - toolChoice: "tool_choice", - parallelToolCalls: "parallel_tool_calls", + frequencyPenalty: "frequency_penalty", + imageConfig: "image_config", maxOutputTokens: "max_output_tokens", - topP: "top_p", - topLogprobs: "top_logprobs", maxToolCalls: "max_tool_calls", + parallelToolCalls: "parallel_tool_calls", presencePenalty: "presence_penalty", - frequencyPenalty: "frequency_penalty", - topK: "top_k", - imageConfig: "image_config", - promptCacheKey: "prompt_cache_key", previousResponseId: "previous_response_id", + promptCacheKey: "prompt_cache_key", safetyIdentifier: "safety_identifier", serviceTier: "service_tier", sessionId: "session_id", + toolChoice: "tool_choice", + topK: "top_k", + topLogprobs: "top_logprobs", + topP: "top_p", }); }); diff --git a/src/models/searchqualitylevel.ts b/src/models/searchqualitylevel.ts new file mode 100644 index 00000000..4a8a3b53 --- /dev/null +++ b/src/models/searchqualitylevel.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3f28e436c1e6 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export const SearchQualityLevel = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export type SearchQualityLevel = OpenEnum; + +/** @internal */ +export const SearchQualityLevel$outboundSchema: z.ZodType< + string, + SearchQualityLevel +> = openEnums.outboundSchema(SearchQualityLevel); diff --git a/src/models/streamevents.ts b/src/models/streamevents.ts index a6ae1445..424aed0c 100644 --- a/src/models/streamevents.ts +++ b/src/models/streamevents.ts @@ -4,8 +4,9 @@ */ import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as discriminatedUnionTypes from "../types/discriminatedUnion.js"; +import { discriminatedUnion } from "../types/discriminatedUnion.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { AnnotationAddedEvent, @@ -46,10 +47,13 @@ import { ImageGenCallPartialImageEvent$inboundSchema, } from "./imagegencallpartialimageevent.js"; import { - OpenResponsesResult, - OpenResponsesResult$inboundSchema, -} from "./openresponsesresult.js"; -import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + OpenResponsesCreatedEvent, + OpenResponsesCreatedEvent$inboundSchema, +} from "./openresponsescreatedevent.js"; +import { + OpenResponsesInProgressEvent, + OpenResponsesInProgressEvent$inboundSchema, +} from "./openresponsesinprogressevent.js"; import { ReasoningDeltaEvent, ReasoningDeltaEvent$inboundSchema, @@ -82,6 +86,26 @@ import { RefusalDoneEvent, RefusalDoneEvent$inboundSchema, } from "./refusaldoneevent.js"; +import { + StreamEventsResponseCompleted, + StreamEventsResponseCompleted$inboundSchema, +} from "./streameventsresponsecompleted.js"; +import { + StreamEventsResponseFailed, + StreamEventsResponseFailed$inboundSchema, +} from "./streameventsresponsefailed.js"; +import { + StreamEventsResponseIncomplete, + StreamEventsResponseIncomplete$inboundSchema, +} from "./streameventsresponseincomplete.js"; +import { + StreamEventsResponseOutputItemAdded, + StreamEventsResponseOutputItemAdded$inboundSchema, +} from "./streameventsresponseoutputitemadded.js"; +import { + StreamEventsResponseOutputItemDone, + StreamEventsResponseOutputItemDone$inboundSchema, +} from "./streameventsresponseoutputitemdone.js"; import { TextDeltaEvent, TextDeltaEvent$inboundSchema, @@ -100,335 +124,92 @@ import { WebSearchCallSearchingEvent$inboundSchema, } from "./websearchcallsearchingevent.js"; -/** - * Event emitted when an output item is complete - */ -export type StreamEventsResponseOutputItemDone = { - type: "response.output_item.done"; - outputIndex: number; - /** - * An output item from the response - */ - item: OutputItems; - sequenceNumber: number; -}; - -/** - * Event emitted when a new output item is added to the response - */ -export type StreamEventsResponseOutputItemAdded = { - type: "response.output_item.added"; - outputIndex: number; - /** - * An output item from the response - */ - item: OutputItems; - sequenceNumber: number; -}; - -/** - * Event emitted when a response has failed - */ -export type StreamEventsResponseFailed = { - type: "response.failed"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is incomplete - */ -export type StreamEventsResponseIncomplete = { - type: "response.incomplete"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response has completed successfully - */ -export type StreamEventsResponseCompleted = { - type: "response.completed"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is in progress - */ -export type StreamEventsResponseInProgress = { - type: "response.in_progress"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - -/** - * Event emitted when a response is created - */ -export type StreamEventsResponseCreated = { - type: "response.created"; - /** - * Complete non-streaming response from the Responses API - */ - response: OpenResponsesResult; - sequenceNumber: number; -}; - /** * Union of all possible event types emitted during response streaming */ export type StreamEvents = - | StreamEventsResponseCreated - | StreamEventsResponseInProgress + | ErrorEvent | StreamEventsResponseCompleted - | StreamEventsResponseIncomplete + | ContentPartAddedEvent + | ContentPartDoneEvent + | OpenResponsesCreatedEvent | StreamEventsResponseFailed - | ErrorEvent + | FunctionCallArgsDeltaEvent + | FunctionCallArgsDoneEvent + | ImageGenCallCompletedEvent + | ImageGenCallGeneratingEvent + | ImageGenCallInProgressEvent + | ImageGenCallPartialImageEvent + | OpenResponsesInProgressEvent + | StreamEventsResponseIncomplete | StreamEventsResponseOutputItemAdded | StreamEventsResponseOutputItemDone - | ContentPartAddedEvent - | ContentPartDoneEvent + | AnnotationAddedEvent | TextDeltaEvent | TextDoneEvent - | RefusalDeltaEvent - | RefusalDoneEvent - | AnnotationAddedEvent - | FunctionCallArgsDeltaEvent - | FunctionCallArgsDoneEvent - | ReasoningDeltaEvent - | ReasoningDoneEvent | ReasoningSummaryPartAddedEvent | ReasoningSummaryPartDoneEvent | ReasoningSummaryTextDeltaEvent | ReasoningSummaryTextDoneEvent - | ImageGenCallInProgressEvent - | ImageGenCallGeneratingEvent - | ImageGenCallPartialImageEvent - | ImageGenCallCompletedEvent + | ReasoningDeltaEvent + | ReasoningDoneEvent + | RefusalDeltaEvent + | RefusalDoneEvent + | WebSearchCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent - | WebSearchCallCompletedEvent; + | discriminatedUnionTypes.Unknown<"type">; /** @internal */ -export const StreamEventsResponseOutputItemDone$inboundSchema: z.ZodType< - StreamEventsResponseOutputItemDone, - unknown -> = z.object({ - type: z.literal("response.output_item.done"), - output_index: z.number(), - item: OutputItems$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "output_index": "outputIndex", - "sequence_number": "sequenceNumber", +export const StreamEvents$inboundSchema: z.ZodType = + discriminatedUnion("type", { + error: ErrorEvent$inboundSchema, + ["response.completed"]: StreamEventsResponseCompleted$inboundSchema, + ["response.content_part.added"]: ContentPartAddedEvent$inboundSchema, + ["response.content_part.done"]: ContentPartDoneEvent$inboundSchema, + ["response.created"]: OpenResponsesCreatedEvent$inboundSchema, + ["response.failed"]: StreamEventsResponseFailed$inboundSchema, + ["response.function_call_arguments.delta"]: + FunctionCallArgsDeltaEvent$inboundSchema, + ["response.function_call_arguments.done"]: + FunctionCallArgsDoneEvent$inboundSchema, + ["response.image_generation_call.completed"]: + ImageGenCallCompletedEvent$inboundSchema, + ["response.image_generation_call.generating"]: + ImageGenCallGeneratingEvent$inboundSchema, + ["response.image_generation_call.in_progress"]: + ImageGenCallInProgressEvent$inboundSchema, + ["response.image_generation_call.partial_image"]: + ImageGenCallPartialImageEvent$inboundSchema, + ["response.in_progress"]: OpenResponsesInProgressEvent$inboundSchema, + ["response.incomplete"]: StreamEventsResponseIncomplete$inboundSchema, + ["response.output_item.added"]: + StreamEventsResponseOutputItemAdded$inboundSchema, + ["response.output_item.done"]: + StreamEventsResponseOutputItemDone$inboundSchema, + ["response.output_text.annotation.added"]: + AnnotationAddedEvent$inboundSchema, + ["response.output_text.delta"]: TextDeltaEvent$inboundSchema, + ["response.output_text.done"]: TextDoneEvent$inboundSchema, + ["response.reasoning_summary_part.added"]: + ReasoningSummaryPartAddedEvent$inboundSchema, + ["response.reasoning_summary_part.done"]: + ReasoningSummaryPartDoneEvent$inboundSchema, + ["response.reasoning_summary_text.delta"]: + ReasoningSummaryTextDeltaEvent$inboundSchema, + ["response.reasoning_summary_text.done"]: + ReasoningSummaryTextDoneEvent$inboundSchema, + ["response.reasoning_text.delta"]: ReasoningDeltaEvent$inboundSchema, + ["response.reasoning_text.done"]: ReasoningDoneEvent$inboundSchema, + ["response.refusal.delta"]: RefusalDeltaEvent$inboundSchema, + ["response.refusal.done"]: RefusalDoneEvent$inboundSchema, + ["response.web_search_call.completed"]: + WebSearchCallCompletedEvent$inboundSchema, + ["response.web_search_call.in_progress"]: + WebSearchCallInProgressEvent$inboundSchema, + ["response.web_search_call.searching"]: + WebSearchCallSearchingEvent$inboundSchema, }); -}); - -export function streamEventsResponseOutputItemDoneFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StreamEventsResponseOutputItemDone$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseOutputItemDone' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseOutputItemAdded$inboundSchema: z.ZodType< - StreamEventsResponseOutputItemAdded, - unknown -> = z.object({ - type: z.literal("response.output_item.added"), - output_index: z.number(), - item: OutputItems$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "output_index": "outputIndex", - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseOutputItemAddedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - StreamEventsResponseOutputItemAdded$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseOutputItemAdded' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseFailed$inboundSchema: z.ZodType< - StreamEventsResponseFailed, - unknown -> = z.object({ - type: z.literal("response.failed"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseFailedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseFailed$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseFailed' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseIncomplete$inboundSchema: z.ZodType< - StreamEventsResponseIncomplete, - unknown -> = z.object({ - type: z.literal("response.incomplete"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseIncompleteFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseIncomplete$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseIncomplete' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseCompleted$inboundSchema: z.ZodType< - StreamEventsResponseCompleted, - unknown -> = z.object({ - type: z.literal("response.completed"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseCompletedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseCompleted$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseCompleted' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseInProgress$inboundSchema: z.ZodType< - StreamEventsResponseInProgress, - unknown -> = z.object({ - type: z.literal("response.in_progress"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseInProgressFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseInProgress$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseInProgress' from JSON`, - ); -} - -/** @internal */ -export const StreamEventsResponseCreated$inboundSchema: z.ZodType< - StreamEventsResponseCreated, - unknown -> = z.object({ - type: z.literal("response.created"), - response: OpenResponsesResult$inboundSchema, - sequence_number: z.number(), -}).transform((v) => { - return remap$(v, { - "sequence_number": "sequenceNumber", - }); -}); - -export function streamEventsResponseCreatedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamEventsResponseCreated$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamEventsResponseCreated' from JSON`, - ); -} - -/** @internal */ -export const StreamEvents$inboundSchema: z.ZodType = z - .union([ - z.lazy(() => StreamEventsResponseCreated$inboundSchema), - z.lazy(() => StreamEventsResponseInProgress$inboundSchema), - z.lazy(() => StreamEventsResponseCompleted$inboundSchema), - z.lazy(() => StreamEventsResponseIncomplete$inboundSchema), - z.lazy(() => StreamEventsResponseFailed$inboundSchema), - ErrorEvent$inboundSchema, - z.lazy(() => StreamEventsResponseOutputItemAdded$inboundSchema), - z.lazy(() => StreamEventsResponseOutputItemDone$inboundSchema), - ContentPartAddedEvent$inboundSchema, - ContentPartDoneEvent$inboundSchema, - TextDeltaEvent$inboundSchema, - TextDoneEvent$inboundSchema, - RefusalDeltaEvent$inboundSchema, - RefusalDoneEvent$inboundSchema, - AnnotationAddedEvent$inboundSchema, - FunctionCallArgsDeltaEvent$inboundSchema, - FunctionCallArgsDoneEvent$inboundSchema, - ReasoningDeltaEvent$inboundSchema, - ReasoningDoneEvent$inboundSchema, - ReasoningSummaryPartAddedEvent$inboundSchema, - ReasoningSummaryPartDoneEvent$inboundSchema, - ReasoningSummaryTextDeltaEvent$inboundSchema, - ReasoningSummaryTextDoneEvent$inboundSchema, - ImageGenCallInProgressEvent$inboundSchema, - ImageGenCallGeneratingEvent$inboundSchema, - ImageGenCallPartialImageEvent$inboundSchema, - ImageGenCallCompletedEvent$inboundSchema, - WebSearchCallInProgressEvent$inboundSchema, - WebSearchCallSearchingEvent$inboundSchema, - WebSearchCallCompletedEvent$inboundSchema, - ]); export function streamEventsFromJSON( jsonString: string, diff --git a/src/models/streameventsresponsecompleted.ts b/src/models/streameventsresponsecompleted.ts new file mode 100644 index 00000000..4834dabe --- /dev/null +++ b/src/models/streameventsresponsecompleted.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7fe07ad1c47 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response has completed successfully + */ +export type StreamEventsResponseCompleted = { + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; + type: "response.completed"; +}; + +/** @internal */ +export const StreamEventsResponseCompleted$inboundSchema: z.ZodType< + StreamEventsResponseCompleted, + unknown +> = z.object({ + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), + type: z.literal("response.completed"), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseCompletedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseCompleted$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseCompleted' from JSON`, + ); +} diff --git a/src/models/streameventsresponsefailed.ts b/src/models/streameventsresponsefailed.ts new file mode 100644 index 00000000..bc87ec6b --- /dev/null +++ b/src/models/streameventsresponsefailed.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 63748aa9f88e + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response has failed + */ +export type StreamEventsResponseFailed = { + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; + type: "response.failed"; +}; + +/** @internal */ +export const StreamEventsResponseFailed$inboundSchema: z.ZodType< + StreamEventsResponseFailed, + unknown +> = z.object({ + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), + type: z.literal("response.failed"), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseFailedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseFailed$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseFailed' from JSON`, + ); +} diff --git a/src/models/streameventsresponseincomplete.ts b/src/models/streameventsresponseincomplete.ts new file mode 100644 index 00000000..006e47c2 --- /dev/null +++ b/src/models/streameventsresponseincomplete.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 56f3a5c4a544 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + OpenResponsesResult, + OpenResponsesResult$inboundSchema, +} from "./openresponsesresult.js"; + +/** + * Event emitted when a response is incomplete + */ +export type StreamEventsResponseIncomplete = { + /** + * Complete non-streaming response from the Responses API + */ + response: OpenResponsesResult; + sequenceNumber: number; + type: "response.incomplete"; +}; + +/** @internal */ +export const StreamEventsResponseIncomplete$inboundSchema: z.ZodType< + StreamEventsResponseIncomplete, + unknown +> = z.object({ + response: OpenResponsesResult$inboundSchema, + sequence_number: z.int(), + type: z.literal("response.incomplete"), +}).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseIncompleteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamEventsResponseIncomplete$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseIncomplete' from JSON`, + ); +} diff --git a/src/models/streameventsresponseoutputitemadded.ts b/src/models/streameventsresponseoutputitemadded.ts new file mode 100644 index 00000000..e0afbfb2 --- /dev/null +++ b/src/models/streameventsresponseoutputitemadded.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 16cdc9efe2b8 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + +/** + * Event emitted when a new output item is added to the response + */ +export type StreamEventsResponseOutputItemAdded = { + /** + * An output item from the response + */ + item: OutputItems; + outputIndex: number; + sequenceNumber: number; + type: "response.output_item.added"; +}; + +/** @internal */ +export const StreamEventsResponseOutputItemAdded$inboundSchema: z.ZodType< + StreamEventsResponseOutputItemAdded, + unknown +> = z.object({ + item: OutputItems$inboundSchema, + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.output_item.added"), +}).transform((v) => { + return remap$(v, { + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseOutputItemAddedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StreamEventsResponseOutputItemAdded$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseOutputItemAdded' from JSON`, + ); +} diff --git a/src/models/streameventsresponseoutputitemdone.ts b/src/models/streameventsresponseoutputitemdone.ts new file mode 100644 index 00000000..a848a454 --- /dev/null +++ b/src/models/streameventsresponseoutputitemdone.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cef4030a60c2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OutputItems, OutputItems$inboundSchema } from "./outputitems.js"; + +/** + * Event emitted when an output item is complete + */ +export type StreamEventsResponseOutputItemDone = { + /** + * An output item from the response + */ + item: OutputItems; + outputIndex: number; + sequenceNumber: number; + type: "response.output_item.done"; +}; + +/** @internal */ +export const StreamEventsResponseOutputItemDone$inboundSchema: z.ZodType< + StreamEventsResponseOutputItemDone, + unknown +> = z.object({ + item: OutputItems$inboundSchema, + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.output_item.done"), +}).transform((v) => { + return remap$(v, { + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function streamEventsResponseOutputItemDoneFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StreamEventsResponseOutputItemDone$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamEventsResponseOutputItemDone' from JSON`, + ); +} diff --git a/src/models/streamlogprob.ts b/src/models/streamlogprob.ts new file mode 100644 index 00000000..9a9dcc05 --- /dev/null +++ b/src/models/streamlogprob.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3d401204f1ef + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + StreamLogprobTopLogprob, + StreamLogprobTopLogprob$inboundSchema, +} from "./streamlogprobtoplogprob.js"; + +/** + * Log probability information for a token + */ +export type StreamLogprob = { + bytes?: Array | undefined; + logprob: number; + token: string; + topLogprobs?: Array | undefined; +}; + +/** @internal */ +export const StreamLogprob$inboundSchema: z.ZodType = z + .object({ + bytes: z.array(z.int()).optional(), + logprob: z.number(), + token: z.string(), + top_logprobs: z.array(StreamLogprobTopLogprob$inboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + "top_logprobs": "topLogprobs", + }); + }); + +export function streamLogprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamLogprob' from JSON`, + ); +} diff --git a/src/models/streamlogprobtoplogprob.ts b/src/models/streamlogprobtoplogprob.ts new file mode 100644 index 00000000..c0a93469 --- /dev/null +++ b/src/models/streamlogprobtoplogprob.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3b88c304514b + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Alternative token with its log probability + */ +export type StreamLogprobTopLogprob = { + bytes?: Array | undefined; + logprob?: number | undefined; + token?: string | undefined; +}; + +/** @internal */ +export const StreamLogprobTopLogprob$inboundSchema: z.ZodType< + StreamLogprobTopLogprob, + unknown +> = z.object({ + bytes: z.array(z.int()).optional(), + logprob: z.number().optional(), + token: z.string().optional(), +}); + +export function streamLogprobTopLogprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StreamLogprobTopLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StreamLogprobTopLogprob' from JSON`, + ); +} diff --git a/src/models/textdeltaevent.ts b/src/models/textdeltaevent.ts index d8de434c..360dc58a 100644 --- a/src/models/textdeltaevent.ts +++ b/src/models/textdeltaevent.ts @@ -8,100 +8,36 @@ import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -/** - * Alternative token with its log probability - */ -export type TextDeltaEventTopLogprob = { - token?: string | undefined; - logprob?: number | undefined; - bytes?: Array | undefined; -}; - -/** - * Log probability information for a token - */ -export type TextDeltaEventLogprob = { - logprob: number; - token: string; - topLogprobs?: Array | undefined; - bytes?: Array | undefined; -}; +import { StreamLogprob, StreamLogprob$inboundSchema } from "./streamlogprob.js"; /** * Event emitted when a text delta is streamed */ export type TextDeltaEvent = { - type: "response.output_text.delta"; - logprobs: Array; - outputIndex: number; - itemId: string; contentIndex: number; delta: string; + itemId: string; + logprobs: Array; + outputIndex: number; sequenceNumber: number; + type: "response.output_text.delta"; }; -/** @internal */ -export const TextDeltaEventTopLogprob$inboundSchema: z.ZodType< - TextDeltaEventTopLogprob, - unknown -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), - bytes: z.array(z.number()).optional(), -}); - -export function textDeltaEventTopLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDeltaEventTopLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDeltaEventTopLogprob' from JSON`, - ); -} - -/** @internal */ -export const TextDeltaEventLogprob$inboundSchema: z.ZodType< - TextDeltaEventLogprob, - unknown -> = z.object({ - logprob: z.number(), - token: z.string(), - top_logprobs: z.array(z.lazy(() => TextDeltaEventTopLogprob$inboundSchema)) - .optional(), - bytes: z.array(z.number()).optional(), -}).transform((v) => { - return remap$(v, { - "top_logprobs": "topLogprobs", - }); -}); - -export function textDeltaEventLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDeltaEventLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDeltaEventLogprob' from JSON`, - ); -} - /** @internal */ export const TextDeltaEvent$inboundSchema: z.ZodType = z.object({ - type: z.literal("response.output_text.delta"), - logprobs: z.array(z.lazy(() => TextDeltaEventLogprob$inboundSchema)), - output_index: z.number(), - item_id: z.string(), - content_index: z.number(), + content_index: z.int(), delta: z.string(), - sequence_number: z.number(), + item_id: z.string(), + logprobs: z.array(StreamLogprob$inboundSchema), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.output_text.delta"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/textdoneevent.ts b/src/models/textdoneevent.ts index c18cadab..06aef139 100644 --- a/src/models/textdoneevent.ts +++ b/src/models/textdoneevent.ts @@ -8,100 +8,36 @@ import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -/** - * Alternative token with its log probability - */ -export type TextDoneEventTopLogprob = { - token?: string | undefined; - logprob?: number | undefined; - bytes?: Array | undefined; -}; - -/** - * Log probability information for a token - */ -export type TextDoneEventLogprob = { - logprob: number; - token: string; - topLogprobs?: Array | undefined; - bytes?: Array | undefined; -}; +import { StreamLogprob, StreamLogprob$inboundSchema } from "./streamlogprob.js"; /** * Event emitted when text streaming is complete */ export type TextDoneEvent = { - type: "response.output_text.done"; - outputIndex: number; - itemId: string; contentIndex: number; - text: string; + itemId: string; + logprobs: Array; + outputIndex: number; sequenceNumber: number; - logprobs: Array; + text: string; + type: "response.output_text.done"; }; -/** @internal */ -export const TextDoneEventTopLogprob$inboundSchema: z.ZodType< - TextDoneEventTopLogprob, - unknown -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), - bytes: z.array(z.number()).optional(), -}); - -export function textDoneEventTopLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDoneEventTopLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDoneEventTopLogprob' from JSON`, - ); -} - -/** @internal */ -export const TextDoneEventLogprob$inboundSchema: z.ZodType< - TextDoneEventLogprob, - unknown -> = z.object({ - logprob: z.number(), - token: z.string(), - top_logprobs: z.array(z.lazy(() => TextDoneEventTopLogprob$inboundSchema)) - .optional(), - bytes: z.array(z.number()).optional(), -}).transform((v) => { - return remap$(v, { - "top_logprobs": "topLogprobs", - }); -}); - -export function textDoneEventLogprobFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TextDoneEventLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TextDoneEventLogprob' from JSON`, - ); -} - /** @internal */ export const TextDoneEvent$inboundSchema: z.ZodType = z .object({ - type: z.literal("response.output_text.done"), - output_index: z.number(), + content_index: z.int(), item_id: z.string(), - content_index: z.number(), + logprobs: z.array(StreamLogprob$inboundSchema), + output_index: z.int(), + sequence_number: z.int(), text: z.string(), - sequence_number: z.number(), - logprobs: z.array(z.lazy(() => TextDoneEventLogprob$inboundSchema)), + type: z.literal("response.output_text.done"), }).transform((v) => { return remap$(v, { - "output_index": "outputIndex", - "item_id": "itemId", "content_index": "contentIndex", + "item_id": "itemId", + "output_index": "outputIndex", "sequence_number": "sequenceNumber", }); }); diff --git a/src/models/toolcallstatus.ts b/src/models/toolcallstatus.ts new file mode 100644 index 00000000..1585e3f9 --- /dev/null +++ b/src/models/toolcallstatus.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54eb9c06bedb + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ToolCallStatus = { + InProgress: "in_progress", + Completed: "completed", + Incomplete: "incomplete", +} as const; +export type ToolCallStatus = OpenEnum; + +/** @internal */ +export const ToolCallStatus$inboundSchema: z.ZodType = + openEnums.inboundSchema(ToolCallStatus); +/** @internal */ +export const ToolCallStatus$outboundSchema: z.ZodType = + openEnums.outboundSchema(ToolCallStatus); diff --git a/src/models/toolcallstatusenum.ts b/src/models/toolcallstatusenum.ts deleted file mode 100644 index 8e2fd64d..00000000 --- a/src/models/toolcallstatusenum.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: bbb08fcb13ab - */ - -import * as z from "zod/v4"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; - -export const ToolCallStatusEnum = { - InProgress: "in_progress", - Completed: "completed", - Incomplete: "incomplete", -} as const; -export type ToolCallStatusEnum = OpenEnum; - -/** @internal */ -export const ToolCallStatusEnum$inboundSchema: z.ZodType< - ToolCallStatusEnum, - unknown -> = openEnums.inboundSchema(ToolCallStatusEnum); -/** @internal */ -export const ToolCallStatusEnum$outboundSchema: z.ZodType< - string, - ToolCallStatusEnum -> = openEnums.outboundSchema(ToolCallStatusEnum); diff --git a/src/models/toolchoiceallowed.ts b/src/models/toolchoiceallowed.ts new file mode 100644 index 00000000..627dcdee --- /dev/null +++ b/src/models/toolchoiceallowed.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 82ee236509d6 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const ModeRequired = { + Required: "required", +} as const; +export type ModeRequired = ClosedEnum; + +export const ModeAuto = { + Auto: "auto", +} as const; +export type ModeAuto = ClosedEnum; + +export type Mode = ModeAuto | ModeRequired; + +export const ToolChoiceAllowedType = { + AllowedTools: "allowed_tools", +} as const; +export type ToolChoiceAllowedType = ClosedEnum; + +/** + * Constrains the model to a pre-defined set of allowed tools + */ +export type ToolChoiceAllowed = { + mode: ModeAuto | ModeRequired; + tools: Array<{ [k: string]: any | null }>; + type: ToolChoiceAllowedType; +}; + +/** @internal */ +export const ModeRequired$inboundSchema: z.ZodEnum = z + .enum(ModeRequired); +/** @internal */ +export const ModeRequired$outboundSchema: z.ZodEnum = + ModeRequired$inboundSchema; + +/** @internal */ +export const ModeAuto$inboundSchema: z.ZodEnum = z.enum( + ModeAuto, +); +/** @internal */ +export const ModeAuto$outboundSchema: z.ZodEnum = + ModeAuto$inboundSchema; + +/** @internal */ +export const Mode$inboundSchema: z.ZodType = z.union([ + ModeAuto$inboundSchema, + ModeRequired$inboundSchema, +]); +/** @internal */ +export type Mode$Outbound = string | string; + +/** @internal */ +export const Mode$outboundSchema: z.ZodType = z.union([ + ModeAuto$outboundSchema, + ModeRequired$outboundSchema, +]); + +export function modeToJSON(mode: Mode): string { + return JSON.stringify(Mode$outboundSchema.parse(mode)); +} +export function modeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Mode$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Mode' from JSON`, + ); +} + +/** @internal */ +export const ToolChoiceAllowedType$inboundSchema: z.ZodEnum< + typeof ToolChoiceAllowedType +> = z.enum(ToolChoiceAllowedType); +/** @internal */ +export const ToolChoiceAllowedType$outboundSchema: z.ZodEnum< + typeof ToolChoiceAllowedType +> = ToolChoiceAllowedType$inboundSchema; + +/** @internal */ +export const ToolChoiceAllowed$inboundSchema: z.ZodType< + ToolChoiceAllowed, + unknown +> = z.object({ + mode: z.union([ModeAuto$inboundSchema, ModeRequired$inboundSchema]), + tools: z.array(z.record(z.string(), z.nullable(z.any()))), + type: ToolChoiceAllowedType$inboundSchema, +}); +/** @internal */ +export type ToolChoiceAllowed$Outbound = { + mode: string | string; + tools: Array<{ [k: string]: any | null }>; + type: string; +}; + +/** @internal */ +export const ToolChoiceAllowed$outboundSchema: z.ZodType< + ToolChoiceAllowed$Outbound, + ToolChoiceAllowed +> = z.object({ + mode: z.union([ModeAuto$outboundSchema, ModeRequired$outboundSchema]), + tools: z.array(z.record(z.string(), z.nullable(z.any()))), + type: ToolChoiceAllowedType$outboundSchema, +}); + +export function toolChoiceAllowedToJSON( + toolChoiceAllowed: ToolChoiceAllowed, +): string { + return JSON.stringify( + ToolChoiceAllowed$outboundSchema.parse(toolChoiceAllowed), + ); +} +export function toolChoiceAllowedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ToolChoiceAllowed$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ToolChoiceAllowed' from JSON`, + ); +} diff --git a/src/models/topproviderinfo.ts b/src/models/topproviderinfo.ts index c95a2f12..fde06d54 100644 --- a/src/models/topproviderinfo.ts +++ b/src/models/topproviderinfo.ts @@ -16,15 +16,15 @@ export type TopProviderInfo = { /** * Context length from the top provider */ - contextLength?: number | null | undefined; - /** - * Maximum completion tokens from the top provider - */ - maxCompletionTokens?: number | null | undefined; + contextLength?: number | undefined; /** * Whether the top provider moderates content */ isModerated: boolean; + /** + * Maximum completion tokens from the top provider + */ + maxCompletionTokens?: number | undefined; }; /** @internal */ @@ -32,14 +32,14 @@ export const TopProviderInfo$inboundSchema: z.ZodType< TopProviderInfo, unknown > = z.object({ - context_length: z.nullable(z.number()).optional(), - max_completion_tokens: z.nullable(z.number()).optional(), + context_length: z.int().optional(), is_moderated: z.boolean(), + max_completion_tokens: z.int().optional(), }).transform((v) => { return remap$(v, { "context_length": "contextLength", - "max_completion_tokens": "maxCompletionTokens", "is_moderated": "isModerated", + "max_completion_tokens": "maxCompletionTokens", }); }); diff --git a/src/models/traceconfig.ts b/src/models/traceconfig.ts new file mode 100644 index 00000000..94ec277c --- /dev/null +++ b/src/models/traceconfig.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 50ce6e8a7bcd + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +/** + * 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. + */ +export type TraceConfig = { + generationName?: string | undefined; + parentSpanId?: string | undefined; + spanName?: string | undefined; + traceId?: string | undefined; + traceName?: string | undefined; + additionalProperties?: { [k: string]: any | null } | undefined; +}; + +/** @internal */ +export type TraceConfig$Outbound = { + generation_name?: string | undefined; + parent_span_id?: string | undefined; + span_name?: string | undefined; + trace_id?: string | undefined; + trace_name?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const TraceConfig$outboundSchema: z.ZodType< + TraceConfig$Outbound, + TraceConfig +> = z.object({ + generationName: z.string().optional(), + parentSpanId: z.string().optional(), + spanName: z.string().optional(), + traceId: z.string().optional(), + traceName: z.string().optional(), + additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + generationName: "generation_name", + parentSpanId: "parent_span_id", + spanName: "span_name", + traceId: "trace_id", + traceName: "trace_name", + additionalProperties: null, + }), + }; +}); + +export function traceConfigToJSON(traceConfig: TraceConfig): string { + return JSON.stringify(TraceConfig$outboundSchema.parse(traceConfig)); +} diff --git a/src/models/truncationenum.ts b/src/models/truncation.ts similarity index 52% rename from src/models/truncationenum.ts rename to src/models/truncation.ts index 8e78e372..26483639 100644 --- a/src/models/truncationenum.ts +++ b/src/models/truncation.ts @@ -1,18 +1,18 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 2e68448c1324 + * @generated-id: 8aa9a16a7a40 */ import * as z from "zod/v4"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; -export const TruncationEnum = { +export const Truncation = { Auto: "auto", Disabled: "disabled", } as const; -export type TruncationEnum = OpenEnum; +export type Truncation = OpenEnum; /** @internal */ -export const TruncationEnum$inboundSchema: z.ZodType = - openEnums.inboundSchema(TruncationEnum); +export const Truncation$inboundSchema: z.ZodType = + openEnums.inboundSchema(Truncation); diff --git a/src/models/updateguardrailrequest.ts b/src/models/updateguardrailrequest.ts new file mode 100644 index 00000000..529bd510 --- /dev/null +++ b/src/models/updateguardrailrequest.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8ae5b029f2d5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + GuardrailInterval, + GuardrailInterval$outboundSchema, +} from "./guardrailinterval.js"; + +export type UpdateGuardrailRequest = { + /** + * Array of model identifiers (slug or canonical_slug accepted) + */ + allowedModels?: Array | null | undefined; + /** + * New list of allowed provider IDs + */ + allowedProviders?: Array | null | undefined; + /** + * New description for the guardrail + */ + description?: string | null | undefined; + /** + * Whether to enforce zero data retention + */ + enforceZdr?: boolean | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; + /** + * New spending limit in USD + */ + limitUsd?: number | undefined; + /** + * New name for the guardrail + */ + name?: string | undefined; + /** + * Interval at which the limit resets (daily, weekly, monthly) + */ + resetInterval?: GuardrailInterval | null | undefined; +}; + +/** @internal */ +export type UpdateGuardrailRequest$Outbound = { + allowed_models?: Array | null | undefined; + allowed_providers?: Array | null | undefined; + description?: string | null | undefined; + enforce_zdr?: boolean | null | undefined; + ignored_providers?: Array | null | undefined; + limit_usd?: number | undefined; + name?: string | undefined; + reset_interval?: string | null | undefined; +}; + +/** @internal */ +export const UpdateGuardrailRequest$outboundSchema: z.ZodType< + UpdateGuardrailRequest$Outbound, + UpdateGuardrailRequest +> = z.object({ + allowedModels: z.nullable(z.array(z.string())).optional(), + allowedProviders: z.nullable(z.array(z.string())).optional(), + description: z.nullable(z.string()).optional(), + enforceZdr: z.nullable(z.boolean()).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), + limitUsd: z.number().optional(), + name: z.string().optional(), + resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + allowedProviders: "allowed_providers", + enforceZdr: "enforce_zdr", + ignoredProviders: "ignored_providers", + limitUsd: "limit_usd", + resetInterval: "reset_interval", + }); +}); + +export function updateGuardrailRequestToJSON( + updateGuardrailRequest: UpdateGuardrailRequest, +): string { + return JSON.stringify( + UpdateGuardrailRequest$outboundSchema.parse(updateGuardrailRequest), + ); +} diff --git a/src/models/updateguardrailresponse.ts b/src/models/updateguardrailresponse.ts new file mode 100644 index 00000000..62e472e9 --- /dev/null +++ b/src/models/updateguardrailresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a1debd60e96d + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { Guardrail, Guardrail$inboundSchema } from "./guardrail.js"; + +export type UpdateGuardrailResponse = { + data: Guardrail; +}; + +/** @internal */ +export const UpdateGuardrailResponse$inboundSchema: z.ZodType< + UpdateGuardrailResponse, + unknown +> = z.object({ + data: Guardrail$inboundSchema, +}); + +export function updateGuardrailResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateGuardrailResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateGuardrailResponse' from JSON`, + ); +} diff --git a/src/models/urlcitation.ts b/src/models/urlcitation.ts index 4d03e2fd..23807611 100644 --- a/src/models/urlcitation.ts +++ b/src/models/urlcitation.ts @@ -10,34 +10,34 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type URLCitation = { + endIndex: number; + startIndex: number; + title: string; type: "url_citation"; url: string; - title: string; - startIndex: number; - endIndex: number; }; /** @internal */ export const URLCitation$inboundSchema: z.ZodType = z .object({ + end_index: z.int(), + start_index: z.int(), + title: z.string(), type: z.literal("url_citation"), url: z.string(), - title: z.string(), - start_index: z.number(), - end_index: z.number(), }).transform((v) => { return remap$(v, { - "start_index": "startIndex", "end_index": "endIndex", + "start_index": "startIndex", }); }); /** @internal */ export type URLCitation$Outbound = { + end_index: number; + start_index: number; + title: string; type: "url_citation"; url: string; - title: string; - start_index: number; - end_index: number; }; /** @internal */ @@ -45,15 +45,15 @@ export const URLCitation$outboundSchema: z.ZodType< URLCitation$Outbound, URLCitation > = z.object({ + endIndex: z.int(), + startIndex: z.int(), + title: z.string(), type: z.literal("url_citation"), url: z.string(), - title: z.string(), - startIndex: z.number(), - endIndex: z.number(), }).transform((v) => { return remap$(v, { - startIndex: "start_index", endIndex: "end_index", + startIndex: "start_index", }); }); diff --git a/src/models/usage.ts b/src/models/usage.ts index 8ca3e5ee..04d39d4a 100644 --- a/src/models/usage.ts +++ b/src/models/usage.ts @@ -18,7 +18,7 @@ export type OutputTokensDetails = { }; export type CostDetails = { - upstreamInferenceCost?: number | null | undefined; + upstreamInferenceCost?: number | undefined; upstreamInferenceInputCost: number; upstreamInferenceOutputCost: number; }; @@ -35,12 +35,12 @@ export type Usage = { /** * Cost of the completion */ - cost?: number | null | undefined; + cost?: number | undefined; + costDetails?: CostDetails | undefined; /** * Whether a request was made using a Bring Your Own Key configuration */ isByok?: boolean | undefined; - costDetails?: CostDetails | undefined; }; /** @internal */ @@ -48,7 +48,7 @@ export const InputTokensDetails$inboundSchema: z.ZodType< InputTokensDetails, unknown > = z.object({ - cached_tokens: z.number(), + cached_tokens: z.int(), }).transform((v) => { return remap$(v, { "cached_tokens": "cachedTokens", @@ -70,7 +70,7 @@ export const OutputTokensDetails$inboundSchema: z.ZodType< OutputTokensDetails, unknown > = z.object({ - reasoning_tokens: z.number(), + reasoning_tokens: z.int(), }).transform((v) => { return remap$(v, { "reasoning_tokens": "reasoningTokens", @@ -90,7 +90,7 @@ export function outputTokensDetailsFromJSON( /** @internal */ export const CostDetails$inboundSchema: z.ZodType = z .object({ - upstream_inference_cost: z.nullable(z.number()).optional(), + upstream_inference_cost: z.number().optional(), upstream_inference_input_cost: z.number(), upstream_inference_output_cost: z.number(), }).transform((v) => { @@ -113,14 +113,14 @@ export function costDetailsFromJSON( /** @internal */ export const Usage$inboundSchema: z.ZodType = z.object({ - input_tokens: z.number(), + input_tokens: z.int(), input_tokens_details: z.lazy(() => InputTokensDetails$inboundSchema), - output_tokens: z.number(), + output_tokens: z.int(), output_tokens_details: z.lazy(() => OutputTokensDetails$inboundSchema), - total_tokens: z.number(), - cost: z.nullable(z.number()).optional(), - is_byok: z.boolean().optional(), + total_tokens: z.int(), + cost: z.number().optional(), cost_details: z.lazy(() => CostDetails$inboundSchema).optional(), + is_byok: z.boolean().optional(), }).transform((v) => { return remap$(v, { "input_tokens": "inputTokens", @@ -128,8 +128,8 @@ export const Usage$inboundSchema: z.ZodType = z.object({ "output_tokens": "outputTokens", "output_tokens_details": "outputTokensDetails", "total_tokens": "totalTokens", - "is_byok": "isByok", "cost_details": "costDetails", + "is_byok": "isByok", }); }); diff --git a/src/models/videogenerationrequest.ts b/src/models/videogenerationrequest.ts new file mode 100644 index 00000000..54f47c30 --- /dev/null +++ b/src/models/videogenerationrequest.ts @@ -0,0 +1,528 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e72ea2e4c5b3 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + ContentPartImage, + ContentPartImage$Outbound, + ContentPartImage$outboundSchema, +} from "./contentpartimage.js"; +import { + FrameImage, + FrameImage$Outbound, + FrameImage$outboundSchema, +} from "./frameimage.js"; + +/** + * Aspect ratio of the generated video + */ +export const AspectRatio = { + OneHundredAndSixtyNine: "16:9", + NineHundredAndSixteen: "9:16", + Eleven: "1:1", + FortyThree: "4:3", + ThirtyFour: "3:4", + TwoHundredAndNineteen: "21:9", + NineHundredAndTwentyOne: "9:21", +} as const; +/** + * Aspect ratio of the generated video + */ +export type AspectRatio = OpenEnum; + +/** + * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body. + */ +export type Options = { + oneai?: { [k: string]: any | null } | undefined; + ai21?: { [k: string]: any | null } | undefined; + aionLabs?: { [k: string]: any | null } | undefined; + akashml?: { [k: string]: any | null } | undefined; + alibaba?: { [k: string]: any | null } | undefined; + amazonBedrock?: { [k: string]: any | null } | undefined; + amazonNova?: { [k: string]: any | null } | undefined; + ambient?: { [k: string]: any | null } | undefined; + anthropic?: { [k: string]: any | null } | undefined; + anyscale?: { [k: string]: any | null } | undefined; + arceeAi?: { [k: string]: any | null } | undefined; + atlasCloud?: { [k: string]: any | null } | undefined; + atoma?: { [k: string]: any | null } | undefined; + avian?: { [k: string]: any | null } | undefined; + azure?: { [k: string]: any | null } | undefined; + baseten?: { [k: string]: any | null } | undefined; + blackForestLabs?: { [k: string]: any | null } | undefined; + byteplus?: { [k: string]: any | null } | undefined; + centml?: { [k: string]: any | null } | undefined; + cerebras?: { [k: string]: any | null } | undefined; + chutes?: { [k: string]: any | null } | undefined; + cirrascale?: { [k: string]: any | null } | undefined; + clarifai?: { [k: string]: any | null } | undefined; + cloudflare?: { [k: string]: any | null } | undefined; + cohere?: { [k: string]: any | null } | undefined; + crofai?: { [k: string]: any | null } | undefined; + crusoe?: { [k: string]: any | null } | undefined; + deepinfra?: { [k: string]: any | null } | undefined; + deepseek?: { [k: string]: any | null } | undefined; + enfer?: { [k: string]: any | null } | undefined; + fakeProvider?: { [k: string]: any | null } | undefined; + featherless?: { [k: string]: any | null } | undefined; + fireworks?: { [k: string]: any | null } | undefined; + friendli?: { [k: string]: any | null } | undefined; + gmicloud?: { [k: string]: any | null } | undefined; + googleAiStudio?: { [k: string]: any | null } | undefined; + googleVertex?: { [k: string]: any | null } | undefined; + gopomelo?: { [k: string]: any | null } | undefined; + groq?: { [k: string]: any | null } | undefined; + huggingface?: { [k: string]: any | null } | undefined; + hyperbolic?: { [k: string]: any | null } | undefined; + hyperbolicQuantized?: { [k: string]: any | null } | undefined; + inception?: { [k: string]: any | null } | undefined; + inceptron?: { [k: string]: any | null } | undefined; + inferenceNet?: { [k: string]: any | null } | undefined; + infermatic?: { [k: string]: any | null } | undefined; + inflection?: { [k: string]: any | null } | undefined; + inocloud?: { [k: string]: any | null } | undefined; + ioNet?: { [k: string]: any | null } | undefined; + ionstream?: { [k: string]: any | null } | undefined; + klusterai?: { [k: string]: any | null } | undefined; + lambda?: { [k: string]: any | null } | undefined; + lepton?: { [k: string]: any | null } | undefined; + liquid?: { [k: string]: any | null } | undefined; + lynn?: { [k: string]: any | null } | undefined; + lynnPrivate?: { [k: string]: any | null } | undefined; + mancer?: { [k: string]: any | null } | undefined; + mancerOld?: { [k: string]: any | null } | undefined; + mara?: { [k: string]: any | null } | undefined; + meta?: { [k: string]: any | null } | undefined; + minimax?: { [k: string]: any | null } | undefined; + mistral?: { [k: string]: any | null } | undefined; + modal?: { [k: string]: any | null } | undefined; + modelrun?: { [k: string]: any | null } | undefined; + modular?: { [k: string]: any | null } | undefined; + moonshotai?: { [k: string]: any | null } | undefined; + morph?: { [k: string]: any | null } | undefined; + ncompass?: { [k: string]: any | null } | undefined; + nebius?: { [k: string]: any | null } | undefined; + nextbit?: { [k: string]: any | null } | undefined; + nineteen?: { [k: string]: any | null } | undefined; + novita?: { [k: string]: any | null } | undefined; + nvidia?: { [k: string]: any | null } | undefined; + octoai?: { [k: string]: any | null } | undefined; + openInference?: { [k: string]: any | null } | undefined; + openai?: { [k: string]: any | null } | undefined; + parasail?: { [k: string]: any | null } | undefined; + perplexity?: { [k: string]: any | null } | undefined; + phala?: { [k: string]: any | null } | undefined; + recursal?: { [k: string]: any | null } | undefined; + reflection?: { [k: string]: any | null } | undefined; + reka?: { [k: string]: any | null } | undefined; + relace?: { [k: string]: any | null } | undefined; + replicate?: { [k: string]: any | null } | undefined; + sambanova?: { [k: string]: any | null } | undefined; + sambanovaCloaked?: { [k: string]: any | null } | undefined; + seed?: { [k: string]: any | null } | undefined; + sfCompute?: { [k: string]: any | null } | undefined; + siliconflow?: { [k: string]: any | null } | undefined; + sourceful?: { [k: string]: any | null } | undefined; + stealth?: { [k: string]: any | null } | undefined; + stepfun?: { [k: string]: any | null } | undefined; + streamlake?: { [k: string]: any | null } | undefined; + switchpoint?: { [k: string]: any | null } | undefined; + targon?: { [k: string]: any | null } | undefined; + together?: { [k: string]: any | null } | undefined; + togetherLite?: { [k: string]: any | null } | undefined; + ubicloud?: { [k: string]: any | null } | undefined; + upstage?: { [k: string]: any | null } | undefined; + venice?: { [k: string]: any | null } | undefined; + wandb?: { [k: string]: any | null } | undefined; + xai?: { [k: string]: any | null } | undefined; + xiaomi?: { [k: string]: any | null } | undefined; + zAi?: { [k: string]: any | null } | undefined; +}; + +/** + * Provider-specific passthrough configuration + */ +export type Provider = { + /** + * Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body. + */ + options?: Options | undefined; +}; + +/** + * Resolution of the generated video + */ +export const Resolution = { + FourHundredAndEightyp: "480p", + SevenHundredAndTwentyp: "720p", + OneThousandAndEightyp: "1080p", + OneK: "1K", + TwoK: "2K", + FourK: "4K", +} as const; +/** + * Resolution of the generated video + */ +export type Resolution = OpenEnum; + +export type VideoGenerationRequest = { + /** + * Aspect ratio of the generated video + */ + aspectRatio?: AspectRatio | undefined; + /** + * Duration of the generated video in seconds + */ + duration?: number | undefined; + /** + * 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. + */ + frameImages?: Array | undefined; + /** + * Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + */ + generateAudio?: boolean | undefined; + /** + * Reference images to guide video generation + */ + inputReferences?: Array | undefined; + model: string; + prompt: string; + /** + * Provider-specific passthrough configuration + */ + provider?: Provider | undefined; + /** + * Resolution of the generated video + */ + resolution?: Resolution | undefined; + /** + * 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. + */ + seed?: number | undefined; + /** + * Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + */ + size?: string | undefined; +}; + +/** @internal */ +export const AspectRatio$outboundSchema: z.ZodType = + openEnums.outboundSchema(AspectRatio); + +/** @internal */ +export type Options$Outbound = { + "01ai"?: { [k: string]: any | null } | undefined; + ai21?: { [k: string]: any | null } | undefined; + "aion-labs"?: { [k: string]: any | null } | undefined; + akashml?: { [k: string]: any | null } | undefined; + alibaba?: { [k: string]: any | null } | undefined; + "amazon-bedrock"?: { [k: string]: any | null } | undefined; + "amazon-nova"?: { [k: string]: any | null } | undefined; + ambient?: { [k: string]: any | null } | undefined; + anthropic?: { [k: string]: any | null } | undefined; + anyscale?: { [k: string]: any | null } | undefined; + "arcee-ai"?: { [k: string]: any | null } | undefined; + "atlas-cloud"?: { [k: string]: any | null } | undefined; + atoma?: { [k: string]: any | null } | undefined; + avian?: { [k: string]: any | null } | undefined; + azure?: { [k: string]: any | null } | undefined; + baseten?: { [k: string]: any | null } | undefined; + "black-forest-labs"?: { [k: string]: any | null } | undefined; + byteplus?: { [k: string]: any | null } | undefined; + centml?: { [k: string]: any | null } | undefined; + cerebras?: { [k: string]: any | null } | undefined; + chutes?: { [k: string]: any | null } | undefined; + cirrascale?: { [k: string]: any | null } | undefined; + clarifai?: { [k: string]: any | null } | undefined; + cloudflare?: { [k: string]: any | null } | undefined; + cohere?: { [k: string]: any | null } | undefined; + crofai?: { [k: string]: any | null } | undefined; + crusoe?: { [k: string]: any | null } | undefined; + deepinfra?: { [k: string]: any | null } | undefined; + deepseek?: { [k: string]: any | null } | undefined; + enfer?: { [k: string]: any | null } | undefined; + "fake-provider"?: { [k: string]: any | null } | undefined; + featherless?: { [k: string]: any | null } | undefined; + fireworks?: { [k: string]: any | null } | undefined; + friendli?: { [k: string]: any | null } | undefined; + gmicloud?: { [k: string]: any | null } | undefined; + "google-ai-studio"?: { [k: string]: any | null } | undefined; + "google-vertex"?: { [k: string]: any | null } | undefined; + gopomelo?: { [k: string]: any | null } | undefined; + groq?: { [k: string]: any | null } | undefined; + huggingface?: { [k: string]: any | null } | undefined; + hyperbolic?: { [k: string]: any | null } | undefined; + "hyperbolic-quantized"?: { [k: string]: any | null } | undefined; + inception?: { [k: string]: any | null } | undefined; + inceptron?: { [k: string]: any | null } | undefined; + "inference-net"?: { [k: string]: any | null } | undefined; + infermatic?: { [k: string]: any | null } | undefined; + inflection?: { [k: string]: any | null } | undefined; + inocloud?: { [k: string]: any | null } | undefined; + "io-net"?: { [k: string]: any | null } | undefined; + ionstream?: { [k: string]: any | null } | undefined; + klusterai?: { [k: string]: any | null } | undefined; + lambda?: { [k: string]: any | null } | undefined; + lepton?: { [k: string]: any | null } | undefined; + liquid?: { [k: string]: any | null } | undefined; + lynn?: { [k: string]: any | null } | undefined; + "lynn-private"?: { [k: string]: any | null } | undefined; + mancer?: { [k: string]: any | null } | undefined; + "mancer-old"?: { [k: string]: any | null } | undefined; + mara?: { [k: string]: any | null } | undefined; + meta?: { [k: string]: any | null } | undefined; + minimax?: { [k: string]: any | null } | undefined; + mistral?: { [k: string]: any | null } | undefined; + modal?: { [k: string]: any | null } | undefined; + modelrun?: { [k: string]: any | null } | undefined; + modular?: { [k: string]: any | null } | undefined; + moonshotai?: { [k: string]: any | null } | undefined; + morph?: { [k: string]: any | null } | undefined; + ncompass?: { [k: string]: any | null } | undefined; + nebius?: { [k: string]: any | null } | undefined; + nextbit?: { [k: string]: any | null } | undefined; + nineteen?: { [k: string]: any | null } | undefined; + novita?: { [k: string]: any | null } | undefined; + nvidia?: { [k: string]: any | null } | undefined; + octoai?: { [k: string]: any | null } | undefined; + "open-inference"?: { [k: string]: any | null } | undefined; + openai?: { [k: string]: any | null } | undefined; + parasail?: { [k: string]: any | null } | undefined; + perplexity?: { [k: string]: any | null } | undefined; + phala?: { [k: string]: any | null } | undefined; + recursal?: { [k: string]: any | null } | undefined; + reflection?: { [k: string]: any | null } | undefined; + reka?: { [k: string]: any | null } | undefined; + relace?: { [k: string]: any | null } | undefined; + replicate?: { [k: string]: any | null } | undefined; + sambanova?: { [k: string]: any | null } | undefined; + "sambanova-cloaked"?: { [k: string]: any | null } | undefined; + seed?: { [k: string]: any | null } | undefined; + "sf-compute"?: { [k: string]: any | null } | undefined; + siliconflow?: { [k: string]: any | null } | undefined; + sourceful?: { [k: string]: any | null } | undefined; + stealth?: { [k: string]: any | null } | undefined; + stepfun?: { [k: string]: any | null } | undefined; + streamlake?: { [k: string]: any | null } | undefined; + switchpoint?: { [k: string]: any | null } | undefined; + targon?: { [k: string]: any | null } | undefined; + together?: { [k: string]: any | null } | undefined; + "together-lite"?: { [k: string]: any | null } | undefined; + ubicloud?: { [k: string]: any | null } | undefined; + upstage?: { [k: string]: any | null } | undefined; + venice?: { [k: string]: any | null } | undefined; + wandb?: { [k: string]: any | null } | undefined; + xai?: { [k: string]: any | null } | undefined; + xiaomi?: { [k: string]: any | null } | undefined; + "z-ai"?: { [k: string]: any | null } | undefined; +}; + +/** @internal */ +export const Options$outboundSchema: z.ZodType = z + .object({ + oneai: z.record(z.string(), z.nullable(z.any())).optional(), + ai21: z.record(z.string(), z.nullable(z.any())).optional(), + aionLabs: z.record(z.string(), z.nullable(z.any())).optional(), + akashml: z.record(z.string(), z.nullable(z.any())).optional(), + alibaba: z.record(z.string(), z.nullable(z.any())).optional(), + amazonBedrock: z.record(z.string(), z.nullable(z.any())).optional(), + amazonNova: z.record(z.string(), z.nullable(z.any())).optional(), + ambient: z.record(z.string(), z.nullable(z.any())).optional(), + anthropic: z.record(z.string(), z.nullable(z.any())).optional(), + anyscale: z.record(z.string(), z.nullable(z.any())).optional(), + arceeAi: z.record(z.string(), z.nullable(z.any())).optional(), + atlasCloud: z.record(z.string(), z.nullable(z.any())).optional(), + atoma: z.record(z.string(), z.nullable(z.any())).optional(), + avian: z.record(z.string(), z.nullable(z.any())).optional(), + azure: z.record(z.string(), z.nullable(z.any())).optional(), + baseten: z.record(z.string(), z.nullable(z.any())).optional(), + blackForestLabs: z.record(z.string(), z.nullable(z.any())).optional(), + byteplus: z.record(z.string(), z.nullable(z.any())).optional(), + centml: z.record(z.string(), z.nullable(z.any())).optional(), + cerebras: z.record(z.string(), z.nullable(z.any())).optional(), + chutes: z.record(z.string(), z.nullable(z.any())).optional(), + cirrascale: z.record(z.string(), z.nullable(z.any())).optional(), + clarifai: z.record(z.string(), z.nullable(z.any())).optional(), + cloudflare: z.record(z.string(), z.nullable(z.any())).optional(), + cohere: z.record(z.string(), z.nullable(z.any())).optional(), + crofai: z.record(z.string(), z.nullable(z.any())).optional(), + crusoe: z.record(z.string(), z.nullable(z.any())).optional(), + deepinfra: z.record(z.string(), z.nullable(z.any())).optional(), + deepseek: z.record(z.string(), z.nullable(z.any())).optional(), + enfer: z.record(z.string(), z.nullable(z.any())).optional(), + fakeProvider: z.record(z.string(), z.nullable(z.any())).optional(), + featherless: z.record(z.string(), z.nullable(z.any())).optional(), + fireworks: z.record(z.string(), z.nullable(z.any())).optional(), + friendli: z.record(z.string(), z.nullable(z.any())).optional(), + gmicloud: z.record(z.string(), z.nullable(z.any())).optional(), + googleAiStudio: z.record(z.string(), z.nullable(z.any())).optional(), + googleVertex: z.record(z.string(), z.nullable(z.any())).optional(), + gopomelo: z.record(z.string(), z.nullable(z.any())).optional(), + groq: z.record(z.string(), z.nullable(z.any())).optional(), + huggingface: z.record(z.string(), z.nullable(z.any())).optional(), + hyperbolic: z.record(z.string(), z.nullable(z.any())).optional(), + hyperbolicQuantized: z.record(z.string(), z.nullable(z.any())).optional(), + inception: z.record(z.string(), z.nullable(z.any())).optional(), + inceptron: z.record(z.string(), z.nullable(z.any())).optional(), + inferenceNet: z.record(z.string(), z.nullable(z.any())).optional(), + infermatic: z.record(z.string(), z.nullable(z.any())).optional(), + inflection: z.record(z.string(), z.nullable(z.any())).optional(), + inocloud: z.record(z.string(), z.nullable(z.any())).optional(), + ioNet: z.record(z.string(), z.nullable(z.any())).optional(), + ionstream: z.record(z.string(), z.nullable(z.any())).optional(), + klusterai: z.record(z.string(), z.nullable(z.any())).optional(), + lambda: z.record(z.string(), z.nullable(z.any())).optional(), + lepton: z.record(z.string(), z.nullable(z.any())).optional(), + liquid: z.record(z.string(), z.nullable(z.any())).optional(), + lynn: z.record(z.string(), z.nullable(z.any())).optional(), + lynnPrivate: z.record(z.string(), z.nullable(z.any())).optional(), + mancer: z.record(z.string(), z.nullable(z.any())).optional(), + mancerOld: z.record(z.string(), z.nullable(z.any())).optional(), + mara: z.record(z.string(), z.nullable(z.any())).optional(), + meta: z.record(z.string(), z.nullable(z.any())).optional(), + minimax: z.record(z.string(), z.nullable(z.any())).optional(), + mistral: z.record(z.string(), z.nullable(z.any())).optional(), + modal: z.record(z.string(), z.nullable(z.any())).optional(), + modelrun: z.record(z.string(), z.nullable(z.any())).optional(), + modular: z.record(z.string(), z.nullable(z.any())).optional(), + moonshotai: z.record(z.string(), z.nullable(z.any())).optional(), + morph: z.record(z.string(), z.nullable(z.any())).optional(), + ncompass: z.record(z.string(), z.nullable(z.any())).optional(), + nebius: z.record(z.string(), z.nullable(z.any())).optional(), + nextbit: z.record(z.string(), z.nullable(z.any())).optional(), + nineteen: z.record(z.string(), z.nullable(z.any())).optional(), + novita: z.record(z.string(), z.nullable(z.any())).optional(), + nvidia: z.record(z.string(), z.nullable(z.any())).optional(), + octoai: z.record(z.string(), z.nullable(z.any())).optional(), + openInference: z.record(z.string(), z.nullable(z.any())).optional(), + openai: z.record(z.string(), z.nullable(z.any())).optional(), + parasail: z.record(z.string(), z.nullable(z.any())).optional(), + perplexity: z.record(z.string(), z.nullable(z.any())).optional(), + phala: z.record(z.string(), z.nullable(z.any())).optional(), + recursal: z.record(z.string(), z.nullable(z.any())).optional(), + reflection: z.record(z.string(), z.nullable(z.any())).optional(), + reka: z.record(z.string(), z.nullable(z.any())).optional(), + relace: z.record(z.string(), z.nullable(z.any())).optional(), + replicate: z.record(z.string(), z.nullable(z.any())).optional(), + sambanova: z.record(z.string(), z.nullable(z.any())).optional(), + sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(), + seed: z.record(z.string(), z.nullable(z.any())).optional(), + sfCompute: z.record(z.string(), z.nullable(z.any())).optional(), + siliconflow: z.record(z.string(), z.nullable(z.any())).optional(), + sourceful: z.record(z.string(), z.nullable(z.any())).optional(), + stealth: z.record(z.string(), z.nullable(z.any())).optional(), + stepfun: z.record(z.string(), z.nullable(z.any())).optional(), + streamlake: z.record(z.string(), z.nullable(z.any())).optional(), + switchpoint: z.record(z.string(), z.nullable(z.any())).optional(), + targon: z.record(z.string(), z.nullable(z.any())).optional(), + together: z.record(z.string(), z.nullable(z.any())).optional(), + togetherLite: z.record(z.string(), z.nullable(z.any())).optional(), + ubicloud: z.record(z.string(), z.nullable(z.any())).optional(), + upstage: z.record(z.string(), z.nullable(z.any())).optional(), + venice: z.record(z.string(), z.nullable(z.any())).optional(), + wandb: z.record(z.string(), z.nullable(z.any())).optional(), + xai: z.record(z.string(), z.nullable(z.any())).optional(), + xiaomi: z.record(z.string(), z.nullable(z.any())).optional(), + zAi: z.record(z.string(), z.nullable(z.any())).optional(), + }).transform((v) => { + return remap$(v, { + oneai: "01ai", + aionLabs: "aion-labs", + amazonBedrock: "amazon-bedrock", + amazonNova: "amazon-nova", + arceeAi: "arcee-ai", + atlasCloud: "atlas-cloud", + blackForestLabs: "black-forest-labs", + fakeProvider: "fake-provider", + googleAiStudio: "google-ai-studio", + googleVertex: "google-vertex", + hyperbolicQuantized: "hyperbolic-quantized", + inferenceNet: "inference-net", + ioNet: "io-net", + lynnPrivate: "lynn-private", + mancerOld: "mancer-old", + openInference: "open-inference", + sambanovaCloaked: "sambanova-cloaked", + sfCompute: "sf-compute", + togetherLite: "together-lite", + zAi: "z-ai", + }); + }); + +export function optionsToJSON(options: Options): string { + return JSON.stringify(Options$outboundSchema.parse(options)); +} + +/** @internal */ +export type Provider$Outbound = { + options?: Options$Outbound | undefined; +}; + +/** @internal */ +export const Provider$outboundSchema: z.ZodType = z + .object({ + options: z.lazy(() => Options$outboundSchema).optional(), + }); + +export function providerToJSON(provider: Provider): string { + return JSON.stringify(Provider$outboundSchema.parse(provider)); +} + +/** @internal */ +export const Resolution$outboundSchema: z.ZodType = + openEnums.outboundSchema(Resolution); + +/** @internal */ +export type VideoGenerationRequest$Outbound = { + aspect_ratio?: string | undefined; + duration?: number | undefined; + frame_images?: Array | undefined; + generate_audio?: boolean | undefined; + input_references?: Array | undefined; + model: string; + prompt: string; + provider?: Provider$Outbound | undefined; + resolution?: string | undefined; + seed?: number | undefined; + size?: string | undefined; +}; + +/** @internal */ +export const VideoGenerationRequest$outboundSchema: z.ZodType< + VideoGenerationRequest$Outbound, + VideoGenerationRequest +> = z.object({ + aspectRatio: AspectRatio$outboundSchema.optional(), + duration: z.int().optional(), + frameImages: z.array(FrameImage$outboundSchema).optional(), + generateAudio: z.boolean().optional(), + inputReferences: z.array(ContentPartImage$outboundSchema).optional(), + model: z.string(), + prompt: z.string(), + provider: z.lazy(() => Provider$outboundSchema).optional(), + resolution: Resolution$outboundSchema.optional(), + seed: z.int().optional(), + size: z.string().optional(), +}).transform((v) => { + return remap$(v, { + aspectRatio: "aspect_ratio", + frameImages: "frame_images", + generateAudio: "generate_audio", + inputReferences: "input_references", + }); +}); + +export function videoGenerationRequestToJSON( + videoGenerationRequest: VideoGenerationRequest, +): string { + return JSON.stringify( + VideoGenerationRequest$outboundSchema.parse(videoGenerationRequest), + ); +} diff --git a/src/models/videogenerationresponse.ts b/src/models/videogenerationresponse.ts new file mode 100644 index 00000000..381fec48 --- /dev/null +++ b/src/models/videogenerationresponse.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0a96c6ee9eea + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + VideoGenerationUsage, + VideoGenerationUsage$inboundSchema, +} from "./videogenerationusage.js"; + +export const VideoGenerationResponseStatus = { + Pending: "pending", + InProgress: "in_progress", + Completed: "completed", + Failed: "failed", + Cancelled: "cancelled", + Expired: "expired", +} as const; +export type VideoGenerationResponseStatus = OpenEnum< + typeof VideoGenerationResponseStatus +>; + +export type VideoGenerationResponse = { + error?: string | undefined; + /** + * The generation ID associated with this video generation job. Available once the job has been processed. + */ + generationId?: string | undefined; + id: string; + pollingUrl: string; + status: VideoGenerationResponseStatus; + unsignedUrls?: Array | undefined; + /** + * Usage and cost information for the video generation. Available once the job has completed. + */ + usage?: VideoGenerationUsage | undefined; +}; + +/** @internal */ +export const VideoGenerationResponseStatus$inboundSchema: z.ZodType< + VideoGenerationResponseStatus, + unknown +> = openEnums.inboundSchema(VideoGenerationResponseStatus); + +/** @internal */ +export const VideoGenerationResponse$inboundSchema: z.ZodType< + VideoGenerationResponse, + unknown +> = z.object({ + error: z.string().optional(), + generation_id: z.string().optional(), + id: z.string(), + polling_url: z.string(), + status: VideoGenerationResponseStatus$inboundSchema, + unsigned_urls: z.array(z.string()).optional(), + usage: VideoGenerationUsage$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "generation_id": "generationId", + "polling_url": "pollingUrl", + "unsigned_urls": "unsignedUrls", + }); +}); + +export function videoGenerationResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VideoGenerationResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VideoGenerationResponse' from JSON`, + ); +} diff --git a/src/models/videogenerationusage.ts b/src/models/videogenerationusage.ts new file mode 100644 index 00000000..c5a62e9e --- /dev/null +++ b/src/models/videogenerationusage.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9a49f28f7c9c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Usage and cost information for the video generation. Available once the job has completed. + */ +export type VideoGenerationUsage = { + /** + * The cost of the video generation in USD. + */ + cost?: number | undefined; + /** + * Whether the request was made using a Bring Your Own Key configuration. + */ + isByok?: boolean | undefined; +}; + +/** @internal */ +export const VideoGenerationUsage$inboundSchema: z.ZodType< + VideoGenerationUsage, + unknown +> = z.object({ + cost: z.number().optional(), + is_byok: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_byok": "isByok", + }); +}); + +export function videoGenerationUsageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VideoGenerationUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VideoGenerationUsage' from JSON`, + ); +} diff --git a/src/models/videomodel.ts b/src/models/videomodel.ts new file mode 100644 index 00000000..c601a359 --- /dev/null +++ b/src/models/videomodel.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3761c095ec55 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const SupportedAspectRatio = { + OneHundredAndSixtyNine: "16:9", + NineHundredAndSixteen: "9:16", + Eleven: "1:1", + FortyThree: "4:3", + ThirtyFour: "3:4", + TwoHundredAndNineteen: "21:9", + NineHundredAndTwentyOne: "9:21", +} as const; +export type SupportedAspectRatio = OpenEnum; + +export const SupportedResolution = { + FourHundredAndEightyp: "480p", + SevenHundredAndTwentyp: "720p", + OneThousandAndEightyp: "1080p", + OneK: "1K", + TwoK: "2K", + FourK: "4K", +} as const; +export type SupportedResolution = OpenEnum; + +export const SupportedSize = { + FourHundredAndEightyx480: "480x480", + FourHundredAndEightyx640: "480x640", + FourHundredAndEightyx854: "480x854", + FourHundredAndEightyx1120: "480x1120", + SixHundredAndFortyx480: "640x480", + SevenHundredAndTwentyx720: "720x720", + SevenHundredAndTwentyx960: "720x960", + SevenHundredAndTwentyx1280: "720x1280", + SevenHundredAndTwentyx1680: "720x1680", + EightHundredAndFiftyFourx480: "854x480", + NineHundredAndSixtyx720: "960x720", + OneThousandAndEightyx1080: "1080x1080", + OneThousandAndEightyx1440: "1080x1440", + OneThousandAndEightyx1920: "1080x1920", + OneThousandAndEightyx2520: "1080x2520", + OneThousandOneHundredAndTwentyx480: "1120x480", + OneThousandTwoHundredAndEightyx720: "1280x720", + OneThousandFourHundredAndFortyx1080: "1440x1080", + OneThousandSixHundredAndEightyx720: "1680x720", + OneThousandNineHundredAndTwentyx1080: "1920x1080", + TwoThousandOneHundredAndSixtyx2160: "2160x2160", + TwoThousandOneHundredAndSixtyx2880: "2160x2880", + TwoThousandOneHundredAndSixtyx3840: "2160x3840", + TwoThousandOneHundredAndSixtyx5040: "2160x5040", + TwoThousandFiveHundredAndTwentyx1080: "2520x1080", + TwoThousandEightHundredAndEightyx2160: "2880x2160", + ThreeThousandEightHundredAndFortyx2160: "3840x2160", + FiveThousandAndFortyx2160: "5040x2160", +} as const; +export type SupportedSize = OpenEnum; + +export type VideoModel = { + /** + * List of parameters that are allowed to be passed through to the provider + */ + allowedPassthroughParameters: Array; + /** + * Canonical slug for the model + */ + canonicalSlug: string; + /** + * Unix timestamp of when the model was created + */ + created: number; + /** + * Description of the model + */ + description?: string | undefined; + /** + * Whether the model supports generating audio alongside video + */ + generateAudio: boolean | null; + /** + * Hugging Face model identifier, if applicable + */ + huggingFaceId?: string | null | undefined; + /** + * Unique identifier for the model + */ + id: string; + /** + * Display name of the model + */ + name: string; + /** + * Pricing SKUs with provider prefix stripped, values as strings + */ + pricingSkus?: { [k: string]: string } | null | undefined; + /** + * Whether the model supports deterministic generation via seed parameter + */ + seed: boolean | null; + /** + * Supported output aspect ratios + */ + supportedAspectRatios: Array | null; + /** + * Supported video durations in seconds + */ + supportedDurations: Array | null; + /** + * Supported output resolutions + */ + supportedResolutions: Array | null; + /** + * Supported output sizes (width x height) + */ + supportedSizes: Array | null; +}; + +/** @internal */ +export const SupportedAspectRatio$inboundSchema: z.ZodType< + SupportedAspectRatio, + unknown +> = openEnums.inboundSchema(SupportedAspectRatio); + +/** @internal */ +export const SupportedResolution$inboundSchema: z.ZodType< + SupportedResolution, + unknown +> = openEnums.inboundSchema(SupportedResolution); + +/** @internal */ +export const SupportedSize$inboundSchema: z.ZodType = + openEnums.inboundSchema(SupportedSize); + +/** @internal */ +export const VideoModel$inboundSchema: z.ZodType = z + .object({ + allowed_passthrough_parameters: z.array(z.string()), + canonical_slug: z.string(), + created: z.int(), + description: z.string().optional(), + generate_audio: z.nullable(z.boolean()), + hugging_face_id: z.nullable(z.string()).optional(), + id: z.string(), + name: z.string(), + pricing_skus: z.nullable(z.record(z.string(), z.string())).optional(), + seed: z.nullable(z.boolean()), + supported_aspect_ratios: z.nullable( + z.array(SupportedAspectRatio$inboundSchema), + ), + supported_durations: z.nullable(z.array(z.int())), + supported_resolutions: z.nullable( + z.array(SupportedResolution$inboundSchema), + ), + supported_sizes: z.nullable(z.array(SupportedSize$inboundSchema)), + }).transform((v) => { + return remap$(v, { + "allowed_passthrough_parameters": "allowedPassthroughParameters", + "canonical_slug": "canonicalSlug", + "generate_audio": "generateAudio", + "hugging_face_id": "huggingFaceId", + "pricing_skus": "pricingSkus", + "supported_aspect_ratios": "supportedAspectRatios", + "supported_durations": "supportedDurations", + "supported_resolutions": "supportedResolutions", + "supported_sizes": "supportedSizes", + }); + }); + +export function videoModelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VideoModel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VideoModel' from JSON`, + ); +} diff --git a/src/models/videomodelslistresponse.ts b/src/models/videomodelslistresponse.ts new file mode 100644 index 00000000..675a77fe --- /dev/null +++ b/src/models/videomodelslistresponse.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ddde944c8c8 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { VideoModel, VideoModel$inboundSchema } from "./videomodel.js"; + +export type VideoModelsListResponse = { + data: Array; +}; + +/** @internal */ +export const VideoModelsListResponse$inboundSchema: z.ZodType< + VideoModelsListResponse, + unknown +> = z.object({ + data: z.array(VideoModel$inboundSchema), +}); + +export function videoModelsListResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VideoModelsListResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VideoModelsListResponse' from JSON`, + ); +} diff --git a/src/models/websearchcallcompletedevent.ts b/src/models/websearchcallcompletedevent.ts index 0a723e66..fbd7470e 100644 --- a/src/models/websearchcallcompletedevent.ts +++ b/src/models/websearchcallcompletedevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Web search call completed */ export type WebSearchCallCompletedEvent = { - type: "response.web_search_call.completed"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.web_search_call.completed"; }; /** @internal */ @@ -24,10 +24,10 @@ export const WebSearchCallCompletedEvent$inboundSchema: z.ZodType< WebSearchCallCompletedEvent, unknown > = z.object({ - type: z.literal("response.web_search_call.completed"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.web_search_call.completed"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchcallinprogressevent.ts b/src/models/websearchcallinprogressevent.ts index 4bd03e61..92b5dde5 100644 --- a/src/models/websearchcallinprogressevent.ts +++ b/src/models/websearchcallinprogressevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Web search call in progress */ export type WebSearchCallInProgressEvent = { - type: "response.web_search_call.in_progress"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.web_search_call.in_progress"; }; /** @internal */ @@ -24,10 +24,10 @@ export const WebSearchCallInProgressEvent$inboundSchema: z.ZodType< WebSearchCallInProgressEvent, unknown > = z.object({ - type: z.literal("response.web_search_call.in_progress"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.web_search_call.in_progress"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchcallsearchingevent.ts b/src/models/websearchcallsearchingevent.ts index 38991ae4..c620f8dd 100644 --- a/src/models/websearchcallsearchingevent.ts +++ b/src/models/websearchcallsearchingevent.ts @@ -13,10 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; * Web search call is searching */ export type WebSearchCallSearchingEvent = { - type: "response.web_search_call.searching"; itemId: string; outputIndex: number; sequenceNumber: number; + type: "response.web_search_call.searching"; }; /** @internal */ @@ -24,10 +24,10 @@ export const WebSearchCallSearchingEvent$inboundSchema: z.ZodType< WebSearchCallSearchingEvent, unknown > = z.object({ - type: z.literal("response.web_search_call.searching"), item_id: z.string(), - output_index: z.number(), - sequence_number: z.number(), + output_index: z.int(), + sequence_number: z.int(), + type: z.literal("response.web_search_call.searching"), }).transform((v) => { return remap$(v, { "item_id": "itemId", diff --git a/src/models/websearchconfig.ts b/src/models/websearchconfig.ts new file mode 100644 index 00000000..43cbd57c --- /dev/null +++ b/src/models/websearchconfig.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d43f37b9a707 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + SearchQualityLevel, + SearchQualityLevel$outboundSchema, +} from "./searchqualitylevel.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; +import { + WebSearchUserLocationServerTool, + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool$outboundSchema, +} from "./websearchuserlocationservertool.js"; + +export type WebSearchConfig = { + /** + * Limit search results to these domains. Supported by Exa, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Firecrawl or Perplexity. + */ + allowedDomains?: Array | undefined; + /** + * 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. + */ + engine?: WebSearchEngineEnum | undefined; + /** + * Exclude search results from these domains. Supported by Exa, Parallel, Anthropic, and xAI. Not supported with Firecrawl, OpenAI (silently ignored), or Perplexity. + */ + excludedDomains?: Array | undefined; + /** + * 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. + */ + maxResults?: number | undefined; + /** + * 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. + */ + maxTotalResults?: number | undefined; + /** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ + searchContextSize?: SearchQualityLevel | undefined; + /** + * Approximate user location for location-biased results. + */ + userLocation?: WebSearchUserLocationServerTool | undefined; +}; + +/** @internal */ +export type WebSearchConfig$Outbound = { + allowed_domains?: Array | undefined; + engine?: string | undefined; + excluded_domains?: Array | undefined; + max_results?: number | undefined; + max_total_results?: number | undefined; + search_context_size?: string | undefined; + user_location?: WebSearchUserLocationServerTool$Outbound | undefined; +}; + +/** @internal */ +export const WebSearchConfig$outboundSchema: z.ZodType< + WebSearchConfig$Outbound, + WebSearchConfig +> = z.object({ + allowedDomains: z.array(z.string()).optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + excludedDomains: z.array(z.string()).optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), + searchContextSize: SearchQualityLevel$outboundSchema.optional(), + userLocation: WebSearchUserLocationServerTool$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + maxResults: "max_results", + maxTotalResults: "max_total_results", + searchContextSize: "search_context_size", + userLocation: "user_location", + }); +}); + +export function webSearchConfigToJSON( + webSearchConfig: WebSearchConfig, +): string { + return JSON.stringify(WebSearchConfig$outboundSchema.parse(webSearchConfig)); +} diff --git a/src/models/websearchdomainfilter.ts b/src/models/websearchdomainfilter.ts new file mode 100644 index 00000000..709be924 --- /dev/null +++ b/src/models/websearchdomainfilter.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 827204408f55 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type WebSearchDomainFilter = { + allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; +}; + +/** @internal */ +export const WebSearchDomainFilter$inboundSchema: z.ZodType< + WebSearchDomainFilter, + unknown +> = z.object({ + allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", + }); +}); +/** @internal */ +export type WebSearchDomainFilter$Outbound = { + allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; +}; + +/** @internal */ +export const WebSearchDomainFilter$outboundSchema: z.ZodType< + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter +> = z.object({ + allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchDomainFilterToJSON( + webSearchDomainFilter: WebSearchDomainFilter, +): string { + return JSON.stringify( + WebSearchDomainFilter$outboundSchema.parse(webSearchDomainFilter), + ); +} +export function webSearchDomainFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebSearchDomainFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebSearchDomainFilter' from JSON`, + ); +} diff --git a/src/models/websearchengineenum.ts b/src/models/websearchengineenum.ts new file mode 100644 index 00000000..309d906f --- /dev/null +++ b/src/models/websearchengineenum.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 273c8df02654 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * 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. + */ +export const WebSearchEngineEnum = { + Auto: "auto", + Native: "native", + Exa: "exa", + Firecrawl: "firecrawl", + Parallel: "parallel", +} as const; +/** + * 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. + */ +export type WebSearchEngineEnum = OpenEnum; + +/** @internal */ +export const WebSearchEngineEnum$inboundSchema: z.ZodType< + WebSearchEngineEnum, + unknown +> = openEnums.inboundSchema(WebSearchEngineEnum); +/** @internal */ +export const WebSearchEngineEnum$outboundSchema: z.ZodType< + string, + WebSearchEngineEnum +> = openEnums.outboundSchema(WebSearchEngineEnum); diff --git a/src/models/websearchplugin.ts b/src/models/websearchplugin.ts new file mode 100644 index 00000000..6eb326b4 --- /dev/null +++ b/src/models/websearchplugin.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fa32581277e2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + WebSearchEngine, + WebSearchEngine$outboundSchema, +} from "./websearchengine.js"; + +export type WebSearchPlugin = { + /** + * Set to false to disable the web-search plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * The search engine to use for web search. + */ + engine?: WebSearchEngine | undefined; + /** + * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + excludeDomains?: Array | undefined; + id: "web"; + /** + * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + includeDomains?: Array | undefined; + maxResults?: number | undefined; + searchPrompt?: string | undefined; +}; + +/** @internal */ +export type WebSearchPlugin$Outbound = { + enabled?: boolean | undefined; + engine?: string | undefined; + exclude_domains?: Array | undefined; + id: "web"; + include_domains?: Array | undefined; + max_results?: number | undefined; + search_prompt?: string | undefined; +}; + +/** @internal */ +export const WebSearchPlugin$outboundSchema: z.ZodType< + WebSearchPlugin$Outbound, + WebSearchPlugin +> = z.object({ + enabled: z.boolean().optional(), + engine: WebSearchEngine$outboundSchema.optional(), + excludeDomains: z.array(z.string()).optional(), + id: z.literal("web"), + includeDomains: z.array(z.string()).optional(), + maxResults: z.int().optional(), + searchPrompt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + excludeDomains: "exclude_domains", + includeDomains: "include_domains", + maxResults: "max_results", + searchPrompt: "search_prompt", + }); +}); + +export function webSearchPluginToJSON( + webSearchPlugin: WebSearchPlugin, +): string { + return JSON.stringify(WebSearchPlugin$outboundSchema.parse(webSearchPlugin)); +} diff --git a/src/models/websearchservertool.ts b/src/models/websearchservertool.ts index cd9a854f..e748880b 100644 --- a/src/models/websearchservertool.ts +++ b/src/models/websearchservertool.ts @@ -6,8 +6,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -15,6 +13,17 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSchema, } from "./searchcontextsizeenum.js"; +import { + WebSearchDomainFilter, + WebSearchDomainFilter$inboundSchema, + WebSearchDomainFilter$Outbound, + WebSearchDomainFilter$outboundSchema, +} from "./websearchdomainfilter.js"; +import { + WebSearchEngineEnum, + WebSearchEngineEnum$inboundSchema, + WebSearchEngineEnum$outboundSchema, +} from "./websearchengineenum.js"; import { WebSearchUserLocation, WebSearchUserLocation$inboundSchema, @@ -22,140 +31,56 @@ import { WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js"; -export type WebSearchServerToolFilters = { - allowedDomains?: Array | null | undefined; - excludedDomains?: Array | null | undefined; -}; - -/** - * 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. - */ -export const WebSearchServerToolEngine = { - Auto: "auto", - Native: "native", - Exa: "exa", - Firecrawl: "firecrawl", - Parallel: "parallel", -} as const; -/** - * 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. - */ -export type WebSearchServerToolEngine = OpenEnum< - typeof WebSearchServerToolEngine ->; - /** * Web search tool configuration (2025-08-26 version) */ export type WebSearchServerTool = { - type: "web_search_2025_08_26"; - filters?: WebSearchServerToolFilters | null | undefined; /** - * Size of the search context for web search tools + * 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. */ - searchContextSize?: SearchContextSizeEnum | undefined; + engine?: WebSearchEngineEnum | undefined; + filters?: WebSearchDomainFilter | null | undefined; /** - * User location information for web search + * 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. */ - userLocation?: WebSearchUserLocation | null | undefined; + maxResults?: number | undefined; /** - * 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. + * Size of the search context for web search tools */ - engine?: WebSearchServerToolEngine | undefined; + searchContextSize?: SearchContextSizeEnum | undefined; + type: "web_search_2025_08_26"; /** - * 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. + * User location information for web search */ - maxResults?: number | undefined; -}; - -/** @internal */ -export const WebSearchServerToolFilters$inboundSchema: z.ZodType< - WebSearchServerToolFilters, - unknown -> = z.object({ - allowed_domains: z.nullable(z.array(z.string())).optional(), - excluded_domains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "allowed_domains": "allowedDomains", - "excluded_domains": "excludedDomains", - }); -}); -/** @internal */ -export type WebSearchServerToolFilters$Outbound = { - allowed_domains?: Array | null | undefined; - excluded_domains?: Array | null | undefined; + userLocation?: WebSearchUserLocation | null | undefined; }; -/** @internal */ -export const WebSearchServerToolFilters$outboundSchema: z.ZodType< - WebSearchServerToolFilters$Outbound, - WebSearchServerToolFilters -> = z.object({ - allowedDomains: z.nullable(z.array(z.string())).optional(), - excludedDomains: z.nullable(z.array(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - allowedDomains: "allowed_domains", - excludedDomains: "excluded_domains", - }); -}); - -export function webSearchServerToolFiltersToJSON( - webSearchServerToolFilters: WebSearchServerToolFilters, -): string { - return JSON.stringify( - WebSearchServerToolFilters$outboundSchema.parse(webSearchServerToolFilters), - ); -} -export function webSearchServerToolFiltersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => WebSearchServerToolFilters$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'WebSearchServerToolFilters' from JSON`, - ); -} - -/** @internal */ -export const WebSearchServerToolEngine$inboundSchema: z.ZodType< - WebSearchServerToolEngine, - unknown -> = openEnums.inboundSchema(WebSearchServerToolEngine); -/** @internal */ -export const WebSearchServerToolEngine$outboundSchema: z.ZodType< - string, - WebSearchServerToolEngine -> = openEnums.outboundSchema(WebSearchServerToolEngine); - /** @internal */ export const WebSearchServerTool$inboundSchema: z.ZodType< WebSearchServerTool, unknown > = z.object({ - type: z.literal("web_search_2025_08_26"), - filters: z.nullable(z.lazy(() => WebSearchServerToolFilters$inboundSchema)) - .optional(), + engine: WebSearchEngineEnum$inboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(), + max_results: z.int().optional(), search_context_size: SearchContextSizeEnum$inboundSchema.optional(), + type: z.literal("web_search_2025_08_26"), user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(), - engine: WebSearchServerToolEngine$inboundSchema.optional(), - max_results: z.number().optional(), }).transform((v) => { return remap$(v, { + "max_results": "maxResults", "search_context_size": "searchContextSize", "user_location": "userLocation", - "max_results": "maxResults", }); }); /** @internal */ export type WebSearchServerTool$Outbound = { - type: "web_search_2025_08_26"; - filters?: WebSearchServerToolFilters$Outbound | null | undefined; - search_context_size?: string | undefined; - user_location?: WebSearchUserLocation$Outbound | null | undefined; engine?: string | undefined; + filters?: WebSearchDomainFilter$Outbound | null | undefined; max_results?: number | undefined; + search_context_size?: string | undefined; + type: "web_search_2025_08_26"; + user_location?: WebSearchUserLocation$Outbound | null | undefined; }; /** @internal */ @@ -163,18 +88,17 @@ export const WebSearchServerTool$outboundSchema: z.ZodType< WebSearchServerTool$Outbound, WebSearchServerTool > = z.object({ - type: z.literal("web_search_2025_08_26"), - filters: z.nullable(z.lazy(() => WebSearchServerToolFilters$outboundSchema)) - .optional(), + engine: WebSearchEngineEnum$outboundSchema.optional(), + filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(), + maxResults: z.int().optional(), searchContextSize: SearchContextSizeEnum$outboundSchema.optional(), + type: z.literal("web_search_2025_08_26"), userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(), - engine: WebSearchServerToolEngine$outboundSchema.optional(), - maxResults: z.number().optional(), }).transform((v) => { return remap$(v, { + maxResults: "max_results", searchContextSize: "search_context_size", userLocation: "user_location", - maxResults: "max_results", }); }); diff --git a/src/models/websearchservertoolopenrouter.ts b/src/models/websearchservertoolopenrouter.ts index 4b851e48..9fa129a7 100644 --- a/src/models/websearchservertoolopenrouter.ts +++ b/src/models/websearchservertoolopenrouter.ts @@ -6,7 +6,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -export type WebSearchServerToolOpenRouterParameters = { +export type ParametersT = { /** * Maximum number of search results to return per search call. Defaults to 5. */ @@ -21,23 +21,23 @@ export type WebSearchServerToolOpenRouterParameters = { * OpenRouter built-in server tool: searches the web for current information */ export type WebSearchServerToolOpenRouter = { + parameters?: ParametersT | undefined; type: "openrouter:web_search"; - parameters?: WebSearchServerToolOpenRouterParameters | undefined; }; /** @internal */ -export type WebSearchServerToolOpenRouterParameters$Outbound = { +export type ParametersT$Outbound = { max_results?: number | undefined; max_total_results?: number | undefined; }; /** @internal */ -export const WebSearchServerToolOpenRouterParameters$outboundSchema: z.ZodType< - WebSearchServerToolOpenRouterParameters$Outbound, - WebSearchServerToolOpenRouterParameters +export const ParametersT$outboundSchema: z.ZodType< + ParametersT$Outbound, + ParametersT > = z.object({ - maxResults: z.number().optional(), - maxTotalResults: z.number().optional(), + maxResults: z.int().optional(), + maxTotalResults: z.int().optional(), }).transform((v) => { return remap$(v, { maxResults: "max_results", @@ -45,21 +45,14 @@ export const WebSearchServerToolOpenRouterParameters$outboundSchema: z.ZodType< }); }); -export function webSearchServerToolOpenRouterParametersToJSON( - webSearchServerToolOpenRouterParameters: - WebSearchServerToolOpenRouterParameters, -): string { - return JSON.stringify( - WebSearchServerToolOpenRouterParameters$outboundSchema.parse( - webSearchServerToolOpenRouterParameters, - ), - ); +export function parametersToJSON(parametersT: ParametersT): string { + return JSON.stringify(ParametersT$outboundSchema.parse(parametersT)); } /** @internal */ export type WebSearchServerToolOpenRouter$Outbound = { + parameters?: ParametersT$Outbound | undefined; type: "openrouter:web_search"; - parameters?: WebSearchServerToolOpenRouterParameters$Outbound | undefined; }; /** @internal */ @@ -67,10 +60,8 @@ export const WebSearchServerToolOpenRouter$outboundSchema: z.ZodType< WebSearchServerToolOpenRouter$Outbound, WebSearchServerToolOpenRouter > = z.object({ + parameters: z.lazy(() => ParametersT$outboundSchema).optional(), type: z.literal("openrouter:web_search"), - parameters: z.lazy(() => - WebSearchServerToolOpenRouterParameters$outboundSchema - ).optional(), }); export function webSearchServerToolOpenRouterToJSON( diff --git a/src/models/websearchsource.ts b/src/models/websearchsource.ts new file mode 100644 index 00000000..d37ecd97 --- /dev/null +++ b/src/models/websearchsource.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2a64353a399c + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const WebSearchSourceType = { + Url: "url", +} as const; +export type WebSearchSourceType = ClosedEnum; + +export type WebSearchSource = { + type: WebSearchSourceType; + url: string; +}; + +/** @internal */ +export const WebSearchSourceType$inboundSchema: z.ZodEnum< + typeof WebSearchSourceType +> = z.enum(WebSearchSourceType); +/** @internal */ +export const WebSearchSourceType$outboundSchema: z.ZodEnum< + typeof WebSearchSourceType +> = WebSearchSourceType$inboundSchema; + +/** @internal */ +export const WebSearchSource$inboundSchema: z.ZodType< + WebSearchSource, + unknown +> = z.object({ + type: WebSearchSourceType$inboundSchema, + url: z.string(), +}); +/** @internal */ +export type WebSearchSource$Outbound = { + type: string; + url: string; +}; + +/** @internal */ +export const WebSearchSource$outboundSchema: z.ZodType< + WebSearchSource$Outbound, + WebSearchSource +> = z.object({ + type: WebSearchSourceType$outboundSchema, + url: z.string(), +}); + +export function webSearchSourceToJSON( + webSearchSource: WebSearchSource, +): string { + return JSON.stringify(WebSearchSource$outboundSchema.parse(webSearchSource)); +} +export function webSearchSourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebSearchSource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebSearchSource' from JSON`, + ); +} diff --git a/src/models/websearchuserlocation.ts b/src/models/websearchuserlocation.ts index 8c795978..0a3c2ea8 100644 --- a/src/models/websearchuserlocation.ts +++ b/src/models/websearchuserlocation.ts @@ -20,11 +20,11 @@ export type WebSearchUserLocationType = ClosedEnum< * User location information for web search */ export type WebSearchUserLocation = { - type?: WebSearchUserLocationType | undefined; city?: string | null | undefined; country?: string | null | undefined; region?: string | null | undefined; timezone?: string | null | undefined; + type?: WebSearchUserLocationType | undefined; }; /** @internal */ @@ -41,19 +41,19 @@ export const WebSearchUserLocation$inboundSchema: z.ZodType< WebSearchUserLocation, unknown > = z.object({ - type: WebSearchUserLocationType$inboundSchema.optional(), city: z.nullable(z.string()).optional(), country: z.nullable(z.string()).optional(), region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), + type: WebSearchUserLocationType$inboundSchema.optional(), }); /** @internal */ export type WebSearchUserLocation$Outbound = { - type?: string | undefined; city?: string | null | undefined; country?: string | null | undefined; region?: string | null | undefined; timezone?: string | null | undefined; + type?: string | undefined; }; /** @internal */ @@ -61,11 +61,11 @@ export const WebSearchUserLocation$outboundSchema: z.ZodType< WebSearchUserLocation$Outbound, WebSearchUserLocation > = z.object({ - type: WebSearchUserLocationType$outboundSchema.optional(), city: z.nullable(z.string()).optional(), country: z.nullable(z.string()).optional(), region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), + type: WebSearchUserLocationType$outboundSchema.optional(), }); export function webSearchUserLocationToJSON( diff --git a/src/models/websearchuserlocationservertool.ts b/src/models/websearchuserlocationservertool.ts new file mode 100644 index 00000000..083fd562 --- /dev/null +++ b/src/models/websearchuserlocationservertool.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d1b6cb4026ad + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; + +export const WebSearchUserLocationServerToolType = { + Approximate: "approximate", +} as const; +export type WebSearchUserLocationServerToolType = ClosedEnum< + typeof WebSearchUserLocationServerToolType +>; + +/** + * Approximate user location for location-biased results. + */ +export type WebSearchUserLocationServerTool = { + city?: string | undefined; + country?: string | undefined; + region?: string | undefined; + timezone?: string | undefined; + type?: WebSearchUserLocationServerToolType | undefined; +}; + +/** @internal */ +export const WebSearchUserLocationServerToolType$outboundSchema: z.ZodEnum< + typeof WebSearchUserLocationServerToolType +> = z.enum(WebSearchUserLocationServerToolType); + +/** @internal */ +export type WebSearchUserLocationServerTool$Outbound = { + city?: string | undefined; + country?: string | undefined; + region?: string | undefined; + timezone?: string | undefined; + type?: string | undefined; +}; + +/** @internal */ +export const WebSearchUserLocationServerTool$outboundSchema: z.ZodType< + WebSearchUserLocationServerTool$Outbound, + WebSearchUserLocationServerTool +> = z.object({ + city: z.string().optional(), + country: z.string().optional(), + region: z.string().optional(), + timezone: z.string().optional(), + type: WebSearchUserLocationServerToolType$outboundSchema.optional(), +}); + +export function webSearchUserLocationServerToolToJSON( + webSearchUserLocationServerTool: WebSearchUserLocationServerTool, +): string { + return JSON.stringify( + WebSearchUserLocationServerTool$outboundSchema.parse( + webSearchUserLocationServerTool, + ), + ); +} diff --git a/src/sdk/analytics.ts b/src/sdk/analytics.ts index 9e2e1788..353e5a58 100644 --- a/src/sdk/analytics.ts +++ b/src/sdk/analytics.ts @@ -5,6 +5,7 @@ import { analyticsGetUserActivity } from "../funcs/analyticsGetUserActivity.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; @@ -18,7 +19,7 @@ export class Analytics extends ClientSDK { async getUserActivity( request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(analyticsGetUserActivity( this, request, diff --git a/src/sdk/apikeys.ts b/src/sdk/apikeys.ts index 341780d8..19b6c7c2 100644 --- a/src/sdk/apikeys.ts +++ b/src/sdk/apikeys.ts @@ -14,6 +14,23 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class APIKeys extends ClientSDK { + /** + * Get current API key + * + * @remarks + * Get information on the API key associated with the current authentication session + */ + async getCurrentKeyMetadata( + request?: operations.GetCurrentKeyRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(apiKeysGetCurrentKeyMetadata( + this, + request, + options, + )); + } + /** * List API keys * @@ -48,23 +65,6 @@ export class APIKeys extends ClientSDK { )); } - /** - * Update an API key - * - * @remarks - * Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. - */ - async update( - request: operations.UpdateKeysRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(apiKeysUpdate( - this, - request, - options, - )); - } - /** * Delete an API key * @@ -100,16 +100,16 @@ export class APIKeys extends ClientSDK { } /** - * Get current API key + * Update an API key * * @remarks - * 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. */ - async getCurrentKeyMetadata( - request?: operations.GetCurrentKeyRequest | undefined, + async update( + request: operations.UpdateKeysRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(apiKeysGetCurrentKeyMetadata( + ): Promise { + return unwrapAsync(apiKeysUpdate( this, request, options, diff --git a/src/sdk/credits.ts b/src/sdk/credits.ts index 02416394..02d1a2d4 100644 --- a/src/sdk/credits.ts +++ b/src/sdk/credits.ts @@ -3,7 +3,6 @@ * @generated-id: c72074b5f165 */ -import { creditsCreateCoinbaseCharge } from "../funcs/creditsCreateCoinbaseCharge.js"; import { creditsGetCredits } from "../funcs/creditsGetCredits.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; @@ -26,23 +25,4 @@ export class Credits extends ClientSDK { options, )); } - - /** - * Create a Coinbase charge for crypto payment - * - * @remarks - * Create a Coinbase charge for crypto payment - */ - async createCoinbaseCharge( - security: operations.CreateCoinbaseChargeSecurity, - request: operations.CreateCoinbaseChargeRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(creditsCreateCoinbaseCharge( - this, - security, - request, - options, - )); - } } diff --git a/src/sdk/endpoints.ts b/src/sdk/endpoints.ts index a9eb9068..38d8efb3 100644 --- a/src/sdk/endpoints.ts +++ b/src/sdk/endpoints.ts @@ -11,13 +11,13 @@ import { unwrapAsync } from "../types/fp.js"; export class Endpoints extends ClientSDK { /** - * List all endpoints for a model + * Preview the impact of ZDR on the available endpoints */ - async list( - request: operations.ListEndpointsRequest, + async listZdrEndpoints( + request?: operations.ListEndpointsZdrRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(endpointsList( + ): Promise { + return unwrapAsync(endpointsListZdrEndpoints( this, request, options, @@ -25,13 +25,13 @@ export class Endpoints extends ClientSDK { } /** - * Preview the impact of ZDR on the available endpoints + * List all endpoints for a model */ - async listZdrEndpoints( - request?: operations.ListEndpointsZdrRequest | undefined, + async list( + request: operations.ListEndpointsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(endpointsListZdrEndpoints( + ): Promise { + return unwrapAsync(endpointsList( this, request, options, diff --git a/src/sdk/guardrails.ts b/src/sdk/guardrails.ts index 3ea2dbba..d216397b 100644 --- a/src/sdk/guardrails.ts +++ b/src/sdk/guardrails.ts @@ -17,8 +17,10 @@ import { guardrailsListKeyAssignments } from "../funcs/guardrailsListKeyAssignme import { guardrailsListMemberAssignments } from "../funcs/guardrailsListMemberAssignments.js"; import { guardrailsUpdate } from "../funcs/guardrailsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; +import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Guardrails extends ClientSDK { /** @@ -30,8 +32,10 @@ export class Guardrails extends ClientSDK { async list( request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsList( + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsList( this, request, options, @@ -47,7 +51,7 @@ export class Guardrails extends ClientSDK { async create( request: operations.CreateGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsCreate( this, request, @@ -55,40 +59,6 @@ export class Guardrails extends ClientSDK { )); } - /** - * Get a guardrail - * - * @remarks - * Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. - */ - async get( - request: operations.GetGuardrailRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsGet( - this, - request, - options, - )); - } - - /** - * Update a guardrail - * - * @remarks - * Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. - */ - async update( - request: operations.UpdateGuardrailRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsUpdate( - this, - request, - options, - )); - } - /** * Delete a guardrail * @@ -98,7 +68,7 @@ export class Guardrails extends ClientSDK { async delete( request: operations.DeleteGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsDelete( this, request, @@ -107,16 +77,16 @@ export class Guardrails extends ClientSDK { } /** - * List all key assignments + * Get a guardrail * * @remarks - * 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. */ - async listKeyAssignments( - request?: operations.ListKeyAssignmentsRequest | undefined, + async get( + request: operations.GetGuardrailRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListKeyAssignments( + ): Promise { + return unwrapAsync(guardrailsGet( this, request, options, @@ -124,16 +94,16 @@ export class Guardrails extends ClientSDK { } /** - * List all member assignments + * Update a guardrail * * @remarks - * 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. */ - async listMemberAssignments( - request?: operations.ListMemberAssignmentsRequest | undefined, + async update( + request: operations.UpdateGuardrailRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListMemberAssignments( + ): Promise { + return unwrapAsync(guardrailsUpdate( this, request, options, @@ -149,8 +119,13 @@ export class Guardrails extends ClientSDK { async listGuardrailKeyAssignments( request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListGuardrailKeyAssignments( + ): Promise< + PageIterator< + operations.ListGuardrailKeyAssignmentsResponse, + { offset: number } + > + > { + return unwrapResultIterator(guardrailsListGuardrailKeyAssignments( this, request, options, @@ -166,7 +141,7 @@ export class Guardrails extends ClientSDK { async bulkAssignKeys( request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkAssignKeys( this, request, @@ -174,6 +149,23 @@ export class Guardrails extends ClientSDK { )); } + /** + * Bulk unassign keys from a guardrail + * + * @remarks + * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async bulkUnassignKeys( + request: operations.BulkUnassignKeysFromGuardrailRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(guardrailsBulkUnassignKeys( + this, + request, + options, + )); + } + /** * List member assignments for a guardrail * @@ -183,8 +175,13 @@ export class Guardrails extends ClientSDK { async listGuardrailMemberAssignments( request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsListGuardrailMemberAssignments( + ): Promise< + PageIterator< + operations.ListGuardrailMemberAssignmentsResponse, + { offset: number } + > + > { + return unwrapResultIterator(guardrailsListGuardrailMemberAssignments( this, request, options, @@ -200,7 +197,7 @@ export class Guardrails extends ClientSDK { async bulkAssignMembers( request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(guardrailsBulkAssignMembers( this, request, @@ -209,16 +206,16 @@ export class Guardrails extends ClientSDK { } /** - * Bulk unassign keys from a guardrail + * Bulk unassign members from a guardrail * * @remarks - * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ - async bulkUnassignKeys( - request: operations.BulkUnassignKeysFromGuardrailRequest, + async bulkUnassignMembers( + request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsBulkUnassignKeys( + ): Promise { + return unwrapAsync(guardrailsBulkUnassignMembers( this, request, options, @@ -226,16 +223,37 @@ export class Guardrails extends ClientSDK { } /** - * Bulk unassign members from a guardrail + * List all key assignments * * @remarks - * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ - async bulkUnassignMembers( - request: operations.BulkUnassignMembersFromGuardrailRequest, + async listKeyAssignments( + request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(guardrailsBulkUnassignMembers( + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsListKeyAssignments( + this, + request, + options, + )); + } + + /** + * List all member assignments + * + * @remarks + * List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async listMemberAssignments( + request?: operations.ListMemberAssignmentsRequest | undefined, + options?: RequestOptions, + ): Promise< + PageIterator + > { + return unwrapResultIterator(guardrailsListMemberAssignments( this, request, options, diff --git a/src/sdk/models.ts b/src/sdk/models.ts index 38e9602d..2be770bc 100644 --- a/src/sdk/models.ts +++ b/src/sdk/models.ts @@ -13,13 +13,13 @@ import { unwrapAsync } from "../types/fp.js"; export class Models extends ClientSDK { /** - * Get total count of available models + * List all models and their properties */ - async count( - request?: operations.ListModelsCountRequest | undefined, + async list( + request?: operations.GetModelsRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(modelsCount( + ): Promise { + return unwrapAsync(modelsList( this, request, options, @@ -27,13 +27,13 @@ export class Models extends ClientSDK { } /** - * List all models and their properties + * Get total count of available models */ - async list( - request?: operations.GetModelsRequest | undefined, + async count( + request?: operations.ListModelsCountRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(modelsList( + ): Promise { + return unwrapAsync(modelsCount( this, request, options, @@ -44,7 +44,7 @@ export class Models extends ClientSDK { * List models filtered by user provider preferences, privacy settings, and guardrails * * @remarks - * 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). */ async listForUser( security: operations.ListModelsUserSecurity, diff --git a/src/sdk/organization.ts b/src/sdk/organization.ts new file mode 100644 index 00000000..b64a1110 --- /dev/null +++ b/src/sdk/organization.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 976de6f449fe + */ + +import { organizationListMembers } from "../funcs/organizationListMembers.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { PageIterator, unwrapResultIterator } from "../types/operations.js"; + +export class Organization extends ClientSDK { + /** + * List organization members + * + * @remarks + * List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async listMembers( + request?: operations.ListOrganizationMembersRequest | undefined, + options?: RequestOptions, + ): Promise< + PageIterator + > { + return unwrapResultIterator(organizationListMembers( + this, + request, + options, + )); + } +} diff --git a/src/sdk/rerank.ts b/src/sdk/rerank.ts new file mode 100644 index 00000000..9cedd8f2 --- /dev/null +++ b/src/sdk/rerank.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0d5a42c2eac3 + */ + +import { rerankRerank } from "../funcs/rerankRerank.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Rerank extends ClientSDK { + /** + * Submit a rerank request + * + * @remarks + * Submits a rerank request to the rerank router + */ + async rerank( + request: operations.CreateRerankRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(rerankRerank( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index c838f2bd..cc38a681 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -15,7 +15,10 @@ import { Generations } from "./generations.js"; import { Guardrails } from "./guardrails.js"; import { Models } from "./models.js"; import { OAuth } from "./oauth.js"; +import { Organization } from "./organization.js"; import { Providers } from "./providers.js"; +import { Rerank } from "./rerank.js"; +import { VideoGeneration } from "./videogeneration.js"; // #region imports import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core"; import { @@ -30,16 +33,16 @@ export { ToolType }; // #endregion imports export class OpenRouter extends ClientSDK { - private _beta?: Beta; - get beta(): Beta { - return (this._beta ??= new Beta(this._options)); - } - private _analytics?: Analytics; get analytics(): Analytics { return (this._analytics ??= new Analytics(this._options)); } + private _oAuth?: OAuth; + get oAuth(): OAuth { + return (this._oAuth ??= new OAuth(this._options)); + } + private _chat?: Chat; get chat(): Chat { return (this._chat ??= new Chat(this._options)); @@ -55,19 +58,34 @@ export class OpenRouter extends ClientSDK { return (this._embeddings ??= new Embeddings(this._options)); } + private _endpoints?: Endpoints; + get endpoints(): Endpoints { + return (this._endpoints ??= new Endpoints(this._options)); + } + private _generations?: Generations; get generations(): Generations { return (this._generations ??= new Generations(this._options)); } + private _guardrails?: Guardrails; + get guardrails(): Guardrails { + return (this._guardrails ??= new Guardrails(this._options)); + } + + private _apiKeys?: APIKeys; + get apiKeys(): APIKeys { + return (this._apiKeys ??= new APIKeys(this._options)); + } + private _models?: Models; get models(): Models { return (this._models ??= new Models(this._options)); } - private _endpoints?: Endpoints; - get endpoints(): Endpoints { - return (this._endpoints ??= new Endpoints(this._options)); + private _organization?: Organization; + get organization(): Organization { + return (this._organization ??= new Organization(this._options)); } private _providers?: Providers; @@ -75,19 +93,19 @@ export class OpenRouter extends ClientSDK { return (this._providers ??= new Providers(this._options)); } - private _apiKeys?: APIKeys; - get apiKeys(): APIKeys { - return (this._apiKeys ??= new APIKeys(this._options)); + private _rerank?: Rerank; + get rerank(): Rerank { + return (this._rerank ??= new Rerank(this._options)); } - private _guardrails?: Guardrails; - get guardrails(): Guardrails { - return (this._guardrails ??= new Guardrails(this._options)); + private _beta?: Beta; + get beta(): Beta { + return (this._beta ??= new Beta(this._options)); } - private _oAuth?: OAuth; - get oAuth(): OAuth { - return (this._oAuth ??= new OAuth(this._options)); + private _videoGeneration?: VideoGeneration; + get videoGeneration(): VideoGeneration { + return (this._videoGeneration ??= new VideoGeneration(this._options)); } // #region sdk-class-body diff --git a/src/sdk/videogeneration.ts b/src/sdk/videogeneration.ts new file mode 100644 index 00000000..1e832bb7 --- /dev/null +++ b/src/sdk/videogeneration.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: db34eab5bd5b + */ + +import { videoGenerationGenerate } from "../funcs/videoGenerationGenerate.js"; +import { videoGenerationGetGeneration } from "../funcs/videoGenerationGetGeneration.js"; +import { videoGenerationGetVideoContent } from "../funcs/videoGenerationGetVideoContent.js"; +import { videoGenerationListVideosModels } from "../funcs/videoGenerationListVideosModels.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class VideoGeneration extends ClientSDK { + /** + * Submit a video generation request + * + * @remarks + * Submits a video generation request and returns a polling URL to check status + */ + async generate( + request: operations.CreateVideosRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(videoGenerationGenerate( + this, + request, + options, + )); + } + + /** + * Poll video generation status + * + * @remarks + * Returns job status and content URLs when completed + */ + async getGeneration( + request: operations.GetVideosRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(videoGenerationGetGeneration( + this, + request, + options, + )); + } + + /** + * Download generated video content + * + * @remarks + * Streams the generated video content from the upstream provider + */ + async getVideoContent( + request: operations.ListVideosContentRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(videoGenerationGetVideoContent( + this, + request, + options, + )); + } + + /** + * List all video generation models + * + * @remarks + * Returns a list of all available video generation models and their properties + */ + async listVideosModels( + request?: operations.ListVideosModelsRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(videoGenerationListVideosModels( + this, + request, + options, + )); + } +}