From dbddf566075bf33497dff8e887d8d7d7299ec417 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 24 Jun 2026 00:56:29 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Typescript=20SDK=20Changes:=20*=20`ope?= =?UTF-8?q?nrouter.videoGeneration.generate()`:=20=20=20*=20=20`request.vi?= =?UTF-8?q?deoGenerationRequest`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`openrouter.chat.send()`:=20=20=20*=20=20`requ?= =?UTF-8?q?est.chatRequest`=20**Changed**=20=20=20*=20=20`response`=20**Ch?= =?UTF-8?q?anged**=20*=20`openrouter.presets.createPresetsResponses()`:=20?= =?UTF-8?q?=20=20*=20=20`request.responsesRequest`=20**Changed**=20*=20`op?= =?UTF-8?q?enrouter.images.listModels()`:=20**Added**=20*=20`openrouter.im?= =?UTF-8?q?ages.listModelEndpoints()`:=20**Added**=20*=20`openrouter.datas?= =?UTF-8?q?ets.getBenchmarksArtificialAnalysis()`:=20**Removed**=20(Breaki?= =?UTF-8?q?ng=20=E2=9A=A0=EF=B8=8F)=20*=20`openrouter.datasets.getBenchmar?= =?UTF-8?q?ksDesignArena()`:=20**Removed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`openrouter.beta.responses.send()`:=20=20=20*?= =?UTF-8?q?=20=20`request.responsesRequest`=20**Changed**=20=20=20*=20=20`?= =?UTF-8?q?response`=20**Changed**=20*=20`openrouter.tts.createSpeech()`:?= =?UTF-8?q?=20=20=20*=20=20`request.speechRequest.provider.options.tenstor?= =?UTF-8?q?rent`=20**Added**=20*=20`openrouter.stt.createTranscription()`:?= =?UTF-8?q?=20=20=20*=20=20`request.sttRequest.provider.options.tenstorren?= =?UTF-8?q?t`=20**Added**=20*=20`openrouter.byok.list()`:=20=20=20*=20=20`?= =?UTF-8?q?request.provider`=20**Changed**=20=20=20*=20=20`response.data[]?= =?UTF-8?q?.provider.enum(tenstorrent)`=20**Added**=20*=20`openrouter.byok?= =?UTF-8?q?.create()`:=20=20=20*=20=20`request.createByokKeyRequest.provid?= =?UTF-8?q?er.enum(tenstorrent)`=20**Added**=20=20=20*=20=20`response.data?= =?UTF-8?q?.provider.enum(tenstorrent)`=20**Added**=20*=20`openrouter.embe?= =?UTF-8?q?ddings.generate()`:=20=20=20*=20=20`request.requestBody.provide?= =?UTF-8?q?r.ignore[].union(ProviderName).enum(tenstorrent)`=20**Added**?= =?UTF-8?q?=20=20=20*=20=20`response.usage`=20**Changed**=20*=20`openroute?= =?UTF-8?q?r.images.generate()`:=20**Added**=20*=20`openrouter.byok.update?= =?UTF-8?q?()`:=20=20`response.data.provider.enum(tenstorrent)`=20**Added*?= =?UTF-8?q?*=20*=20`openrouter.byok.get()`:=20=20`response.data.provider.e?= =?UTF-8?q?num(tenstorrent)`=20**Added**=20*=20`openrouter.embeddings.list?= =?UTF-8?q?Models()`:=20=20`response.data[].reasoning`=20**Added**=20*=20`?= =?UTF-8?q?openrouter.endpoints.listZdrEndpoints()`:=20=20`response.data[]?= =?UTF-8?q?.providerName.enum(tenstorrent)`=20**Added**=20*=20`openrouter.?= =?UTF-8?q?endpoints.list()`:=20=20`response.data.endpoints[].providerName?= =?UTF-8?q?.enum(tenstorrent)`=20**Added**=20*=20`openrouter.generations.g?= =?UTF-8?q?etGeneration()`:=20=20`response.data.providerResponses[].provid?= =?UTF-8?q?erName.enum(tenstorrent)`=20**Added**=20*=20`openrouter.models.?= =?UTF-8?q?get()`:=20=20`response.data.reasoning`=20**Added**=20*=20`openr?= =?UTF-8?q?outer.models.list()`:=20=20`response.data[].reasoning`=20**Adde?= =?UTF-8?q?d**=20*=20`openrouter.models.listForUser()`:=20=20`response.dat?= =?UTF-8?q?a[].reasoning`=20**Added**=20*=20`openrouter.presets.createPres?= =?UTF-8?q?etsChatCompletions()`:=20=20=20*=20=20`request.chatRequest`=20*?= =?UTF-8?q?*Changed**=20*=20`openrouter.presets.createPresetsMessages()`:?= =?UTF-8?q?=20=20=20*=20=20`request.messagesRequest.provider.ignore[].unio?= =?UTF-8?q?n(ProviderName).enum(tenstorrent)`=20**Added**=20*=20`openroute?= =?UTF-8?q?r.benchmarks.getBenchmarks()`:=20**Added**=20*=20`openrouter.re?= =?UTF-8?q?rank.rerank()`:=20=20=20*=20=20`request.requestBody.provider.ig?= =?UTF-8?q?nore[].union(ProviderName).enum(tenstorrent)`=20**Added**=20*?= =?UTF-8?q?=20`openrouter.classifications.getTaskClassifications()`:=20**A?= =?UTF-8?q?dded**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 975 ++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 2890 ++++++++++++----- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/completiontokensdetails.md | 20 - docs/models/errort.md | 21 - docs/models/model.md | 1 + docs/models/prompttokensdetails.md | 20 - docs/models/providername.md | 2 +- jsr.json | 2 +- package.json | 14 +- ...ignArena.ts => benchmarksGetBenchmarks.ts} | 29 +- ... classificationsGetTaskClassifications.ts} | 49 +- src/funcs/imagesGenerate.ts | 325 ++ src/funcs/imagesListModelEndpoints.ts | 214 ++ src/funcs/imagesListModels.ts | 198 ++ src/lib/config.ts | 4 +- src/models/advisorreasoning.ts | 1 + .../anthropicadvisormessageusageiteration.ts | 71 + .../anthropiccompactionusageiteration.ts | 68 + src/models/anthropiciterationcachecreation.ts | 39 + src/models/anthropicmessageusageiteration.ts | 70 + src/models/anthropicspeed.ts | 18 + src/models/anthropicunknownusageiteration.ts | 55 + src/models/anthropicusageiteration.ts | 52 + src/models/apierrortype.ts | 49 + src/models/benchmarksaameta.ts | 119 - src/models/benchmarksaaresponse.ts | 41 - src/models/benchmarksdameta.ts | 165 - src/models/benchmarksdaresponse.ts | 41 - src/models/booleancapability.ts | 34 + src/models/byokproviderslug.ts | 1 + src/models/capabilitydescriptor.ts | 52 + src/models/chatrequest.ts | 2 + src/models/chatstreamchunk.ts | 63 +- src/models/chatusage.ts | 88 +- src/models/contentpartimage.ts | 17 +- src/models/debugevent.ts | 108 + src/models/enumcapability.ts | 34 + src/models/fusionservertoolconfig.ts | 13 + src/models/imageendpoint.ts | 83 + src/models/imagegencompletedevent.ts | 61 + src/models/imagegenerationrequest.ts | 687 ++++ src/models/imagegenerationresponse.ts | 81 + src/models/imagegenerationservertool.ts | 72 +- src/models/imagegenerationusage.ts | 266 ++ src/models/imagegenpartialimageevent.ts | 53 + src/models/imagegenstreamerrorevent.ts | 85 + src/models/imagemodelarchitecture.ts | 50 + src/models/imagemodelendpointsresponse.ts | 40 + src/models/imagemodellistitem.ts | 83 + src/models/imagemodelslistresponse.ts | 38 + src/models/imageoutputmodality.ts | 26 + src/models/imagepricingentry.ts | 71 + src/models/imagestreamingresponse.ts | 90 + src/models/index.ts | 44 +- src/models/inputreference.ts | 8 +- src/models/messagesrequest.ts | 34 +- src/models/model.ts | 9 + src/models/modelreasoning.ts | 89 + src/models/observabilityarizedestination.ts | 3 + src/models/openresponsesresult.ts | 7 + src/models/operations/createembeddings.ts | 45 + src/models/operations/createimages.ts | 122 + src/models/operations/getbenchmarks.ts | 164 + ...signarena.ts => gettaskclassifications.ts} | 61 +- src/models/operations/index.ts | 7 +- src/models/operations/listbyokkeys.ts | 1 + ...analysis.ts => listimagemodelendpoints.ts} | 38 +- src/models/operations/listimagemodels.ts | 80 + src/models/providername.ts | 1 + src/models/provideroptions.ts | 3 + src/models/providerresponse.ts | 1 + src/models/rangecapability.ts | 38 + src/models/reasoningeffort.ts | 1 + src/models/responsesrequest.ts | 11 + src/models/streamevents.ts | 3 + src/models/subagentreasoning.ts | 1 + src/models/taskclassificationitem.ts | 83 + src/models/taskclassificationmacrocategory.ts | 55 + src/models/taskclassificationmodel.ts | 50 + src/models/taskclassificationresponse.ts | 86 + ...kpricing.ts => unifiedbenchmarkpricing.ts} | 16 +- ...ksaaitem.ts => unifiedbenchmarksaaitem.ts} | 45 +- ...ksdaitem.ts => unifiedbenchmarksdaitem.ts} | 35 +- src/models/unifiedbenchmarksmeta.ts | 108 + src/models/unifiedbenchmarksresponse.ts | 80 + src/models/videogenerationrequest.ts | 340 +- src/sdk/benchmarks.ts | 29 + src/sdk/classifications.ts | 47 + src/sdk/datasets.ts | 36 - src/sdk/images.ts | 82 + src/sdk/sdk.ts | 18 + 94 files changed, 7847 insertions(+), 1809 deletions(-) delete mode 100644 docs/models/completiontokensdetails.md delete mode 100644 docs/models/errort.md delete mode 100644 docs/models/prompttokensdetails.md rename src/funcs/{datasetsGetBenchmarksDesignArena.ts => benchmarksGetBenchmarks.ts} (85%) rename src/funcs/{datasetsGetBenchmarksArtificialAnalysis.ts => classificationsGetTaskClassifications.ts} (77%) create mode 100644 src/funcs/imagesGenerate.ts create mode 100644 src/funcs/imagesListModelEndpoints.ts create mode 100644 src/funcs/imagesListModels.ts create mode 100644 src/models/anthropicadvisormessageusageiteration.ts create mode 100644 src/models/anthropiccompactionusageiteration.ts create mode 100644 src/models/anthropiciterationcachecreation.ts create mode 100644 src/models/anthropicmessageusageiteration.ts create mode 100644 src/models/anthropicspeed.ts create mode 100644 src/models/anthropicunknownusageiteration.ts create mode 100644 src/models/anthropicusageiteration.ts create mode 100644 src/models/apierrortype.ts delete mode 100644 src/models/benchmarksaameta.ts delete mode 100644 src/models/benchmarksaaresponse.ts delete mode 100644 src/models/benchmarksdameta.ts delete mode 100644 src/models/benchmarksdaresponse.ts create mode 100644 src/models/booleancapability.ts create mode 100644 src/models/capabilitydescriptor.ts create mode 100644 src/models/debugevent.ts create mode 100644 src/models/enumcapability.ts create mode 100644 src/models/imageendpoint.ts create mode 100644 src/models/imagegencompletedevent.ts create mode 100644 src/models/imagegenerationrequest.ts create mode 100644 src/models/imagegenerationresponse.ts create mode 100644 src/models/imagegenerationusage.ts create mode 100644 src/models/imagegenpartialimageevent.ts create mode 100644 src/models/imagegenstreamerrorevent.ts create mode 100644 src/models/imagemodelarchitecture.ts create mode 100644 src/models/imagemodelendpointsresponse.ts create mode 100644 src/models/imagemodellistitem.ts create mode 100644 src/models/imagemodelslistresponse.ts create mode 100644 src/models/imageoutputmodality.ts create mode 100644 src/models/imagepricingentry.ts create mode 100644 src/models/imagestreamingresponse.ts create mode 100644 src/models/modelreasoning.ts create mode 100644 src/models/operations/createimages.ts create mode 100644 src/models/operations/getbenchmarks.ts rename src/models/operations/{getbenchmarksdesignarena.ts => gettaskclassifications.ts} (52%) rename src/models/operations/{getbenchmarksartificialanalysis.ts => listimagemodelendpoints.ts} (68%) create mode 100644 src/models/operations/listimagemodels.ts create mode 100644 src/models/rangecapability.ts create mode 100644 src/models/taskclassificationitem.ts create mode 100644 src/models/taskclassificationmacrocategory.ts create mode 100644 src/models/taskclassificationmodel.ts create mode 100644 src/models/taskclassificationresponse.ts rename src/models/{benchmarkpricing.ts => unifiedbenchmarkpricing.ts} (63%) rename src/models/{benchmarksaaitem.ts => unifiedbenchmarksaaitem.ts} (63%) rename src/models/{benchmarksdaitem.ts => unifiedbenchmarksdaitem.ts} (76%) create mode 100644 src/models/unifiedbenchmarksmeta.ts create mode 100644 src/models/unifiedbenchmarksresponse.ts create mode 100644 src/sdk/benchmarks.ts create mode 100644 src/sdk/classifications.ts create mode 100644 src/sdk/images.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ba703761e..a481a35a7 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: 2ef06fd2320bafc1b28e6e4d52616e29 + docChecksum: 9e683eee58ad3d5038564ada31fdfae6 docVersion: 1.0.0 speakeasyVersion: 1.763.2 generationVersion: 2.884.4 - releaseVersion: 0.13.12 - configChecksum: df40f2fa0fbe104751d246b5a8f79c3c + releaseVersion: 0.13.13 + configChecksum: 86085347fb631155905bfa7ed4c877b0 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: 165c7888-5c5f-43bd-b1fc-eacce9e561d8 - pristine_commit_hash: 31af541d591883c304f6090b47def0549b166824 - pristine_tree_hash: 8b2a5a161fb7bd8ecd2758fbc26e26090f22faa1 + generation_id: 7743320b-ad5b-492c-9106-3fc96454dc22 + pristine_commit_hash: e71f113e6c9e7e980065b9436ff3ca2414e4e05b + pristine_tree_hash: c56d08e9f7b12bf8b234850448c85a53111d84ea features: typescript: acceptHeaders: 2.81.2 @@ -138,8 +138,8 @@ trackedFiles: deleted: true docs/models/advisorreasoningeffort.md: id: 7046a4b6294b - last_write_checksum: sha1:f25c04c2ca29757ad2ab6155e7a8403d1587d762 - pristine_git_object: b28bf2fd8d6059a37fdf59dab7c237397a1444ba + last_write_checksum: sha1:4f61177175da88d9b434ef2222099ce40801bf94 + pristine_git_object: 36218d73cc130ce68f8cac3bc1ba24caaa99d8f4 deleted: true docs/models/advisorservertoolconfig.md: id: 2a17b0912f54 @@ -181,6 +181,14 @@ trackedFiles: last_write_checksum: sha1:787168d345b8bf4cc60ce56e4fbfe9c9985ba2c2 pristine_git_object: 66b2198b8148f5d1c325d86a0f5f63ac5a3a6ff1 deleted: true + docs/models/anthropicadvisormessageusageiteration.md: + id: 42f357aa06ea + last_write_checksum: sha1:3cf3d897195b125f9fbf4e7c512fdc235ef44f32 + pristine_git_object: c4f15efc734c42a6887a1b03f1b8a657804e5a1a + docs/models/anthropicadvisormessageusageiterationtype.md: + id: 9a3f3a221e96 + last_write_checksum: sha1:c18acb28e2b0ab88afbec91dc8a197cfe902f882 + pristine_git_object: db1132e8b23c839f13c409688128f10a889b5372 docs/models/anthropicallowedcallers.md: id: "03935532e028" last_write_checksum: sha1:6ec7172282f3d42bdc027b31d65139c952cd0027 @@ -241,6 +249,14 @@ trackedFiles: last_write_checksum: sha1:6bd79341a7bff347f7b9d4d566ecba79b9e4dae6 pristine_git_object: 0e053cda82609101bb71f23d0fc809e4cc2f8626 deleted: true + docs/models/anthropiccompactionusageiteration.md: + id: 809148a56416 + last_write_checksum: sha1:6bd0cd2661faa09a13bf7cbb21ef35d0bc7371ce + pristine_git_object: 26f2abcb4ae1dc383c22b1f2444fe7790b57da76 + docs/models/anthropiccompactionusageiterationtype.md: + id: 53c275847798 + last_write_checksum: sha1:ae7235c842b4c3d63ee8f575b0a4c33b34f1e208 + pristine_git_object: 4326e5218c03f3e6be0e7c65b63983e763e74fdd docs/models/anthropicdocumentblockparam.md: id: acc0ba1b047c last_write_checksum: sha1:fdb444b124ff1f3cfb52df400e19129a8c5b1fc7 @@ -301,6 +317,18 @@ trackedFiles: last_write_checksum: sha1:af73d1fc209b9062f17390597825f61e168eb0dc pristine_git_object: 48cee2de620a821de18bfaaef848a1044cf10551 deleted: true + docs/models/anthropiciterationcachecreation.md: + id: a62e54fd3dd7 + last_write_checksum: sha1:42896624872f943c5001f60e168de77c19fcf95c + pristine_git_object: 2c4e93a94425f007983c85ac04c31a140d20d3b8 + docs/models/anthropicmessageusageiteration.md: + id: 2b62b7e4b98a + last_write_checksum: sha1:8b742d767d63da144bb608dd2f7ed897adc94171 + pristine_git_object: 43e561f29052ef9227780bb7000adf4a56220416 + docs/models/anthropicmessageusageiterationtype.md: + id: 6e212265f640 + last_write_checksum: sha1:6b9395f006e42cdc6671459457cd67d34938dee0 + pristine_git_object: d87370ad121c1243020361884c8e0bf3ea5592dd docs/models/anthropicplaintextsource.md: id: 0904ea4a0d8f last_write_checksum: sha1:ce5319d51a06862d49a38f5f69fc69b1a0afa826 @@ -321,6 +349,10 @@ trackedFiles: last_write_checksum: sha1:dc5d8edb347401a56ca2cd0e798595c2b2063689 pristine_git_object: 52b954b4d95f40873e28d7f9a5aac133ec84c8fb deleted: true + docs/models/anthropicspeed.md: + id: 017b6766d56b + last_write_checksum: sha1:2622bacc9bd808f2bdf3d918bbd66795f833617c + pristine_git_object: 4cc6a02090bb743404edb12da15b61a45c5927a6 docs/models/anthropictextblockparam.md: id: 704ed0604b61 last_write_checksum: sha1:30b6af62ebaa63a47b4ed095152ca703cd9d0136 @@ -356,6 +388,10 @@ trackedFiles: last_write_checksum: sha1:f3a457526c6494a4ab7f67c8613842f0bfb4f259 pristine_git_object: 08bc12eb1cb7edc00328e95a994d69a0a0f4b2fe deleted: true + docs/models/anthropicunknownusageiteration.md: + id: 5f7a40015617 + last_write_checksum: sha1:3b3cce60959a1fe60488ec1e52fe386adc9deaf0 + pristine_git_object: 33b349f82322faa597c1c96cf7bdbc71daf03217 docs/models/anthropicurlimagesource.md: id: 94bb3d58edf2 last_write_checksum: sha1:831dcf875073c03457a952da66504bdf0e712450 @@ -366,6 +402,10 @@ trackedFiles: last_write_checksum: sha1:598734345ac2a2d76adabe2d71cfcf1b051fc2eb pristine_git_object: 6a1300058e06924e066f5ff2306fbfa4124beadd deleted: true + docs/models/anthropicusageiteration.md: + id: 9ba967009e67 + last_write_checksum: sha1:3aac3843e160608a0ea3aae8d5c5d2495b970268 + pristine_git_object: d18bac458bfa5e35e481cc7b689663e8bec2bbd8 docs/models/anthropicwebsearchresultblockparam.md: id: 530bb8721819 last_write_checksum: sha1:ab2089bb5ad0433f0692c15ffbaa8c565fd48734 @@ -386,6 +426,10 @@ trackedFiles: last_write_checksum: sha1:1254c462003f12e140406d65e68b5bebf89b7883 pristine_git_object: 13148f7e447cd271424bf249d89caa549e8a5910 deleted: true + docs/models/apierrortype.md: + id: 4ddf9da45750 + last_write_checksum: sha1:e97543befda2de333b9a7e710011b3b5932ef9be + pristine_git_object: e4c481733bc4cfae344bb6cf60e88cb703049133 docs/models/apitype.md: id: 787314acdd20 last_write_checksum: sha1:b258d563307f75fb2ba3c99b8e314b0ccdd5d753 @@ -813,6 +857,14 @@ trackedFiles: last_write_checksum: sha1:2d1d7ca02a1548c882221e97ac07120cbab9f568 pristine_git_object: de4a63f588883f012912a9de42b3509a2d9825d6 deleted: true + docs/models/billable.md: + id: dc4a2c472aeb + last_write_checksum: sha1:3af9a5a3fb279dfea460635ada7974a5c15d30f6 + pristine_git_object: a0da01fa08223765795c022965a68753b532c4e6 + docs/models/booleancapability.md: + id: 7e7d64d5a817 + last_write_checksum: sha1:c7066bd2a82e8bc98e024fff369f5d1ca546a763 + pristine_git_object: b1b5ba518fc64c36967a685fc2638937db92baee docs/models/bulkaddworkspacemembersrequest.md: id: abd3e17bd98b last_write_checksum: sha1:0bcd60d6bdb1fe671f170213201b5fd1afdf5a55 @@ -884,8 +936,8 @@ trackedFiles: deleted: true docs/models/byokproviderslug.md: id: 0db8d46d0539 - last_write_checksum: sha1:3b4f13003954b8ec7dd08d5468d2c273669960a3 - pristine_git_object: 65516b503bf7e97ad8b63df7c894935545eaa8c4 + last_write_checksum: sha1:24d2ff70e7ca2198b37eaeed9ea5d051efa7b0e3 + pristine_git_object: 57d82ab335447fe825e958b5873ddde46ed00ee8 deleted: true docs/models/cachecontrol.md: id: 400a7240e8c2 @@ -897,6 +949,10 @@ trackedFiles: last_write_checksum: sha1:5d929abaff4e6f628c6a6ca88f015b2ae825b42c pristine_git_object: 7ca38c8ec718eb704313e09c5bffa6e7b789c145 deleted: true + docs/models/capabilitydescriptor.md: + id: 35a4fa66acd6 + last_write_checksum: sha1:fd11ea79427e2852b73b82fb722aa728952f98c2 + pristine_git_object: 49f0cf51697eb5c6654eeb16df7c3c76da75dcdd docs/models/chatassistantimages.md: id: c09d51959fbd last_write_checksum: sha1:ea0718a3034d9112be91f6829a0a94d531935b7a @@ -1124,8 +1180,8 @@ trackedFiles: deleted: true docs/models/chatrequesteffort.md: id: 43a500588e65 - last_write_checksum: sha1:e455fa9c7ae7b43c58633fa20d01e386104be449 - pristine_git_object: 6b00a211a69d2de81ee3c8f4d82389b2466e3298 + last_write_checksum: sha1:6628cdfba807e7fb81cb3b001fbb73a2f1bb6c86 + pristine_git_object: 60d4846b7559004a3dbf98d356c0c313dc445ed4 deleted: true docs/models/chatrequestignore.md: id: 9ae3d177eb67 @@ -1229,8 +1285,8 @@ trackedFiles: deleted: true docs/models/chatrequestreasoningeffort.md: id: 7778ae5ce4a9 - last_write_checksum: sha1:fb3e3cad9f7b8168c6fc0bd309ff524dc2f06f2f - pristine_git_object: 47e460afd03c53e973699059e2c1b6245119fb67 + last_write_checksum: sha1:7ca7f6d0592e4035559a5d9135222b9310219cb2 + pristine_git_object: c72bdcd1bc993b8ebb8a09b74deee3233690b8aa deleted: true docs/models/chatrequestservicetier.md: id: 34b32ac1991b @@ -1264,8 +1320,8 @@ trackedFiles: deleted: true docs/models/chatresult.md: id: 0d44370308d5 - last_write_checksum: sha1:60e9ce13d771e374630688f722ee6a98911daafd - pristine_git_object: 60cc56db150fb8a84c4161529e7efeb4e6689792 + last_write_checksum: sha1:2efadef63f1a6e193a373c6f7ad98c78c736430a + pristine_git_object: ee5be35cfd43fed8eb181bd40f3b95f22fdfde7f deleted: true docs/models/chatresultobject.md: id: e6a0284d117e @@ -1294,9 +1350,17 @@ trackedFiles: deleted: true docs/models/chatstreamchunk.md: id: 0c99681ac5b3 - last_write_checksum: sha1:d90498a94a2a78b50ef71c6a72eb09f3733a0d5f - pristine_git_object: 21e8cff6c3dfe867d7dbcf4550237cf1f52aeb97 - deleted: true + last_write_checksum: sha1:545a042a8f6a873a30794c93f747024f6eae4902 + pristine_git_object: bb522a6de7471d90c7e1da66912f65081fabc68d + deleted: true + docs/models/chatstreamchunkerror.md: + id: 73dbd72dd317 + last_write_checksum: sha1:bbbb3515905cfaf5352aa717f614650b6885a446 + pristine_git_object: 3fca3fd054c9c6bfe73abf84ee5dd43095978ca9 + docs/models/chatstreamchunkmetadata.md: + id: 379603390da3 + last_write_checksum: sha1:060d0563c767870c0d388d63b7c9d93e474c0917 + pristine_git_object: 4c22f62662d5f1657eac19deae433f2f0eb12b7b docs/models/chatstreamchunkobject.md: id: 94fdf18ada09 last_write_checksum: sha1:9076f861f8b32c866f02d483dd785c6f50c0d89e @@ -1408,9 +1472,17 @@ trackedFiles: deleted: true docs/models/chatusage.md: id: 53822f0d32d9 - last_write_checksum: sha1:1ae75ea0739870e3613bc2d858d22f1f8ed9d6df - pristine_git_object: 67eac7e32636ad7f82a5f6c8b6e342d49e589b3f - deleted: true + last_write_checksum: sha1:0706f9ec0883f6ca2647663bda06bcd269a15370 + pristine_git_object: 0342d7f3598bafe9ff753382120f8a2ebb9799db + deleted: true + docs/models/chatusagecompletiontokensdetails.md: + id: f1fa0fba88d0 + last_write_checksum: sha1:c22122ca9340a1dbe7e0807b2aba7a2ad34d47ac + pristine_git_object: ad7aede357d940c2da5d20262119ab029edff0be + docs/models/chatusageprompttokensdetails.md: + id: 3d44e14d6b6c + last_write_checksum: sha1:0fbe64cc4be13d7994c7081e4cc3d57d1239cf7b + pristine_git_object: 21395ba5ec9fb14cc5bf5fdeb4a70fc32a76ffc7 docs/models/chatusermessage.md: id: 721bf2927c29 last_write_checksum: sha1:4c6a97db46545a8ea12a3e5ef6f1bab2e634f8f6 @@ -1550,10 +1622,6 @@ trackedFiles: last_write_checksum: sha1:235df210c100d609dcaa40181e0140ac1cecab4d pristine_git_object: 624d26a0bd7dc22aded699ca9e1b966eab663e06 deleted: true - docs/models/completiontokensdetails.md: - id: 72beafa9a4c8 - last_write_checksum: sha1:a4eb0ae32c4961e8cf07420b368b6e6889f6e9c6 - pristine_git_object: 2ec86eb2e3bf4dd37eb8975d2bb0c027faa3fff2 docs/models/compoundfilter.md: id: 627199c420ed last_write_checksum: sha1:2eab34c93416b913024d5c62d09fd639b826e68b @@ -1666,8 +1734,8 @@ trackedFiles: deleted: true docs/models/contentpartimage.md: id: 70a0d0187fcf - last_write_checksum: sha1:a3188c9782a0409886202ae0bbfa6c01e590f624 - pristine_git_object: a07ee7fa2fdfbf90fab1d9f8c02744a46b548410 + last_write_checksum: sha1:fb2934ed38c3f9d43fa21fab491231b718f38c19 + pristine_git_object: 9ce1c7b7477c8b2eebc6afc89c2c4eead58b9557 deleted: true docs/models/contentpartimageimageurl.md: id: 8a2545659913 @@ -1902,6 +1970,18 @@ trackedFiles: last_write_checksum: sha1:908ab0823a1c81787514ba73887b0378af00dc4f pristine_git_object: b24b71a719e9df16551212634b2de564cbbed6f6 deleted: true + docs/models/debug.md: + id: 27952725ecc7 + last_write_checksum: sha1:eeed1935fd127b22f15b07df408e9d634dc716b1 + pristine_git_object: 0c67e844055a27a235fcae2b605c50fa95b4e611 + docs/models/debugevent.md: + id: ccfd502c4ead + last_write_checksum: sha1:213a3cc5840e3e5fbb1da10f6dcf175bfc1f769b + pristine_git_object: 493901014a49b21a86788038e4751621d4e09075 + docs/models/defaulteffort.md: + id: 1b40c6f49171 + last_write_checksum: sha1:2bbc2d01da4f08c8b704e0fe37364dbe2e3a4078 + pristine_git_object: 642e99657fa5bb13776a7fa3965d0310e217eac4 docs/models/defaultparameters.md: id: 91207995478e last_write_checksum: sha1:87e375bdebf31d05199b15468a852b798d22a324 @@ -1925,6 +2005,7 @@ trackedFiles: id: 3f9e0c7bda7e last_write_checksum: sha1:4e5e504602df23c0d6321efc19451fdcaa9fb8a7 pristine_git_object: 38d32d7641b94e26a9db9a13fac9a6733fd75525 + deleted: true docs/models/deleteworkspaceresponse.md: id: 88b47c2028f9 last_write_checksum: sha1:dd0916e2fddb7bef9a6c39433753258be9597f6e @@ -2048,6 +2129,10 @@ trackedFiles: id: fcbb5455c001 last_write_checksum: sha1:4ffb53aadd3456dd8db042a9f21c9180ef83ee8b pristine_git_object: 4028896373ba03c9fd3c8bb7bac4a2be6cabb689 + docs/models/enumcapability.md: + id: 222fb367bb5a + last_write_checksum: sha1:359b07555b89401153e08cbcb9584da9b93fa1e5 + pristine_git_object: 1d7102ec3ae34fce74e6e40bfd2ec0d3bb98c182 docs/models/environment.md: id: 6a34665c56a8 last_write_checksum: sha1:9569ddda4b469fa5d583f568d541a53880e94c4c @@ -2124,10 +2209,10 @@ trackedFiles: id: ba0b8363bf72 last_write_checksum: sha1:58310ce67abc41443dd521242ffe06abdb966772 pristine_git_object: 3377742e0621fc6aa90e7426b5f8a83c9920b58b - docs/models/errort.md: - id: 30c48d365f28 - last_write_checksum: sha1:43faeda6da7277bedad89cdae55430764abaa890 - pristine_git_object: 45064a571bf14941b94132b0630c0abdd297afe9 + docs/models/event.md: + id: 311c22a8574a + last_write_checksum: sha1:c3b3c9fb98f3bdff6e99c2c44df39bcb00bc4055 + pristine_git_object: e48b32d3dea4552db729aa82baf8d8b444b46ded docs/models/failedmodel.md: id: 45c31072c08d last_write_checksum: sha1:b897fe84c63f43a5a79ef6c5828e5e877dd375c8 @@ -2397,13 +2482,13 @@ trackedFiles: deleted: true docs/models/fusionservertoolconfig.md: id: 103d7a9a42f0 - last_write_checksum: sha1:a9334cbc8a5f9d1c46902a625bc2d08ad24d003a - pristine_git_object: 150cd435220d53c62ee97090650b69b30d4deacd + last_write_checksum: sha1:8239d1d6d28bb65cd2a323618d2cca4dd089293a + pristine_git_object: cedb2da71cb64e3d8a1055e73e7e4fb7852eb7ee deleted: true docs/models/fusionservertoolconfigeffort.md: id: 8e9519531e12 - last_write_checksum: sha1:b1122ef1da30e4a249489aa7a067e41a4f99ede4 - pristine_git_object: 1bceebd72b7d2b5c5bf337d649976591ca6aeeda + last_write_checksum: sha1:7d8e4d53d85b1baf4bee735be03898c7bcd08424 + pristine_git_object: 7ad7af368bb97f36221cdb8406ef4d5f989a0605 deleted: true docs/models/fusionservertoolconfigreasoning.md: id: 07a5c4692ac1 @@ -2500,6 +2585,10 @@ trackedFiles: last_write_checksum: sha1:38eae75bc8b34c91933a5c9106228a4e7cb8730f pristine_git_object: 0e1b0d42b163ccbcdbc94de0ce50bb5ba83fc569 deleted: true + docs/models/imageendpoint.md: + id: 619a29cd66fd + last_write_checksum: sha1:ccc3ea40d5fadd0db6df3ef8b90bf80fd252d44c + pristine_git_object: 0f6fd4efc071710df8af9038ea944f50463d64a1 docs/models/imagegencallcompletedevent.md: id: c31cf621765c last_write_checksum: sha1:720adab39fc55b26bed45ac804ba6da6aad9f259 @@ -2520,11 +2609,59 @@ trackedFiles: last_write_checksum: sha1:4f1c4066647893173de03aef97f482007b990b24 pristine_git_object: 0f3846648a49940fb530efb247b64f322d76a59f deleted: true + docs/models/imagegencompletedevent.md: + id: 1acbf0edc39b + last_write_checksum: sha1:a59159cfb01fb5022592d89d7cd9a7b02ddd3dbd + pristine_git_object: 45b96b9f6d3bc793ad827b10a6fa14514cd9a2d7 + docs/models/imagegenerationrequest.md: + id: e442010d2184 + last_write_checksum: sha1:33c3c75b2658893e9d2e3abe62e8e15f0a18ce46 + pristine_git_object: 9d09e7963183da7d64a50fd3ae9c75cde9814d60 + docs/models/imagegenerationrequestaspectratio.md: + id: 9a249a62b3ea + last_write_checksum: sha1:b20eefb2c7a5306ab85fb25aca5878107c4c4b57 + pristine_git_object: 62bbe8a9c96d299f01be77d6a2055b8926ded56f + docs/models/imagegenerationrequestbackground.md: + id: 2d9d17879f83 + last_write_checksum: sha1:bc3e4aae4b21a006b3e2f915f5048a7fa03c96f9 + pristine_git_object: df0e2db8044e178db1c668f8b77f9a2ed62a1e80 + docs/models/imagegenerationrequestoptions.md: + id: 2cd619d97df3 + last_write_checksum: sha1:e5a80b076d93999d805264790eae2d9384a76024 + pristine_git_object: 13ba2a32215b83b4d2f06eb3c058ae4017c8781e + docs/models/imagegenerationrequestoutputformat.md: + id: 2daafa8fb332 + last_write_checksum: sha1:258f8bdad774bf1158a4820d3b42b37eb8acc3b5 + pristine_git_object: 826d14f2cbf4635d2add6989a64fd4fb1c3b3123 + docs/models/imagegenerationrequestprovider.md: + id: 7b66c8d681e7 + last_write_checksum: sha1:3b36408795be2b2122b74ebb4820f41f095a6074 + pristine_git_object: 147ba40f644cc1f55ca8d24f8ae35273a7a1a631 + docs/models/imagegenerationrequestquality.md: + id: c2d07b1cc129 + last_write_checksum: sha1:a17c550e33ca69caa9c605472deddcabb4b8a89d + pristine_git_object: 2e04783ebe6146e84d411515cb897e9054df26c8 + docs/models/imagegenerationrequestresolution.md: + id: 4536d03d9634 + last_write_checksum: sha1:6f3b47a4671ced490dd37779f4ab69c1787d4d1b + pristine_git_object: e671501d66f3730af9384744e175da966b40219d + docs/models/imagegenerationresponse.md: + id: 0de6a70c78ff + last_write_checksum: sha1:7f7115263248c8de7c6a5533f10cb6d70a459f6a + pristine_git_object: 89827a5ba4ffec57d6a8bd9e8dae05937fa50ac6 + docs/models/imagegenerationresponsedata.md: + id: a41ea5377fa9 + last_write_checksum: sha1:874575a854fa9ece8698e7e486bd1dbbb1a5d44c + pristine_git_object: 74212e3249d40436f10991f62dfd71486d9f153a docs/models/imagegenerationservertool.md: id: 025e7df31fc2 - last_write_checksum: sha1:68863dcb06bff9792b69aa9428ddc4d27c5f29d1 - pristine_git_object: dbbbc9fc749b99862473e31ee8ec5a8930d54cbb + last_write_checksum: sha1:b379923bd3d435fa9b9ac9341a16938257a37426 + pristine_git_object: e7100c9750d6408b2bff4ca175fca8fea0c7052f deleted: true + docs/models/imagegenerationservertoolbackground.md: + id: 8267620fc55b + last_write_checksum: sha1:f94e77a1e29181e01d88c98882721e08dd223aea + pristine_git_object: 027fa4fe9f2d374f9ada5b39034b10da38937a26 docs/models/imagegenerationservertoolconfig.md: id: ab9a7aba3253 last_write_checksum: sha1:5ce6aecfd489ec6e7e51ad7d0027a31972633480 @@ -2545,10 +2682,74 @@ trackedFiles: last_write_checksum: sha1:c91d1c5d0b2380a759c9d61a76eba05abd32d3f2 pristine_git_object: 176103215b13c22d21cc81e1fab8bd453d1a8f2a deleted: true + docs/models/imagegenerationservertooloutputformat.md: + id: 53861f354eed + last_write_checksum: sha1:6da84fb2da5db55ceaee0f304f84eb06d2a1b192 + pristine_git_object: 47250b371555f7088046ffca5730fc92b4432e9d + docs/models/imagegenerationservertoolquality.md: + id: 63cd493fe09c + last_write_checksum: sha1:08eb4689876105bd2824749f6db0a389fd180bd1 + pristine_git_object: bd191b5b396806faad2aea2e90c253b2f0d3f922 docs/models/imagegenerationstatus.md: id: 3d5a75816868 last_write_checksum: sha1:106443e9fd0a4d5c4a557697ae7bc40dfd8c8702 pristine_git_object: df25aae6b2f340319e87c6de37e4113f2d54f984 + docs/models/imagegenerationusage.md: + id: ab96f3cec761 + last_write_checksum: sha1:6e7cc6ab661feb02c27bd6c5c61421903c133e43 + pristine_git_object: a9992da0fc198f841b94d6b3093d6a4ebee12f67 + docs/models/imagegenerationusagecompletiontokensdetails.md: + id: a2d59e0dafbb + last_write_checksum: sha1:860a5b547207fe171c8af394d0bf131379541187 + pristine_git_object: b7b600af5bf7a042cdd27ed677e863d6fb2a917b + docs/models/imagegenerationusageprompttokensdetails.md: + id: 4ff176553d89 + last_write_checksum: sha1:f32a74eb58357139808936b858b2484c5195e191 + pristine_git_object: 290afdbaf94548e4b13a71c311ef11be4ddde21b + docs/models/imagegenpartialimageevent.md: + id: 82f6a2a1a485 + last_write_checksum: sha1:8e529d86eafc560e44408df053b1a34a66cf8d1c + pristine_git_object: c920607b9fdb3b5c71f5aa0cfa32a6828a1c5629 + docs/models/imagegenstreamerrorevent.md: + id: 5199ecef8c4a + last_write_checksum: sha1:35aecb07037aef33edca81455c099d17431f9a5a + pristine_git_object: defe467c1da83eb8f135b3a2dacd1dc1227d3221 + docs/models/imagegenstreamerroreventerror.md: + id: f50a47ba1c5b + last_write_checksum: sha1:f8b6a1c51fa22ce487e5dfe77399eca504b50943 + pristine_git_object: 226489f383e3c0bff2ee01daa33da615c1929d1b + docs/models/imagemodelarchitecture.md: + id: 513b16a46477 + last_write_checksum: sha1:e51c32d60d2ba4b98472c135c5ca4a2ef69fbeaf + pristine_git_object: 21a1a5e0162cfdfffbcf97dda3efdd2e481c93ee + docs/models/imagemodelendpointsresponse.md: + id: 80a22effbee8 + last_write_checksum: sha1:795a853a712953d6ec73d7d0ed651063b8c4dfdd + pristine_git_object: 12485afbe8902633b78f8753666b6697fd053e34 + docs/models/imagemodellistitem.md: + id: 56346f146c19 + last_write_checksum: sha1:f4e467bdc6888979142c443f2abd0cad427efc76 + pristine_git_object: ceeb86ec78f857011d8ac6fdd8d019e1666b7a2e + docs/models/imagemodelslistresponse.md: + id: 56cb115b2a39 + last_write_checksum: sha1:38e70a36826e313cd263b3d49d2d013df363e808 + pristine_git_object: c9aff34acb82e7690f1aeaa4528c35ebc77247a6 + docs/models/imageoutputmodality.md: + id: 164b429ef25a + last_write_checksum: sha1:c976fe719179640960429db2b4ec0ec66abf7283 + pristine_git_object: 18708c2c97200aad26d04d0c13f2f1dac4149306 + docs/models/imagepricingentry.md: + id: c393247ac6de + last_write_checksum: sha1:c42b6df170ac94f6ea9bedc347cd779c035dc761 + pristine_git_object: 6eaccaa1d2c1259dbeccc22dcc7627c20966cc58 + docs/models/imagestreamingresponse.md: + id: ff4855989854 + last_write_checksum: sha1:08aaf582f11c37559c8650f96003f3b414cd9989 + pristine_git_object: f340271310e51e16c88d1653564842f31a54f766 + docs/models/imagestreamingresponsedata.md: + id: 5d32908653d9 + last_write_checksum: sha1:9f402f38ac7f763c02e4515fab906ab05c7560e7 + pristine_git_object: 29823b5cd938d2b75cd93eb232977de96768fc3c docs/models/incompletedetails.md: id: 70e90cfe66f5 last_write_checksum: sha1:041a856de2ef1adaaea37f5c9593b60ccde12f31 @@ -2898,6 +3099,7 @@ trackedFiles: id: 7b25fbff0283 last_write_checksum: sha1:ade25543d5e312c7160573411bbea9f06931fae3 pristine_git_object: 222cf928ec9e403d648bbb8ee2d65cd041ea1dc5 + deleted: true docs/models/listworkspacesresponse.md: id: fd657130fbe9 last_write_checksum: sha1:8f58734dc57fc02f90f230437e8d4d221b646b55 @@ -3070,9 +3272,13 @@ trackedFiles: deleted: true docs/models/messagesrequest.md: id: 43ebf5c6fe35 - last_write_checksum: sha1:e7c40bd8530d1b777284a250c8b68b41fe60320f - pristine_git_object: 9f035f91658fb1fffcb7f42aebae4ef750e07338 + last_write_checksum: sha1:32eb051d09e75e40124f285dbedd8d5f7e83da1f + pristine_git_object: f0045d725279c1a42c104776ace1a40656de0dca deleted: true + docs/models/messagesrequestmetadata.md: + id: 2ea8c7ecf56f + last_write_checksum: sha1:5d32a8cf64261696a4a5c677584fa335908a9e4f + pristine_git_object: 4381edefcb7b0cf638ba1d8315c3a713539b681b docs/models/messagesrequestplugin.md: id: ac5509b19989 last_write_checksum: sha1:0d3798de03af46f1b0d600c9191ab6cd4dc90312 @@ -3119,8 +3325,8 @@ trackedFiles: deleted: true docs/models/model.md: id: 66e0236ac289 - last_write_checksum: sha1:b9bc1c6639a2059db0fa551154c436ba3213d351 - pristine_git_object: 1b38986df12f36f02aa1bb37678b08939ef9434e + last_write_checksum: sha1:7956b2f50e7d8d9cad21f90fda6f966c673de228 + pristine_git_object: 13d36933c3443703a2ac1693a3d37957a2672b43 docs/models/modelarchitecture.md: id: 7eab960e8441 last_write_checksum: sha1:722c920e474bc5ce757280c8a80406dfd484eee1 @@ -3148,10 +3354,14 @@ trackedFiles: last_write_checksum: sha1:8e3c5086cc05069ab69d345756c9252083d8df94 pristine_git_object: 32656664b666779e69bda03853e9c0b75271db6e deleted: true + docs/models/modelreasoning.md: + id: "832494311749" + last_write_checksum: sha1:c5baf538f79a73b4b428283e6bab20c998411241 + pristine_git_object: 3ec5854ca541acebdbcd9508ac713b263596e908 docs/models/modelresponse.md: id: 0796a34df81d - last_write_checksum: sha1:f1862998d4f517e6e9d799d685a506023956bb43 - pristine_git_object: 946e1c363a9353254f635e46615c1b93eed99e72 + last_write_checksum: sha1:b36e61c2f129928ba7efea9145471e5447903f74 + pristine_git_object: fef0a736782262d7731748066b2a5fa9204601ab deleted: true docs/models/modelscountresponse.md: id: 1b997e3738fa @@ -3227,8 +3437,8 @@ trackedFiles: deleted: true docs/models/observabilityarizedestinationconfig.md: id: c4bc62c80c2b - last_write_checksum: sha1:14814da2ad160655a5f9ba37628da65171dee970 - pristine_git_object: 41e9be6369ec24f415b1804a41750276dd13f1b4 + last_write_checksum: sha1:75e92901149e1268fb28574e0cfc5c3c18efff79 + pristine_git_object: 98a83dc009a9c8a4c2af3aa730d345909bcd90b3 deleted: true docs/models/observabilitybraintrustdestination.md: id: 91339e5a369f @@ -3594,8 +3804,8 @@ trackedFiles: deleted: true docs/models/openresponsesresult.md: id: 84990af4bfa0 - last_write_checksum: sha1:c3b0bc12f6abee000f03f3d32190c4ee4e467093 - pristine_git_object: 09f0e5eec5c0e6022be73cf4357b860a1281fcea + last_write_checksum: sha1:edf8674fb6f77592b6290f069fcb8acdbdb540d9 + pristine_git_object: f036de0670414f76400e9a4c0ab028fccd961078 deleted: true docs/models/openresponsesresultobject.md: id: a67bbc1f8fe1 @@ -3644,8 +3854,8 @@ trackedFiles: deleted: true docs/models/operations/arena.md: id: 18236c4c4904 - last_write_checksum: sha1:81f0ba16674f0ea52178b4b85693ccf45cccc0ba - pristine_git_object: c5a0cf7724fc76a7e346d21726dd35f390c280b6 + last_write_checksum: sha1:5dcbf7f15f7ae622c831ac0c0b6865ec1bdf0266 + pristine_git_object: ebe1c56b8db7c7afe16bef166ec62cebbb2b8a98 deleted: true docs/models/operations/bulkaddworkspacemembersglobals.md: id: f67e8819f471 @@ -3711,6 +3921,10 @@ trackedFiles: id: 71344e17daa8 last_write_checksum: sha1:33ee6fdb1c6d1a8e3bcf19eecbae0672f2556592 pristine_git_object: 9870a64da3fa193379f66f548a219eedb0e30eda + docs/models/operations/costdetails.md: + id: 2244d5f1d81e + last_write_checksum: sha1:63aa69f94709909458489c896490b7957696f9c3 + pristine_git_object: 32f929730f66ce135ffe9daae904ac2c18116902 docs/models/operations/createaudiospeechglobals.md: id: e41ba445c8d8 last_write_checksum: sha1:f689779ae444ea07df1e38642a1fb51d316ff8b5 @@ -3791,8 +4005,8 @@ trackedFiles: pristine_git_object: 9e4289201dc3a780a84bce809956165c859d68f0 docs/models/operations/createembeddingsusage.md: id: 55932019377c - last_write_checksum: sha1:4e1036698cbf1cde5f64c502e299ef10ec6be573 - pristine_git_object: 0cdb5043bc853946775a40410d16f8dae570c030 + last_write_checksum: sha1:6ead7c5b5966b448a82562e54a08bf4d470812c8 + pristine_git_object: 6e137a42e559d01b52ebf67b5229fc176bb586f5 deleted: true docs/models/operations/createguardrailglobals.md: id: e77858413127 @@ -3802,6 +4016,18 @@ trackedFiles: id: ff2eac26fe01 last_write_checksum: sha1:06509665dd195a2760d5eba040b530f7ddd6cfe3 pristine_git_object: a659e69c237347a32a943a4895c3c30207e25477 + docs/models/operations/createimagesglobals.md: + id: 99c7023701b1 + last_write_checksum: sha1:5b0f2f898988e4c2ff8420ef871bbf362c5f3f61 + pristine_git_object: f182e382a9733581c9859a800690e3f28ad0b577 + docs/models/operations/createimagesrequest.md: + id: 0f46b4aced36 + last_write_checksum: sha1:3a3cb959a39b37487aeb8cffbc19950be98e1964 + pristine_git_object: 4f360b17aed6f921e0e3aa48651b526a4ca48a4c + docs/models/operations/createimagesresponse.md: + id: 8c813b16590b + last_write_checksum: sha1:f5d9324abcf4a2eea94fe63b6febd7780636ff9c + pristine_git_object: 2d3aa20e910d6a0bf2489f2b1b4cfccb48d70bfe docs/models/operations/createkeysdata.md: id: 9cbfcb7edadb last_write_checksum: sha1:3f7cb7d71400b247bec1d76c803da4bfbfd6ea5b @@ -4002,10 +4228,12 @@ trackedFiles: id: 7e9a1f4cb03d last_write_checksum: sha1:eba7bc81e36395f0353c074480ac92045dc08ef8 pristine_git_object: 9e6e8ee12921b7ac48a881dc4a427c4484b2e104 + deleted: true docs/models/operations/deleteworkspacebudgetrequest.md: id: fa6bd9e45adb last_write_checksum: sha1:876d008227a20349388c19e9650434b3a4c0549d pristine_git_object: 279bfc891e377acae9f2da80e0c3d8d208966ed0 + deleted: true docs/models/operations/deleteworkspaceglobals.md: id: 43fe94eda9d4 last_write_checksum: sha1:258f7d4f27d2fb9d9a77304b3eab908ae8fbc0ab @@ -4164,6 +4392,14 @@ trackedFiles: last_write_checksum: sha1:72a42d64f1ddb3ae47010bb65aa25cb03cb804c4 pristine_git_object: 3ecdb020e4ce5c2e28abe6127f4d1754c3a32a08 deleted: true + docs/models/operations/getbenchmarksglobals.md: + id: 19d271519ab5 + last_write_checksum: sha1:e18aa493b5f352b820a6cc846ecb3bcc3a48f938 + pristine_git_object: 8b0df019d0e2da52461282ffab6127ede746457a + docs/models/operations/getbenchmarksrequest.md: + id: 6f639b6d7f9c + last_write_checksum: sha1:3d067fc551aa84d12f30e49f06a3244b0afbc5a1 + pristine_git_object: 447447be24eb91f19141a2624a6af2bea95708ea docs/models/operations/getbyokkeyglobals.md: id: b561ccf55c78 last_write_checksum: sha1:61eaba657fceee808718be5ba50ac5809478c2f0 @@ -4316,6 +4552,14 @@ trackedFiles: last_write_checksum: sha1:f6b9b54f92f754b6cf5a4b97b2a444ba93d47f65 pristine_git_object: 7ae672817be7ea254f726f5cda5e4fffae7c696f deleted: true + docs/models/operations/gettaskclassificationsglobals.md: + id: 39c95297a6c7 + last_write_checksum: sha1:d3cdded90a20312c4cce31776ed51a44115868e5 + pristine_git_object: cf5a3af8712a01da2ea9295d0fcd45fb6c8dbf40 + docs/models/operations/gettaskclassificationsrequest.md: + id: c5561ae0b47f + last_write_checksum: sha1:203799e9566e7c3c4206346a00b5394e5ea9026a + pristine_git_object: 53520a36d94becf99770bfc4876ddbe127f00257 docs/models/operations/getuseractivityglobals.md: id: c8e7b780737e last_write_checksum: sha1:a3a48d069e8d87c6f9a6d01ed1706d9c555e49ac @@ -4487,6 +4731,22 @@ trackedFiles: id: 3d55593e8311 last_write_checksum: sha1:34ba411f5180a11f32fa2caf89b7e711309cc637 pristine_git_object: b239369281008550fe65cd1d35043a367bf94b7a + docs/models/operations/listimagemodelendpointsglobals.md: + id: 9d81117db516 + last_write_checksum: sha1:e5970cd46e04f5f86c0a877cde54bbb55a63aff2 + pristine_git_object: ff16b18d880033d42211cbfef58aea581139eab3 + docs/models/operations/listimagemodelendpointsrequest.md: + id: 15af74e4e921 + last_write_checksum: sha1:13f6c235a327a54088d5cc6c3dd2c75bbbbb899e + pristine_git_object: 11b686e19d9b922e19ce0b561c73a25711ca875a + docs/models/operations/listimagemodelsglobals.md: + id: afaff84c2076 + last_write_checksum: sha1:eaa27b37d4c5727abd0dbf258a77722645d16edc + pristine_git_object: 186c2de34eae433811bafd010528f73a6aa56020 + docs/models/operations/listimagemodelsrequest.md: + id: f67c692e0450 + last_write_checksum: sha1:658223da3dbac32675c74b5d1d573d2a7d40b47b + pristine_git_object: 4bf3871ca0014685ccd9137a94c11d0c443e0687 docs/models/operations/listkeyassignmentsglobals.md: id: ccf1cb233045 last_write_checksum: sha1:2e1e5cccd6760af76b71aad6fe4d2f636784d0fa @@ -4649,10 +4909,12 @@ trackedFiles: id: a8ed73899220 last_write_checksum: sha1:62ec4f85db2f67947a6bf00d77e2536ad0c3b8d8 pristine_git_object: a2316831e40e4b6a63d97f9a9f622c0926c6874d + deleted: true docs/models/operations/listworkspacebudgetsrequest.md: id: 3c4af10b0d1b last_write_checksum: sha1:fa75809d21a36b9970db72cc72877ffff1ec5b92 pristine_git_object: 977d149aea250e8465fdf0286204f02f487fb25b + deleted: true docs/models/operations/listworkspacesglobals.md: id: 838d0615597b last_write_checksum: sha1:d7b46bb37d03a5e66791e5f850ab40f57de10fc2 @@ -4713,8 +4975,8 @@ trackedFiles: deleted: true docs/models/operations/provider.md: id: c28b3c085f4e - last_write_checksum: sha1:b60b5afe630717316bb2138d27ced6979a3b8e14 - pristine_git_object: 805ef522bbc3891a7f5ec42cb822eed33c8fb537 + last_write_checksum: sha1:15015a5a63c1527e2f54b63aa1d405d3e39cfd30 + pristine_git_object: 39ab11232d356115eec0f3d9f79eb9c3be0461b9 deleted: true docs/models/operations/queryanalyticsdata1.md: id: ecb6e11852f5 @@ -4787,11 +5049,19 @@ trackedFiles: last_write_checksum: sha1:543fe646dc04ed9e97b16b74d80426636b49e57a pristine_git_object: 19ef27f26aee908e4a3ab113384e9065b1495f51 deleted: true + docs/models/operations/source.md: + id: 31a3e4b3b2e6 + last_write_checksum: sha1:6c88d6f43777fc3a2a9a0333cf40c9b4dda787ff + pristine_git_object: 703db1995ec05f7fe365b18387e35cbee9309f37 docs/models/operations/subcategory.md: id: 8bb0b30b82e2 last_write_checksum: sha1:c122a4cdea2dcfec2333bca847be8fdaf810cb4a pristine_git_object: 5e861778b47568b23dfe659471b8aa36d203ab7c deleted: true + docs/models/operations/tasktype.md: + id: 8c10844969fe + last_write_checksum: sha1:5df90e1a08131b66a04f04d1ab325767dea670a9 + pristine_git_object: a5d22ff52558a8f6a90151b78f29cb9f01daa25c docs/models/operations/timerange.md: id: 1f5778dd63dd last_write_checksum: sha1:a0bc1b6009eed06bd9947c778dc2405c816edc7a @@ -4878,10 +5148,12 @@ trackedFiles: id: 1ed24dfd705d last_write_checksum: sha1:3a42d6d277bf6aca7bce2c0553f5afa046c767de pristine_git_object: d4473f37d96cad55c0ea59586ea0fdc10e7df590 + deleted: true docs/models/operations/upsertworkspacebudgetrequest.md: id: 9c4b77df56d7 last_write_checksum: sha1:fc87def3111be0ae9eecd855900d504213a5f8d0 pristine_git_object: 110c64aa2d7b57935f52b02d4272adc2b4c61fb5 + deleted: true docs/models/operations/usagelimittype.md: id: 22ad2742a599 last_write_checksum: sha1:7a6bf686440f92d48981d49715bcff65bb122e2f @@ -4901,6 +5173,10 @@ trackedFiles: last_write_checksum: sha1:10216b4dccedfc76c578c983a84eb8434fb81057 pristine_git_object: ff18b2fae70d2cc7f61116295723643ce4997d46 deleted: true + docs/models/operations/window.md: + id: 22a97bd1759f + last_write_checksum: sha1:91e118646eedfe6e353d93d4aa0d99d716fe8da1 + pristine_git_object: 2310b029b1faab76d7e0c72d4b6ad84f0653c336 docs/models/operations/zdr.md: id: 6b3f77435a1c last_write_checksum: sha1:6017aaa138ed51bea923c1c5f158a3109eaa8a82 @@ -5621,10 +5897,6 @@ trackedFiles: last_write_checksum: sha1:8aef0429c6038531b0d5ef7a32d1e03c9e3fbb6b pristine_git_object: 354238fc6c1cd17ebee52bec88b2c58dce736fef deleted: true - docs/models/prompttokensdetails.md: - id: 1391892fce0a - last_write_checksum: sha1:f49f3ccc8f0b25ca4437c9c08c660fce0e5c6007 - pristine_git_object: 4ef32473003c59e83028e6c45f13b7e5aa1c03fe docs/models/provider.md: id: cedb2a98f8e3 last_write_checksum: sha1:ce2d8f8b84b6d37feb674a782aa2b20170167b0c @@ -5637,12 +5909,12 @@ trackedFiles: deleted: true docs/models/providername.md: id: 661ee6ccfa8a - last_write_checksum: sha1:4e2be1b704b33be82bafcee7da7ce4030c166dcf - pristine_git_object: ec89fe6144a8a94749f763b0543eb77cbed3537a + last_write_checksum: sha1:8cd72a48030dea0e04e9a765eb853dbfe3d19de0 + pristine_git_object: 07417d89192192a064d5a8201dbb10e6a7baa108 docs/models/provideroptions.md: id: "986859558e93" - last_write_checksum: sha1:e4d83e3353c31ffb7107709a6b5a9021a64ee022 - pristine_git_object: d7f966bb7143c0b7c7d51b8cdf7101b4de88cba1 + last_write_checksum: sha1:f2fd70c4d6e095a539f4a6537d0863b766c3c824 + pristine_git_object: dbc7b0c9048583d3a6e83712906fd70a04a8b764 deleted: true docs/models/provideroverloadedresponseerrordata.md: id: 23d66996874e @@ -5659,8 +5931,8 @@ trackedFiles: deleted: true docs/models/providerresponseprovidername.md: id: d59f0f17ca15 - last_write_checksum: sha1:7ca0c0e503fcef113338a26963ae80097d586958 - pristine_git_object: 095548c8b2fcc377cdf6232de07db600dae747e1 + last_write_checksum: sha1:f9108d3e60bee37136f458dae3ce4285ee60759e + pristine_git_object: 977e152ef98a20ff0c3363d9034ba0b64862446c deleted: true docs/models/providersort.md: id: dedd9969d635 @@ -5691,6 +5963,10 @@ trackedFiles: id: 3ca4534df268 last_write_checksum: sha1:24fc1d737a110e1885962a97994900650dac89a5 pristine_git_object: 86d515ac7f5d1a5c16852d8ec4e79aa14ff5e6cd + docs/models/rangecapability.md: + id: 3c25faf94804 + last_write_checksum: sha1:e911dcde2b2d70e51e67dd36c608dc5401dadade + pristine_git_object: 02f1d7aaeea499c28cce32d9b44bd52a82348a7a docs/models/ranker.md: id: 228bf4500066 last_write_checksum: sha1:cb137d542c3169ece7248f277b84f48a8964c8be @@ -5758,8 +6034,8 @@ trackedFiles: deleted: true docs/models/reasoningeffort.md: id: c8fd630d3f07 - last_write_checksum: sha1:ba41715e2053fc6734d4533c311060afa615250a - pristine_git_object: b714ed98184769738fccb5623c933c3b19b0c6ba + last_write_checksum: sha1:26fa0ceca54c8e14b3470ffadc9f80fc370cffec + pristine_git_object: 88f6732194c06c1c35ac5cdfffbe993104cd1abd deleted: true docs/models/reasoningeffortenum.md: id: 75abca7f5e9b @@ -5895,6 +6171,7 @@ trackedFiles: id: f9bdd1bc3c89 last_write_checksum: sha1:236a00ce12bf0deafcd7d7c65771b262e9b13263 pristine_git_object: 19e0a3b06b330e3df1fda3fcf6437c7e0958a136 + deleted: true docs/models/resolution.md: id: 7d1066bfde17 last_write_checksum: sha1:0319d080679b03d75765d5f87a5615833db105d3 @@ -5938,8 +6215,8 @@ trackedFiles: pristine_git_object: b29a01e17ddc4a8537b7fce887b467ed248709ca docs/models/responsesrequest.md: id: 8c2dd311f9ae - last_write_checksum: sha1:0e6c3d220f165bf31f95f9bbd3b77518d2185cc3 - pristine_git_object: d84897cb22ff85e913eedc5db820e02992a6224b + last_write_checksum: sha1:d436d7a5eddfe2f2151278500759510241958260 + pristine_git_object: 90d6d086fce5bac949ee5e0bbf4c37ad14180e6d deleted: true docs/models/responsesrequestignore.md: id: c4f071afde0b @@ -6085,6 +6362,14 @@ trackedFiles: id: 452e4d4eb67a last_write_checksum: sha1:1978f84a4c782f5ed85eb03074a6fa5e19f103c7 pristine_git_object: 887b302898d6cf28fed0a6661f28c5d39ab3782d + docs/models/servertooluse.md: + id: 98bf7ef92260 + last_write_checksum: sha1:bf42a3dc0d1b69375beb7367d5c22294654b0f3b + pristine_git_object: 8652d039d362bf10ab37401476c57aefbe14f3af + docs/models/servertoolusedetails.md: + id: 107a1c8059ac + last_write_checksum: sha1:7dedbce7c8451e808de788504c91e69037b62e9f + pristine_git_object: 932535dd861e2e42aaa85c501dc29a4b50b587a3 docs/models/serviceunavailableresponseerrordata.md: id: b50775a0d86d last_write_checksum: sha1:24fb8c872debc75aab710d0fb0ff6ef3619f7859 @@ -6181,8 +6466,8 @@ trackedFiles: deleted: true docs/models/sourceenum.md: id: 27e3ed293e57 - last_write_checksum: sha1:e6b431fd8e643ed9afa072abb00c192f30c5212b - pristine_git_object: 49da095792643e1cd28dea674f444a0dd47b855e + last_write_checksum: sha1:52d603a8d646f5101c78d0b54787593eac5f0e11 + pristine_git_object: 2d8287fd5b24a5c3079141547bbdaa421b3f28fd deleted: true docs/models/sourceurl.md: id: d1991075045c @@ -6260,8 +6545,8 @@ trackedFiles: deleted: true docs/models/streamevents.md: id: 7b9e7f83a124 - last_write_checksum: sha1:537aaa797aaf43c2f3651cc78506daa0411d156f - pristine_git_object: cebb3937b3cef570ecfc28b35d1a066c82833639 + last_write_checksum: sha1:37d70f083bd9bad63b64aa3b8382cd328e646aab + pristine_git_object: 71cee2237554deb14594ae8424d11856f4f8baf2 deleted: true docs/models/streameventsresponsecompleted.md: id: 162356c5e731 @@ -6345,8 +6630,8 @@ trackedFiles: deleted: true docs/models/subagentreasoningeffort.md: id: 8685e00ded70 - last_write_checksum: sha1:179bf1060272cfc5f8021b8c689043f723dfef5e - pristine_git_object: 8fede0e6ee8160923903c0b53f20bfa806723c61 + last_write_checksum: sha1:88bc512d934dff62369deb896e5ff37222896800 + pristine_git_object: c055e7e7239ec60927d6fa6f8284d0535a591fbc deleted: true docs/models/subagentservertoolconfig.md: id: 244b843d9c3a @@ -6398,6 +6683,26 @@ trackedFiles: last_write_checksum: sha1:8b9523fd7ab176efd18d65285e247b9a9785b688 pristine_git_object: 64c9e88c5641d2875d863772742ac1b92cb5ff43 deleted: true + docs/models/taskclassificationitem.md: + id: 299f0889f543 + last_write_checksum: sha1:fccc9a2e13c8a35a716763d0676f1e1547a3cd9b + pristine_git_object: 82923d44f04ed2cfa4c5faff1d730fd01c0d5648 + docs/models/taskclassificationmacrocategory.md: + id: ebf9bd020d4e + last_write_checksum: sha1:ea2bff702d803bf3fbf3973f64991bccf05e5dbf + pristine_git_object: f3e237ec80e69dc2d0acce1fde7b34c757afc792 + docs/models/taskclassificationmodel.md: + id: 5ba41c4a8072 + last_write_checksum: sha1:e66f0acc53f191ff660bd8518e2f36b9ade4f2cd + pristine_git_object: 9b74649ab17355826583cccf32dfe16e76c1c9c4 + docs/models/taskclassificationresponse.md: + id: 02437ec92cc3 + last_write_checksum: sha1:3750ac2c9c5800e2261e8830a99b082c531f6849 + pristine_git_object: b24bebf688dfa56132ede4f80c9236e7f3d87bb5 + docs/models/taskclassificationresponsedata.md: + id: 5b5311f141ea + last_write_checksum: sha1:4de74e982acae65908127c6354f32414c2b7cad5 + pristine_git_object: d1a8f422139fe467acf6f8fce747711cad9eb138 docs/models/textconfig.md: id: 3545c99b0969 last_write_checksum: sha1:f239ea46d9e41cb9356d9a2891dffb5ed99de9a4 @@ -6468,6 +6773,10 @@ trackedFiles: last_write_checksum: sha1:fbe77d5e54ff3c668d790809f2e39a193616905e pristine_git_object: f8e948cd2925ac3d110ed02a09e84b01f0b50344 deleted: true + docs/models/timings.md: + id: eb749976982c + last_write_checksum: sha1:43ecebedd106bbffffaaa1d7d7656a4ec6a58b95 + pristine_git_object: 6787bd7ce86211ce0c89055de47421d9c949e2bd docs/models/tokenizer.md: id: 8f0a31dac373 last_write_checksum: sha1:f25c6fefc85b42fe1bb251de683c720dbefefbad @@ -6668,11 +6977,43 @@ trackedFiles: id: 769991618d26 last_write_checksum: sha1:073e42ea882cc210725f64898e33a58687444bdf pristine_git_object: 12ff8937ee3d8246b20bf835bfaac766cdec65a3 + docs/models/unifiedbenchmarkpricing.md: + id: 98bf9d88d551 + last_write_checksum: sha1:4d9fd4478e1ae02ceee2a8ecd8da5b3bac894802 + pristine_git_object: 2d66c1599852915afb864291bf7f2a4bce96331d + docs/models/unifiedbenchmarksaaitem.md: + id: 5a16272abc20 + last_write_checksum: sha1:b4b23e8b3bd334ad439c3fdfbd4032b01ecc3da2 + pristine_git_object: 38ef1810f222602f733af75e473d2a693805b2ab + docs/models/unifiedbenchmarksdaitem.md: + id: 4ef3c9b25a4f + last_write_checksum: sha1:cbbe649ddac47cdb13a64965fca751988fb46f80 + pristine_git_object: 19a81a07127f5a1e929dea41dbc77e760189f0c8 + docs/models/unifiedbenchmarksmeta.md: + id: 9ca84a93fcdd + last_write_checksum: sha1:5a9e6e72f1c1afaae86aafed3be93ca7284e5ae3 + pristine_git_object: c03d905a06fa3cc2a65685bbd511bf5a67d34374 + docs/models/unifiedbenchmarksmetaversion.md: + id: 1e84a34547c8 + last_write_checksum: sha1:3086270a0efffc88d8a9bd5f32c5cedfd9819178 + pristine_git_object: 5dbacf03f24ed26bc1724e2d493cf1d0546c2c57 + docs/models/unifiedbenchmarksresponse.md: + id: bd3775eed576 + last_write_checksum: sha1:257aa88bc5a148bb28b952c921272ac0e7193330 + pristine_git_object: fd96fad72d61b8f7b2172bdb1e58372d652a0662 + docs/models/unifiedbenchmarksresponsedata.md: + id: 98b62e947676 + last_write_checksum: sha1:ec8f1bcf7ecc4f272204b144dd242287b77e86cb + pristine_git_object: 8bf9a04ae45e63e5d75a3e8a519f1fad4a1aaff7 docs/models/uniqueinsight.md: id: 9536f878930d last_write_checksum: sha1:0ce0cd9ccfe0e92ebb6c0c96d2a3a136165665de pristine_git_object: c31d6e21e8624c0d7755e5569a8fd93072c3d30b deleted: true + docs/models/unit.md: + id: 02c7edf859a4 + last_write_checksum: sha1:ec2501b320ef7c861791a95024fe1cef4166dae0 + pristine_git_object: 98c806d6dd29f049f4be5b1ad1dc14d9a338aeb4 docs/models/unprocessableentityresponseerrordata.md: id: ece17be345f0 last_write_checksum: sha1:f9fb4891998fb92818f079d00d3081ead7d51421 @@ -6721,10 +7062,12 @@ trackedFiles: id: 62ee02cdd938 last_write_checksum: sha1:81557306485380cc13970d9775d05a2497a243ec pristine_git_object: a42e5951b0545a15fc43e646ae9e1eed1c769600 + deleted: true docs/models/upsertworkspacebudgetresponse.md: id: 0c591e2948b7 last_write_checksum: sha1:acfe317cf75678391860a4d5c573d3c4860fa251 pristine_git_object: 1ec53e116474ab906ba0a4738bdf0a1243176a41 + deleted: true docs/models/urlcitation.md: id: 6aea1a90dde8 last_write_checksum: sha1:e5df19403ffa88cf3428f15ed4563c9f10447a12 @@ -6770,19 +7113,27 @@ trackedFiles: deleted: true docs/models/videogenerationrequest.md: id: 54058783eb0d - last_write_checksum: sha1:782804c9f071b29952de607116eba0e9a044689b - pristine_git_object: 178e35f3b4f730145d30804333e2c8d433bda124 + last_write_checksum: sha1:5ce4b938475e68b1e75a3646c3eabbc66ac5e917 + pristine_git_object: 12933141e29d4fee7e7fb16c7e4ad9bdc03cc221 deleted: true + docs/models/videogenerationrequestaspectratio.md: + id: 2ecaa5a363b2 + last_write_checksum: sha1:434fd315824c2f5c2faa62de0d95ecfdd04fda9a + pristine_git_object: 7af9f8e85c5bf98122d83d5cf5c2f4d3d1b1805c docs/models/videogenerationrequestoptions.md: id: b8bc36028d6d - last_write_checksum: sha1:67cbcaf85c834192d8c563f63fbcbda0222e0009 - pristine_git_object: e47ee7a4a7fefcfd308cf35c6b6aeb23c909e688 + last_write_checksum: sha1:09bb4ac4f97809ddc2159bc91cb5f2d379d6c45c + pristine_git_object: f5ce39ca062906406a915e81dfaea849a31937ec deleted: true docs/models/videogenerationrequestprovider.md: id: eef166771d33 - last_write_checksum: sha1:a0fbbd875162331bb9dccf0a6b8b90109d51701e - pristine_git_object: 2b004e9c020ac8c8953c48f0fedaefd05989060a + last_write_checksum: sha1:aeb8022be1f0662c8f1e9213a81762fe3368c563 + pristine_git_object: d140628a1749ca0bf37a6d189fc4f58a1bb43b80 deleted: true + docs/models/videogenerationrequestresolution.md: + id: c11458334278 + last_write_checksum: sha1:3e777eb71408de59945dc78e78d2d201aa7fdb5d + pristine_git_object: e798a88cf1c67b96e82f4782502768d9adb8bf26 docs/models/videogenerationresponse.md: id: a34cc8c878a2 last_write_checksum: sha1:ab1cd51722f034f5edd024a6006efa4fb3adbbf8 @@ -6955,10 +7306,12 @@ trackedFiles: id: c678dc2b99c5 last_write_checksum: sha1:41a7076e626f37245109117de75302fed706700b pristine_git_object: 9acac00214f2fe92257e588da35796c6d40e3f53 + deleted: true docs/models/workspacebudgetinterval.md: id: c508bc91013e last_write_checksum: sha1:95e1219e91bd3a0c5717b8ad0ac1237710acb37f pristine_git_object: 45631df7fe5271927ba959e5363f18df90b8dd2e + deleted: true docs/models/workspacemember.md: id: 74015b802170 last_write_checksum: sha1:93ba22a4fe479c4ab77db026481e3fd47e14f70e @@ -6977,6 +7330,10 @@ trackedFiles: id: e2bd25998427 last_write_checksum: sha1:101f1e799a897e49663ed287cbaab2121f07c82d pristine_git_object: a2f9bf1e079e16406d4274d2260e792b7e0d4426 + docs/sdks/benchmarks/README.md: + id: 61c16262af9b + last_write_checksum: sha1:17fd0e4aa4c358c6298ee9a434a14ff68ce83dbf + pristine_git_object: bbc0b71be852cd72bef52f5c2efe246a657a5db2 docs/sdks/betaanalytics/README.md: id: e037af84b386 last_write_checksum: sha1:c76adb9f7c43f5a243eb7969aeade241f4d992e2 @@ -6991,14 +7348,18 @@ trackedFiles: id: 393193527c2c last_write_checksum: sha1:72940d17ba0d4bb4fb44c40c78a732383d92b3e5 pristine_git_object: 23b77eb075bc14bdb4933f3eed8dd23c20fcb58d + docs/sdks/classifications/README.md: + id: ba3b1f5de071 + last_write_checksum: sha1:409a250dc30f3a964505140203a823d29c222301 + pristine_git_object: 69a260b54b28636ac6153e57cc2d6826b7c7d03f docs/sdks/credits/README.md: id: 81608135c0ff last_write_checksum: sha1:fddf93226f9196a966a592422c07720f5233a8d6 pristine_git_object: a902be6fa740c256c7a78fc05b891ed610710feb docs/sdks/datasets/README.md: id: deb5d90f4faf - last_write_checksum: sha1:bed3bc40b4fb5f86c8940d8d5b489e6b8780121d - pristine_git_object: 85359f31b77102cc86390cd80b3c6a85a321b35d + last_write_checksum: sha1:5816470b019dd193623af3b0cbf8a795d834250b + pristine_git_object: e56eda099b10a6bc6128a4122a45521a07ab743a deleted: true docs/sdks/embeddings/README.md: id: 15b5b04486c1 @@ -7021,6 +7382,10 @@ trackedFiles: id: f72b38a5a2a7 last_write_checksum: sha1:a150a953a7dc2dfb2713527cef67dc2190797b54 pristine_git_object: 08a6fe8c3f41559b4c58a63d1672d7f77aab5129 + docs/sdks/images/README.md: + id: cc752c3524d0 + last_write_checksum: sha1:30cb5d17118722e49d11f064014d50e8ba4ddaec + pristine_git_object: e98db72ce2b6787d4c6b20f004499630855ed23d docs/sdks/models/README.md: id: b35bdf4bc7ed last_write_checksum: sha1:9a5fdd3e9d84aa18133af9dfb724fc7c4370afce @@ -7099,12 +7464,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:b9bb27ad91f2f5db898a0fa04f5a8918b6ffc3f3 - pristine_git_object: 4da4364d1fea0c03b42152ce675569232241e080 + last_write_checksum: sha1:49e647d541960f416708592ff90dd91ba327a082 + pristine_git_object: 5582223ca37557214ef59e925a0fb12e0feac43a package.json: id: 7030d0b2f71b - last_write_checksum: sha1:31c0cbe5a20d7796e12161b52b25693180d640e8 - pristine_git_object: cb3f2902557b864afceb86913334706c1e91457e + last_write_checksum: sha1:ba8dc03bcdf61aaa9778e5d3ae79e2a0536685f0 + pristine_git_object: 529c43f6d4c7a938a9a784b882cc12d6ee21b152 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -7137,6 +7502,10 @@ trackedFiles: id: 05700884934b last_write_checksum: sha1:1601df51682834e672fa4778f7faa6549ec7ab48 pristine_git_object: 8ba5a8539ecb868231e65516aefc024d60ee994c + src/funcs/benchmarksGetBenchmarks.ts: + id: 1b5fbe93cea7 + last_write_checksum: sha1:b355ca2a6b76f82a240aece175299a5cc04b9ba0 + pristine_git_object: 61a56aae36b2bcdec864abb409e33e86a9731a4f src/funcs/betaAnalyticsGetAnalyticsMeta.ts: id: fd48bb0a54a8 last_write_checksum: sha1:74fe8e626ccc50fc79049b94d97b157a90d1474a @@ -7173,6 +7542,10 @@ trackedFiles: id: 8c3aa3c963bf last_write_checksum: sha1:9e4a0bc020ca01935a74ce5a542fa68c0d410127 pristine_git_object: f47c1ecd0c50693547936c0caa4fc6261d9e7cb8 + src/funcs/classificationsGetTaskClassifications.ts: + id: 6f25b0c4e7a9 + last_write_checksum: sha1:b7184933a9d71ca7a912a80164d84041f0cfb29c + pristine_git_object: 24d8abc248f884bd5bdca5fff845e42e0f34e8c2 src/funcs/creditsGetCredits.ts: id: 88fdc1315137 last_write_checksum: sha1:d831746d067cb6a2b152f29c1b868029ccfc55a3 @@ -7181,14 +7554,6 @@ trackedFiles: id: 2ae09697d446 last_write_checksum: sha1:2e66aac41ab399a7005a1462361247229526b10c pristine_git_object: d5cedc6219034e33b9a17b67e43b9fcb7b0b033c - src/funcs/datasetsGetBenchmarksArtificialAnalysis.ts: - id: 8997506a6260 - last_write_checksum: sha1:7f5474ba4240a25843d6b9a908f5b6f86653bef2 - pristine_git_object: 317d232fa02ecd495e56ff9d5b4783640ec7ebbd - src/funcs/datasetsGetBenchmarksDesignArena.ts: - id: 1e5ef73682ba - last_write_checksum: sha1:cb144aeb0e495fb7209e080cd19424945833f4f6 - pristine_git_object: db10a9f95a48c3f184104c81fedf34e7e329ef7a src/funcs/datasetsGetRankingsDaily.ts: id: f0177699bfaf last_write_checksum: sha1:1249e6d078bcb317f5086a7719057b6176935b08 @@ -7289,6 +7654,18 @@ trackedFiles: id: f8685ead7098 last_write_checksum: sha1:7ba6c8fe9a755aa2d84b5dc80767169310ff9b4f pristine_git_object: 86b0e58bfa8533c0f21d767e4d06599dc920f17b + src/funcs/imagesGenerate.ts: + id: 5e770eb62f14 + last_write_checksum: sha1:e6144f32acc169ec1d717b6bc8f8836459c13578 + pristine_git_object: 3eacf26d89aa73e9ac305e7043545ac3184e74a0 + src/funcs/imagesListModelEndpoints.ts: + id: 3ea7b12b2160 + last_write_checksum: sha1:7284aec540d7bf1f7c3473edb2595433499376d1 + pristine_git_object: 8a9202cdaa58b8baef1d894526c50d7997890007 + src/funcs/imagesListModels.ts: + id: fa32f43b49ee + last_write_checksum: sha1:b3b6e136ba645588529d264edac7a95736bd3543 + pristine_git_object: 7cae27395a6f842cde95565a869b1ba8567b38fd src/funcs/modelsCount.ts: id: 371adfc67b48 last_write_checksum: sha1:54ea5fa73aff71dd48613e04987c315675ea1d42 @@ -7459,8 +7836,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:8230365dbcdee12d1368a606259e7d7f53aba0ca - pristine_git_object: f9bb538d6de8df9fc2546b64d2459823a01bff86 + last_write_checksum: sha1:972ada09f00d5f8e641a4064475bbdce848b165a + pristine_git_object: b932decc07728b578a7ab8a9a56fcb3a58f840e4 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -7539,8 +7916,8 @@ trackedFiles: pristine_git_object: cf29641ce1922382ca1819ff84f8225c6bb10c3c src/models/advisorreasoning.ts: id: 4c86be6688b0 - last_write_checksum: sha1:fa71cd107c08c0fd275b36d1f9046fa97b8a86d7 - pristine_git_object: ce1fb90dcba99f205b6f7bad4f0077452d229511 + last_write_checksum: sha1:e8706d4a0822ef4f7dcea85943851788ed3228a0 + pristine_git_object: 5b8bb504c65c4eae933840a593eef9de8c7a6525 src/models/advisorservertoolconfig.ts: id: 4c2b85fa1b08 last_write_checksum: sha1:9141540fadec398ef62732f5e988cd9836330ddb @@ -7553,6 +7930,10 @@ trackedFiles: id: e5c5f2adf5f6 last_write_checksum: sha1:cfdc0bc74649bff392e7c1207c27f8510eb3b177 pristine_git_object: 42c4ab2abeb2cc6f73bdf49eb012d35b874ebba7 + src/models/anthropicadvisormessageusageiteration.ts: + id: ff2ce164571e + last_write_checksum: sha1:f43bb689a58850f35a60e22998808c0d192b2535 + pristine_git_object: f12adaba28ed00d42c0f19970a2b3d058741f731 src/models/anthropicallowedcallers.ts: id: eb986e460cfe last_write_checksum: sha1:4882a04a935c81bf8b68771324ea68756baf15a1 @@ -7593,6 +7974,10 @@ trackedFiles: id: 5c08200bb3d1 last_write_checksum: sha1:a6ccf6fd721d9dd9e28fda4c3eef4948a6177efa pristine_git_object: a178b5ca13499fa173b5c92729692ef070a79b1e + src/models/anthropiccompactionusageiteration.ts: + id: 5982ebca6c31 + last_write_checksum: sha1:fb5bf3421b2d917b18edf37fd9a00586b1bc27fe + pristine_git_object: fc4ac02f6793b640bd76cd732ce65ec4a4f8f320 src/models/anthropicdocumentblockparam.ts: id: da62cae77bdf last_write_checksum: sha1:c28f39fb3c5bcfc446ddcc033fa1075c096a1278 @@ -7617,6 +8002,14 @@ trackedFiles: id: 24d82ce75c3e last_write_checksum: sha1:5239e7321e4a251e2463714f1ec80e7f04ac5154 pristine_git_object: c1d740d47bfa54129bb4fa64e22e26def35bd887 + src/models/anthropiciterationcachecreation.ts: + id: eafcf72fb51c + last_write_checksum: sha1:0446afd89963dad3452602ea6a46df2eb454bb8c + pristine_git_object: fec91ecde0e53e916fd3c0edbebf663547153f59 + src/models/anthropicmessageusageiteration.ts: + id: fabb23153447 + last_write_checksum: sha1:8bdd39f517d590f291e1fa8714ef874d7afe7c2b + pristine_git_object: 98bc74f9b419da56f4284b5aaad033c11b0cc5da src/models/anthropicplaintextsource.ts: id: 6f9fad0eec61 last_write_checksum: sha1:7fe384f73e8a0d76944a45998bb9c9fa443acb89 @@ -7625,6 +8018,10 @@ trackedFiles: id: db204b792de1 last_write_checksum: sha1:17e85989d5fdb3f5f3dc811793178d52286bd229 pristine_git_object: c70be3e55b988282bcf92dacd0dacf9873173f8f + src/models/anthropicspeed.ts: + id: 8c545705b9ae + last_write_checksum: sha1:0865be48b1c03315b0eda9264c227cef6b92543d + pristine_git_object: 59606eec154e5ef8c56070a0de101237e710dd95 src/models/anthropictextblockparam.ts: id: 81e2e56dbe5c last_write_checksum: sha1:734eaebcdbb0a21d3d0c122a96c1b119fb972feb @@ -7645,6 +8042,10 @@ trackedFiles: id: 301a0cf591e6 last_write_checksum: sha1:6560facc9abb5469126fa807b140a89e3386915a pristine_git_object: b1fa4b01925e62b0964e455397dc3552299060fd + src/models/anthropicunknownusageiteration.ts: + id: 4c070ad010b0 + last_write_checksum: sha1:c41ad0894514d39f33d3c71ad22f4fce20b1ccc4 + pristine_git_object: a49fe23d407e4d0cd748f6426a4223fc2d9b1b42 src/models/anthropicurlimagesource.ts: id: 093d880f76ab last_write_checksum: sha1:e9a30b6b007d62127d287e0dfebb94f7de939e42 @@ -7653,6 +8054,10 @@ trackedFiles: id: 49c061ca1bd2 last_write_checksum: sha1:9055b0a76c38a2061ac05da1564c10740b3e36d4 pristine_git_object: d25bd1f2c5f6d9fccc6fa7e7736b394fc68ec7e8 + src/models/anthropicusageiteration.ts: + id: 8daa16a72772 + last_write_checksum: sha1:b4a1d2bc22303a90aba7ca9f1588ffa7f1c02867 + pristine_git_object: 3d38ee585eca63a97ff19c7c6a4041aaea075dd6 src/models/anthropicwebsearchresultblockparam.ts: id: b8fe75186751 last_write_checksum: sha1:6566be2da70fd80e7874c431b094f97a699d1be0 @@ -7661,6 +8066,10 @@ trackedFiles: id: e9ba7619b5e0 last_write_checksum: sha1:efa21b4df2fe7f4e4c9463c3185ce9b1866abe38 pristine_git_object: 5993adacd120f2f562c1c31a335276356a67bd64 + src/models/apierrortype.ts: + id: 240e785ddd59 + last_write_checksum: sha1:3886d3db8ab52f69d8c0d2d0e100c5020f71cfb5 + pristine_git_object: c1ef907908d62eba9d40969e27b5d08ccbfbffce src/models/applypatchcallitem.ts: id: bb5c3b2b01b9 last_write_checksum: sha1:a23254f901ebdedab0a3db3ff871a556248be675 @@ -7757,34 +8166,10 @@ trackedFiles: id: 61289ac69d53 last_write_checksum: sha1:72c2589843687ac2d3f38e6796d333ed1ccfc4db pristine_git_object: 04093e855ff637f0f53758e7eb842c5a8bda4a21 - src/models/benchmarkpricing.ts: - id: 74aab084b178 - last_write_checksum: sha1:f767529db933eec850e70c1a6efcc3e41447e36c - pristine_git_object: 274450e53b905ef0a5daa4b74e9db52d523c60a2 - src/models/benchmarksaaitem.ts: - id: 82b5c9f01e00 - last_write_checksum: sha1:5895ceb46fc3f0f7148a4e2a3dff3cfd1e6246a7 - pristine_git_object: 54fbada85e21e548d78712863a83cce94eb1bb99 - src/models/benchmarksaameta.ts: - id: ea7ac20c3f7c - last_write_checksum: sha1:468aefb21a577e5274c153a40a686ffa9aa530e0 - pristine_git_object: c64ee9ca0f28f05cbfa97e272fed084127b5cd1b - src/models/benchmarksaaresponse.ts: - id: 57a074171835 - last_write_checksum: sha1:413b40b3e3c0571e8c544ad652cd29b8b3f2674f - pristine_git_object: 39ae16b8eb695be512781947f258851e378c469d - src/models/benchmarksdaitem.ts: - id: a8a7a42ac948 - last_write_checksum: sha1:009ee8dd42435a322d95f2cf571680e7d5f0efff - pristine_git_object: 60e0bed98f8e363c572dcaadd60b674f8ecc8a21 - src/models/benchmarksdameta.ts: - id: caee78d8918e - last_write_checksum: sha1:e13b15ab0bceaa82a1f02c3fd853265a99ffa4ba - pristine_git_object: 3ae479d96bf0ec466cfa8b1f32cb93d18a7754a7 - src/models/benchmarksdaresponse.ts: - id: ea90fb0e8882 - last_write_checksum: sha1:c7495300898b4e3de0ca223f62815a5b558dd1e9 - pristine_git_object: 7477dd4474c6b9b72b1443a38b38ba831515b1da + src/models/booleancapability.ts: + id: b920d99cecda + last_write_checksum: sha1:d699ec6e03a7bad0aa439bdf4e2094f1bff5cca3 + pristine_git_object: dc7b6836600f382d2175ea2b0c9dfcb219277fee src/models/bulkaddworkspacemembersrequest.ts: id: dc2d569c8386 last_write_checksum: sha1:97635406307dcdb64f23774918ba27340a239060 @@ -7839,8 +8224,12 @@ trackedFiles: pristine_git_object: 774e615663152a8cd2a9aedd91072d53bf2a9471 src/models/byokproviderslug.ts: id: f8e7a5a4b0a2 - last_write_checksum: sha1:c021903c15303c8ad96d116f85c1bd0b4104e711 - pristine_git_object: 7a424178ef9bedf2317c174e9ca877e7fa2a8936 + last_write_checksum: sha1:cba1c3d97d635f76ecaba0d58b313354ca7820dc + pristine_git_object: 0ca78dd04a0ce18caae035818f549142aa33f0b5 + src/models/capabilitydescriptor.ts: + id: 867d654ac8ab + last_write_checksum: sha1:85657be17f920009d3e8ee58b548d9bf64995059 + pristine_git_object: 610154ca320e7a61495ca159dfddc205355ad68e src/models/chatassistantimages.ts: id: 31fb8a4309f9 last_write_checksum: sha1:6b04f05aba427f76bd7a45345cf1ab055ff45ea9 @@ -7939,8 +8328,8 @@ trackedFiles: pristine_git_object: 321dcdebd677779915fa4f9a805175997936d368 src/models/chatrequest.ts: id: 5d2646ed8dcf - last_write_checksum: sha1:2709f3353e6b24778e95fc03fda900cfa0717c29 - pristine_git_object: 0cb4c3cb82c23bfd19ada539bdfd397e7b33d9cf + last_write_checksum: sha1:c14423f3d66cf3d9b681d60e4feaf8f5eac60929 + pristine_git_object: 09ff1b69f6fbc437c3396c73e912f18ddade243b src/models/chatresult.ts: id: afefd8aadd09 last_write_checksum: sha1:7372ab41490e6da62942059bdfd3f4f775171009 @@ -7959,8 +8348,8 @@ trackedFiles: pristine_git_object: a31c5fa956f97bb59c81fa91544208a659d14ef4 src/models/chatstreamchunk.ts: id: 361f940e91e4 - last_write_checksum: sha1:35baded08ada885b3b0a05663863f0bdb33ce5a1 - pristine_git_object: b4c41124a59c2b11326a5670f87ec35005c1e878 + last_write_checksum: sha1:d6fb90583c26f9277cd374c7bb805016fab5393a + pristine_git_object: 3a2e42e6ee96c3546577e7db53003e0fa1172a40 src/models/chatstreamdelta.ts: id: 74a4be948d5f last_write_checksum: sha1:ae892de5ee0fa7f4a7a8b699d25d5aa37fd97ff7 @@ -8003,8 +8392,8 @@ trackedFiles: pristine_git_object: 0ecb42a7c1f2bf45b22bb2a5327a477ddbc92cc3 src/models/chatusage.ts: id: 1e677d1ed4fc - last_write_checksum: sha1:568876e537175b0d6eaeb0fc81762e94635c1172 - pristine_git_object: 830cb8f0c1f8d6b446f969822297eba89e3e7959 + last_write_checksum: sha1:9797303ed873ea455db129961a1438865467cff2 + pristine_git_object: 6c8b508bce7bc90a39e8b23b6d87e7aa1474df25 src/models/chatusermessage.ts: id: bc892e4ebadf last_write_checksum: sha1:800c0c09e0bab3ba4cee106cd19103da41c7696b @@ -8083,8 +8472,8 @@ trackedFiles: pristine_git_object: ab8606009204f4def8f46d0d4f63419028158f22 src/models/contentpartimage.ts: id: 6b4d72ed5ae8 - last_write_checksum: sha1:2f2ad40c0a971d4f30331e00ff6d3134d4104ebc - pristine_git_object: ac4278f186850032ef49d5bf1c2268a56da78ee2 + last_write_checksum: sha1:3ad341ac48090f8156517d63b32cfdb4a5c20777 + pristine_git_object: 2b26b4e8a058e0d0ed8a2ce0ac9b39d8fae2f542 src/models/contentpartinputaudio.ts: id: af8bf50b2e52 last_write_checksum: sha1:f0aa041ee842bb74ea46b245a34a2b8b678874d4 @@ -8181,6 +8570,10 @@ trackedFiles: id: e0faf7e437d1 last_write_checksum: sha1:b0320051ebfbc03b25aa488b572c673c6290a23a pristine_git_object: 058ae695e4059db823c78b1110030ce4030fccef + src/models/debugevent.ts: + id: 8afa2111f54c + last_write_checksum: sha1:33097853e743772ccfe4da10a547b9dd49a17be2 + pristine_git_object: 2af8c3bcce75bed0515aebe2801c156deef0e4eb src/models/defaultparameters.ts: id: 8da6fac53cb5 last_write_checksum: sha1:dc62d9d9c09acf1f32802f9933078b144479d05a @@ -8225,6 +8618,10 @@ trackedFiles: id: 83efda25dcf0 last_write_checksum: sha1:524ec06d8573df95f0a5d2daa1782106d1f7c7fb pristine_git_object: afd9fedd3b5285d3929fb4c6f3069b7423412d10 + src/models/enumcapability.ts: + id: 5ad7989f6f99 + last_write_checksum: sha1:45b774cb0e11404faa7a432ed7eb8b8e8c904069 + pristine_git_object: a983fb06dfefce4758083cef380ce17909b6f154 src/models/errorevent.ts: id: a4e22766585b last_write_checksum: sha1:b4b6405d0a10949a531a578f3bc4168703b96b4b @@ -8427,8 +8824,8 @@ trackedFiles: pristine_git_object: e6cf22a41a624d7f692026d89505a73b048e7f65 src/models/fusionservertoolconfig.ts: id: 500c34bd192b - last_write_checksum: sha1:56675e7ed0a29d1926756822128f9a69452e5c25 - pristine_git_object: f56bb1a57d21fb7f355a7f55067958acc5841cb1 + last_write_checksum: sha1:b342fc21f2c0cee71a2304e3f6ea4aafdbafe3f3 + pristine_git_object: b6e1465ce982dd06b2485f05f29ddc5be7cfc6e7 src/models/fusionservertoolopenrouter.ts: id: 01d346f44f6d last_write_checksum: sha1:4c457a429fb12cb9e6d41fc188ff590f19ccdb35 @@ -8481,6 +8878,10 @@ trackedFiles: id: 9b3ec0cba621 last_write_checksum: sha1:7854006d05dbbe04b4ed855a31a154618d4294af pristine_git_object: e7aa852af127efd63b57e7b5c4524baa9f9f4f57 + src/models/imageendpoint.ts: + id: e13b5353df71 + last_write_checksum: sha1:58620fe24052ce6041f967a6d5fc99329d231c53 + pristine_git_object: 7ef4d9db46be71c935e8bbd320db66daa515ffc7 src/models/imagegencallcompletedevent.ts: id: fe8d977c7dca last_write_checksum: sha1:882d2d4e20c2de3b628f492be48b96753344d507 @@ -8497,10 +8898,22 @@ trackedFiles: id: db1f02788378 last_write_checksum: sha1:5245f35607bf92b5c41078b8624b73662dd83624 pristine_git_object: b1924280722662202c5bf1d71ee29e13ee9c244f + src/models/imagegencompletedevent.ts: + id: df990f384b54 + last_write_checksum: sha1:772f9198ec0d56fafc23d61e2679ca2168b050d3 + pristine_git_object: 9702916f95f0d623807997b1f30987a71c5a2042 + src/models/imagegenerationrequest.ts: + id: ea1ffc0d2470 + last_write_checksum: sha1:5ed336290ec26b8144f5b109addb52ed8d930bfc + pristine_git_object: 2b790e11d5b786416cc9d528ad90662835ff7218 + src/models/imagegenerationresponse.ts: + id: 18aeba0f13cc + last_write_checksum: sha1:6de9fbc581399a7ad1650c890605c3ddfe0fa209 + pristine_git_object: 9f62f71633d97c6daac834c8b313396280a9365c src/models/imagegenerationservertool.ts: id: 1efbad50f534 - last_write_checksum: sha1:e998970323aa058948c15395a7f9b7b70b05ae4b - pristine_git_object: 9f01df09f5430987fc81dc429ec5add2e202e30b + last_write_checksum: sha1:a41de6235ce38b6d95c5b0ce3ac8855cc1a880c6 + pristine_git_object: c19ef5e28c10e50f2db9e00b953d791869a45035 src/models/imagegenerationservertoolconfig.ts: id: 1d04d0100527 last_write_checksum: sha1:c7265b445fab34f56906dfd7549c55949503a665 @@ -8517,14 +8930,54 @@ trackedFiles: id: 2a72a5923e5a last_write_checksum: sha1:54850900dd3ae1504340efdc87f6435f4dc4e21e pristine_git_object: db61647cd182502b2b3b5333ee3a0bba66542645 + src/models/imagegenerationusage.ts: + id: 4f128ace6b39 + last_write_checksum: sha1:6aa872bc89e3b10d88d0138c731037ec8104d7b0 + pristine_git_object: e6e3369520e96e14b86ad18ec3c8384e5cb14310 + src/models/imagegenpartialimageevent.ts: + id: ee4283390600 + last_write_checksum: sha1:0e059239eee8cb3d77ece47bf6f28ef29bd1692c + pristine_git_object: b5205a3234a880b9682b7bf9a15198294b65ad4a + src/models/imagegenstreamerrorevent.ts: + id: 3ba1d6d94b96 + last_write_checksum: sha1:1a3e9acaa48c20b4a700989d3926effcfcd711f4 + pristine_git_object: eaf7e8eb3d669c9fd654c77e1b5acfef11a8a784 + src/models/imagemodelarchitecture.ts: + id: b316f2890f6c + last_write_checksum: sha1:34a81ccce5d24459002b87cfb3409dc8bc8505bb + pristine_git_object: 02de4afc626145d47ea83476739174437695dd18 + src/models/imagemodelendpointsresponse.ts: + id: 77af9d23f8cb + last_write_checksum: sha1:65b3277483bfb41eaf132daa23b5580f27f12a99 + pristine_git_object: 7a2e3f2b135363d9ec88f80dee4c20993c78754f + src/models/imagemodellistitem.ts: + id: 12f1f7100366 + last_write_checksum: sha1:17e570dca0525de36c3fb8576165428294b49623 + pristine_git_object: 4de8d0a679a4c0ecc7a2089ae7a032ca44db0e2f + src/models/imagemodelslistresponse.ts: + id: 635379f06ace + last_write_checksum: sha1:0eb8dd23a1bd7bb071f9bed4cc8ea10d0d9d424a + pristine_git_object: 749d7fd164e1bfb52f271cfa1fb7f318d779aa0d + src/models/imageoutputmodality.ts: + id: 7af79a028664 + last_write_checksum: sha1:8c695cb312d37b2ceaba63970fe12d6a9c007a93 + pristine_git_object: fdd6b374806ad47b9e2bb8d9d4b2968e2c1f0bb0 + src/models/imagepricingentry.ts: + id: 7a0d3f05b12c + last_write_checksum: sha1:814a2fe0f0c8c63543ee2f0bed1ec5af800b17cf + pristine_git_object: 9842d1f2be8893820524067e5501beacb0e3dfe3 + src/models/imagestreamingresponse.ts: + id: 845661ccae1f + last_write_checksum: sha1:b9c81f7202d65b97456a1bcc2cc41f14edf11109 + pristine_git_object: d76607d5f6939baba8577654225d45c1547e8af5 src/models/incompletedetails.ts: id: 1d922f86c2f4 last_write_checksum: sha1:95b894f6e07eefe5f1775877c87c5fb7c7b8ccc3 pristine_git_object: 8e109bedfdcf2c4808e49323dda861e3c6069d51 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:5ff8c942a7d39487e134bb47034b8b790a49ff4a - pristine_git_object: b6af20234aa25d0050e16c4f2e622fe6b9341fe7 + last_write_checksum: sha1:912dd5ff7735d8ad2fdae9f1d20e37d8734c6e04 + pristine_git_object: 051c58c64591ebaf3f6ed205b141d9b8f93f7949 src/models/inputaudio.ts: id: 9bdc14c7565f last_write_checksum: sha1:2f8dc4c1d6a9c2927d9eb186e0ecedf7b81838e6 @@ -8547,8 +9000,8 @@ trackedFiles: pristine_git_object: a92bcc401c21e9213243e53629ccd4e673a94c12 src/models/inputreference.ts: id: 0e74e81647ab - last_write_checksum: sha1:5be381eab0f9f488db52752192c086cd3393865e - pristine_git_object: d03f51d8312422bb3fce841a9c4544af6b16b6c3 + last_write_checksum: sha1:62ace6791a6795738a3eee975f33d5e9e9fd042b + pristine_git_object: 17d6675adb62963dc496196cc3d67e86599ed299 src/models/inputsunion.ts: id: 3aff2165a17d last_write_checksum: sha1:1982a9a0348bb59d7c27f7592b8c122f9fac046b @@ -8675,16 +9128,16 @@ trackedFiles: pristine_git_object: 1d2e27ab306a807d803556c51a509622db8c9cff src/models/messagesrequest.ts: id: 572964d5906d - last_write_checksum: sha1:20bf9ab3a50cefbaa2938a7d69e20eb8245aa7fa - pristine_git_object: affa52981bc2812dccef446250319edadc88a1e7 + last_write_checksum: sha1:3bbde5ba39d1ac3ab90ee83a86c08f236666b1a4 + pristine_git_object: 934cb586ba72f1b6957f1b48024902ed26b668bc src/models/metadatalevel.ts: id: d3f8399ef138 last_write_checksum: sha1:fb505a139623750bdc309a69bf52feb391da103d pristine_git_object: fe01365b2f672e05779601a08c80f7e8eee154e7 src/models/model.ts: id: b99d4c14e794 - last_write_checksum: sha1:21fabc3dd4cf160d6d928b5baae7df50d27c1fb5 - pristine_git_object: 414b0872a5ea68967913de8b84eff7f6c80ac2e4 + last_write_checksum: sha1:6ce7782310911b2ed66114edae3280e742547d5f + pristine_git_object: 36fc524556c5a7e74eb21656a07a09e78485f87e src/models/modelarchitecture.ts: id: 57607576095f last_write_checksum: sha1:4c15d83f2f3c4f3af7c14185d039d1fec8cf9b06 @@ -8701,6 +9154,10 @@ trackedFiles: id: 965b10bc40c4 last_write_checksum: sha1:0dced5177ae5c305c73e3a1d35294698ea634cc9 pristine_git_object: dd5fb55709969dd04f6f1f562bf3057b680c95fd + src/models/modelreasoning.ts: + id: c7312e55417d + last_write_checksum: sha1:b1000a68d3419a3d17909f3f947889acfb40355c + pristine_git_object: 51568c0209fd84f3546c2a8c4ed19b61a8611c2a src/models/modelresponse.ts: id: fcc2bf8be188 last_write_checksum: sha1:991fae410d1711b9ba3775c96bc38bc9554e2b86 @@ -8727,8 +9184,8 @@ trackedFiles: pristine_git_object: aa237f7f6b89ed4a65adbff5d1fc12514cfa11b2 src/models/observabilityarizedestination.ts: id: 631c7deb0d5e - last_write_checksum: sha1:6a244b23c7d533145b2f459f66b7f3a2d7e6abb7 - pristine_git_object: cb98814e80cbd53a246869b805c79d320b01d27c + last_write_checksum: sha1:79d1ba45816c5ddfc148e37f28f28541a9a422aa + pristine_git_object: 2f277695125314f7557cf9bbb047761206319165 src/models/observabilitybraintrustdestination.ts: id: 37b935380e25 last_write_checksum: sha1:20031efd451bf87ebd5ac5f4df4f155c2784fe42 @@ -8851,8 +9308,8 @@ trackedFiles: pristine_git_object: 364907411826c3fa6e2b65c7d5bbdc569d4ea08b src/models/openresponsesresult.ts: id: 95391b93fcbf - last_write_checksum: sha1:982cdb988e0ef210f5fb3b78d796663a1f43036e - pristine_git_object: e233b23a1d957db2cb3830b915af72ef5de6d4b0 + last_write_checksum: sha1:22d33d256521780ca9e1b59e36761c00fceae0a6 + pristine_git_object: fe0e3b1664e194f96710c53ea129fbf4d6128fbf src/models/openroutermetadata.ts: id: 8a5688777dfa last_write_checksum: sha1:c0848426d86c463722d9ab725ca95262925cb138 @@ -8903,12 +9360,16 @@ trackedFiles: pristine_git_object: 536c37a011550df4f81508b09ac6790233bf92c6 src/models/operations/createembeddings.ts: id: 7c210337fdff - last_write_checksum: sha1:c578b14844bcfda5340d69fa91a6b04d292e149c - pristine_git_object: 03226207ec5407e84e32ef2ee847ca55efbd4b3f + last_write_checksum: sha1:4adbc4c99f97f3b2274ae4ed63d5005b8be4e21d + pristine_git_object: 3469cd4dd8fdf7a8a1d5212e1e22eb9fecf14292 src/models/operations/createguardrail.ts: id: 36e5a2696dfd last_write_checksum: sha1:4c668c93e119266cfdc1c46da678151673696fdf pristine_git_object: 2a17016216d1c5f2a3eb6ea3f286bee91f40a3a8 + src/models/operations/createimages.ts: + id: 0a478467f700 + last_write_checksum: sha1:c698b7850c9cb739b1822801f94af20ee22f38bd + pristine_git_object: 0a2ca2582247b2b60db1b464933ef5e599e430b8 src/models/operations/createkeys.ts: id: e7a250c8b7bb last_write_checksum: sha1:acf6b76635b875e8105d688eab5b3da275e0572a @@ -8989,14 +9450,10 @@ trackedFiles: id: edd3364e84c1 last_write_checksum: sha1:3368aad033c01d34f611ba291e8cd555a107310a pristine_git_object: 18f090439648b6fbd98936558a3669df06d9bbc1 - src/models/operations/getbenchmarksartificialanalysis.ts: - id: 1b7863e0088a - last_write_checksum: sha1:8e40e014506cf3e6597793efb34de7f88feda60a - pristine_git_object: a510b93023a863b52cca9806ff6555b0cf7b9e36 - src/models/operations/getbenchmarksdesignarena.ts: - id: 86e27de57b33 - last_write_checksum: sha1:1a8971a84794d3c0c51542bf7411ab6c7512fcd2 - pristine_git_object: 09db903b1ff19d80bde4c4dc71237e9440f6a960 + src/models/operations/getbenchmarks.ts: + id: 52eb1eb063ae + last_write_checksum: sha1:2e1ac9f4dbd9a1e94344afdb106559a769b37bbc + pristine_git_object: dc197dd7699266520be5b6e7bffe4bd599856a68 src/models/operations/getbyokkey.ts: id: 883c19bd90fb last_write_checksum: sha1:4a878f1b92430b6ea7254edac7e5ded6447592f4 @@ -9049,6 +9506,10 @@ trackedFiles: id: b165b39aba3b last_write_checksum: sha1:f3f6720e5806c995b1b8d1ff50c78695fdf4e5dc pristine_git_object: 9f6dbba7b0fbef8ca4ef105ff07a17622c041cf3 + src/models/operations/gettaskclassifications.ts: + id: 8482753ddd33 + last_write_checksum: sha1:eabf9f38dead635af268288733e71d20af1df218 + pristine_git_object: 47868501a4656f1d1cb9043d12bc503df56f62dc src/models/operations/getuseractivity.ts: id: 19535b4511a4 last_write_checksum: sha1:e1c9efdef2f64906b749d122e274238982c80944 @@ -9063,16 +9524,16 @@ trackedFiles: pristine_git_object: 6b14994d428c8fb6d58adc4f880ab796d6a2a2e5 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:48059c889096b7d5a9274124772912fdcc9c3533 - pristine_git_object: 54f61e82e897fd78c4e27a52fa866d732abfd7b4 + last_write_checksum: sha1:6ba681124ede286d1b104e265810d4fccb7c1d61 + pristine_git_object: 11720ee4cf9119997c06d3f1c7a8c0b0eb908497 src/models/operations/list.ts: id: ce11386ad30f last_write_checksum: sha1:c6f6be4f00954f38c1c900beff6956be260873e0 pristine_git_object: b64c2b0209d6c62ae2a42a3e6250d924491b36ce src/models/operations/listbyokkeys.ts: id: 953de50b8d0e - last_write_checksum: sha1:47bdbf2625db172d89b7ab564902d33f64c2b63c - pristine_git_object: ea2d4b6fc1d5d81485a5cc5089402895c358eed3 + last_write_checksum: sha1:36f8d3448828acaac0b642409b6414021337a20e + pristine_git_object: 70d68863449162c80954444d0b04b9f77a57d79d src/models/operations/listembeddingsmodels.ts: id: 568d609eb99c last_write_checksum: sha1:3e201ad1798214c57a18f46b0791b658d369a840 @@ -9105,6 +9566,14 @@ trackedFiles: id: 71455e4e600e last_write_checksum: sha1:0e2aea355b1bc90dec6c1199e11e6bb614149e16 pristine_git_object: 0f54025cfff54c4766b9f3060b290cf9024a1441 + src/models/operations/listimagemodelendpoints.ts: + id: efc8274ae41c + last_write_checksum: sha1:d7ff6377fc610a96803710f111beee837a8291c0 + pristine_git_object: 2297b5a25b489728ec6118d9028638275731c93b + src/models/operations/listimagemodels.ts: + id: 439d3eed4cf3 + last_write_checksum: sha1:8c63a2f39b210f1cd71ffa89f58e42168ccde4b8 + pristine_git_object: 53af57ce4fbd45ca669919b1e55d41052b43bb74 src/models/operations/listkeyassignments.ts: id: cf0d2f290052 last_write_checksum: sha1:14b67fa8d425c14356b7c2ff8ca8cd17732c464b @@ -9419,12 +9888,12 @@ trackedFiles: pristine_git_object: fbcf0dbcd4bae7f5b06957e0a7c6a75db9b79570 src/models/providername.ts: id: 89e536fb023a - last_write_checksum: sha1:b71257bf6ae96e80aa477102d2f829845973c73a - pristine_git_object: 7a46799fb15eaafd3f292905b62deb7b9577cdc3 + last_write_checksum: sha1:29b148573929fa81f06d1ea5803d23392ac7b3f8 + pristine_git_object: 3f27b88ecbe314e0637b61694156076b25aa74c6 src/models/provideroptions.ts: id: 65c45f7034d2 - last_write_checksum: sha1:3f13e9853776c1a053cb3f125811d51ce5db3f7f - pristine_git_object: dc49d8b51fc77fb4c5f001c6e96ce2b14d309d4f + last_write_checksum: sha1:e666d62c7a90ddb8c7342f7cae7de893f537e75a + pristine_git_object: 47f7f7181d96c54cb5e89065f15f554667f8f723 src/models/provideroverloadedresponseerrordata.ts: id: 379f1256314f last_write_checksum: sha1:0458b6a8454adfa7c415e3bd7f49f2879cc6093e @@ -9435,8 +9904,8 @@ trackedFiles: pristine_git_object: bf002879b3743ebeb20c0fa43df369757de9d068 src/models/providerresponse.ts: id: 7427d17a27bc - last_write_checksum: sha1:25bbea786475ef98e09b9412c9ccfb7956e9c09a - pristine_git_object: 4015a951b9b17ab675343f4e6dc9b2ce98f0061c + last_write_checksum: sha1:60e4ef9f011cc9363766f5beb733616b45476974 + pristine_git_object: f80be3b64009173833f308539e9477a4abaf9bcf src/models/providersort.ts: id: 7d1e919d1ec3 last_write_checksum: sha1:4c871e5fc8af6042ca41d12c54ba8640706c0863 @@ -9457,6 +9926,10 @@ trackedFiles: id: b28328f1822c last_write_checksum: sha1:4d10d34237fddb881f2c49c3e27342487e5fca47 pristine_git_object: 55082b7e886b01408398431244ebcf4ecef0f605 + src/models/rangecapability.ts: + id: 2a301274c1ac + last_write_checksum: sha1:fefd17f0f858c7a08b9144b51650d34384ccc11d + pristine_git_object: 978f5526811dfea2778305908677c09956a0f8f9 src/models/rankingsdailyitem.ts: id: 6f17738c68f5 last_write_checksum: sha1:23c72100f1caaa4b89e3596e1aabc9a29b87f5a9 @@ -9499,8 +9972,8 @@ trackedFiles: pristine_git_object: 440711e147f0de84b650ff99117d64564bf4de78 src/models/reasoningeffort.ts: id: dd747014f9d3 - last_write_checksum: sha1:593d1493673d94ff08828b62dbd88afe4ac9dc11 - pristine_git_object: 2804617c189acf4c4571cbc5d10d9178065ff537 + last_write_checksum: sha1:c1f5b2f2adcda8342de5b3b52ccf9f44ef04f9e7 + pristine_git_object: e9e0767ea0bbd131be060f3f8f4375309a271748 src/models/reasoningformat.ts: id: b523cf757168 last_write_checksum: sha1:6c79374859b23c316ee6595995d1bfcb767cbc8e @@ -9567,8 +10040,8 @@ trackedFiles: pristine_git_object: 584f66cd23f2e112b14f8d0b23aea1cd4532c412 src/models/responsesrequest.ts: id: 39799702f982 - last_write_checksum: sha1:a97cbbcae32e1073cbbc5d75da0f083b8a3675aa - pristine_git_object: 811f5ab498b3cea24ab6eb314887a32122c1e0dc + last_write_checksum: sha1:2512f606ac79c46fbb9ad68fef4acd68c51d3333 + pristine_git_object: 8a563db74afd079f163dc30d5f07265fd830f61b src/models/responsesstreamingresponse.ts: id: 69284d63df45 last_write_checksum: sha1:14c843dba32fef31c8684c4f363bf32b17d9dc97 @@ -9671,8 +10144,8 @@ trackedFiles: pristine_git_object: 9b47a83e44ed6bdfaf6ba88030021fe7a1f6a5ad src/models/streamevents.ts: id: 4aa1487f961f - last_write_checksum: sha1:fa8bd6321a8f1013a30fcd8842e3615d42558be7 - pristine_git_object: 3fef329fe5f1ac3ccdc86310a5fc92e341f10b37 + last_write_checksum: sha1:f6a3dbfe3762e43d3e575d4bb32d9e8915d13b94 + pristine_git_object: 82be1dbf67577e1beb64944427b4aa9e3276656b src/models/streameventsresponsecompleted.ts: id: f7fe07ad1c47 last_write_checksum: sha1:b6f66af07ebde97a9138e4c072f236a67abb0d21 @@ -9723,8 +10196,8 @@ trackedFiles: pristine_git_object: 7d16e38aa3b84a12022698586822d6518317859c src/models/subagentreasoning.ts: id: 916aba5c0712 - last_write_checksum: sha1:4d68579ce4aa6d0149a35b433a14a82d0575c6bf - pristine_git_object: 32611b13d6bf1b48d96a555952fc472beb2d08c3 + last_write_checksum: sha1:cfa29172e1d00690f9bed844670d4cabf33420c1 + pristine_git_object: 8b73e10c5912c1302bce02f2da912003e9ae35b9 src/models/subagentservertoolconfig.ts: id: 6f8ec51577e6 last_write_checksum: sha1:ccbf09ac9db835c5cc5fec8fc4b0412c692ade4c @@ -9733,6 +10206,22 @@ trackedFiles: id: fe81bd2eaa91 last_write_checksum: sha1:6c39d7ecc0f51e4463676281a100df15572f3cb7 pristine_git_object: bf98dba91e85e0a247151bea39ec3067deff8a4f + src/models/taskclassificationitem.ts: + id: 58896645e490 + last_write_checksum: sha1:03c3da09f40461a2faa1a7b19390326aef87b7d8 + pristine_git_object: b49f51a47bd34a07f72a45bdec2b480e9396a1d8 + src/models/taskclassificationmacrocategory.ts: + id: 72bec2c5ebbb + last_write_checksum: sha1:e6fd71b821e880763b3127e86f4d27a42de13601 + pristine_git_object: 276b0b767c635f86a7d43da7cf381e134cfb7007 + src/models/taskclassificationmodel.ts: + id: 5cf061d8d849 + last_write_checksum: sha1:8c4144a074b96e82afb1bba53b92c25c7c243bad + pristine_git_object: f79bf0dcda6fc0f2c7c9ac1bacf26123e0a73619 + src/models/taskclassificationresponse.ts: + id: e618eb0802a7 + last_write_checksum: sha1:c1d3bf31f8f7f191e800b042c8c0b561f845fc7e + pristine_git_object: a8ce6fb7f570ebb10368ab4f63df82b802db5139 src/models/textdeltaevent.ts: id: 920ea48e0f90 last_write_checksum: sha1:d38831d2e6e72a4d44e380f59a346d39042485f4 @@ -9773,6 +10262,26 @@ trackedFiles: id: d335c48e0c3e last_write_checksum: sha1:0aeb2103469f3dad0c04196c8470d851d7e09142 pristine_git_object: 3b24025f18893e96d15b6ae2f71de60a4ad721ee + src/models/unifiedbenchmarkpricing.ts: + id: c6862b5223a1 + last_write_checksum: sha1:497eb9d4343dd4ebb69a877a3f9564fb55c2cbe0 + pristine_git_object: 0a39dad2499f18e1e8ec597219ba8722af83fccc + src/models/unifiedbenchmarksaaitem.ts: + id: "436660899947" + last_write_checksum: sha1:af8cbe65cb56aca1faee5a75f5bf4034b01d0bf0 + pristine_git_object: b81f764c6053128a66ccbf1ede1284205e2d66c5 + src/models/unifiedbenchmarksdaitem.ts: + id: f911314affb3 + last_write_checksum: sha1:6002965f28bd01089c774dcc9a6351fefe0850f0 + pristine_git_object: caebfff514df1e0860f2b10b8bb2bab60dc5a58d + src/models/unifiedbenchmarksmeta.ts: + id: d146ee8b8956 + last_write_checksum: sha1:cc2f48479b7c292350d628a925d390b446f27af1 + pristine_git_object: 53b032904c780f077656ed40f649bdad6fee0714 + src/models/unifiedbenchmarksresponse.ts: + id: b3f08556727b + last_write_checksum: sha1:ab161f3c103603b9918a93bd248f609d43915e1b + pristine_git_object: 6c8181e31eae61857db9d2e08109fb0cd883155d src/models/unprocessableentityresponseerrordata.ts: id: "557063315301" last_write_checksum: sha1:77a2c2515bda14c3d700340277b8762cb0067688 @@ -9827,8 +10336,8 @@ trackedFiles: pristine_git_object: e45d2a0bf920e3a81ae21cd758f165677489cebb src/models/videogenerationrequest.ts: id: e72ea2e4c5b3 - last_write_checksum: sha1:d5c61d001e842c5842b6e089d2d48d2389f72b23 - pristine_git_object: bb47ecb3be197dfc69904f0e5edd81e3072443f3 + last_write_checksum: sha1:833c11316102d935a0b3d9ae25e62d861b5a73e6 + pristine_git_object: 6be62ffed0532c5f23676b7ada3b288c7cce393e src/models/videogenerationresponse.ts: id: 0a96c6ee9eea last_write_checksum: sha1:73c631114adc4f4076585919439c06126aa6d55f @@ -9945,6 +10454,10 @@ trackedFiles: id: 5dda931501e1 last_write_checksum: sha1:5487c45ff4293655f4bbbd4b23042acd1c23c96b pristine_git_object: 19b6c7c2a7f2a35969d68472c70ea83e31959fcf + src/sdk/benchmarks.ts: + id: 72ce7b70fba8 + last_write_checksum: sha1:13a8cc09bf27ce26f65caaace070df9c1b3257b9 + pristine_git_object: 53446d145df55261cd64aa200f7a23af2ea4a334 src/sdk/beta.ts: id: afeac65e28f8 last_write_checksum: sha1:56537204e5d03cbc46fbdea1d187d3d88592b886 @@ -9961,14 +10474,18 @@ trackedFiles: id: c56babc22a20 last_write_checksum: sha1:5a90f198aa5518222de6c13ef545f18d4d7f363e pristine_git_object: be2dd27c7af4e9c73097fc2daf24627e7db9936c + src/sdk/classifications.ts: + id: 2a28d7ad1729 + last_write_checksum: sha1:ace02036820124350bc079c376bdf30267d36a24 + pristine_git_object: 191de2eaa828b2f6de4883d072cff9d92094cbbb src/sdk/credits.ts: id: c72074b5f165 last_write_checksum: sha1:09ba049248259aa5bd8916df45ec4faf7967152e pristine_git_object: 02d1a2d408eca05a63439bdb65dfda8821f141fd src/sdk/datasets.ts: id: 2f1e89a21914 - last_write_checksum: sha1:1c647b6c450adc5a3cfcbc88a7e3945067b2924e - pristine_git_object: a3f51a67e18aa307957d5c8bb7367b67cd3d3723 + last_write_checksum: sha1:7e47655fbd6ffb4173dc60d6c78a1882a650be3e + pristine_git_object: 487dc147768e5637f03ab62fbb2b43b471613bab src/sdk/embeddings.ts: id: 70cbb18bedaf last_write_checksum: sha1:e62ce45c27f12941ae5ec7e458b87952db3cedba @@ -9989,6 +10506,10 @@ trackedFiles: id: 30ab0b1cc8db last_write_checksum: sha1:6e7a1d7b5be146cb3ac55353714c279eebac17ef pristine_git_object: d216397b76a62a3d994f151d3f2d892476f82a0d + src/sdk/images.ts: + id: 5b5822276576 + last_write_checksum: sha1:8c4bd28048f4e4b531587c8d6fe1d60b4dd15ced + pristine_git_object: 870d064ebf0b4e5a430ea025d33ddb2529b8d8c0 src/sdk/index.ts: id: a857902a703f last_write_checksum: sha1:54cdd8319bfbee269b54b8c56988fc0a678f2ec3 @@ -10027,8 +10548,8 @@ trackedFiles: pristine_git_object: 143b7b9e6a282d3c16648723c59648b335491972 src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:3a4454f47422804bd4cbdcd30a92dd205b364e4c - pristine_git_object: 9bbf1d64dab3fce3a462c5d70c1332299ed80082 + last_write_checksum: sha1:7f2f87637f308ae136d477dbcf290c2f7a4ec37c + pristine_git_object: 25257e81b6c5916e613c643b792c2715be83d4b4 src/sdk/stt.ts: id: fd9e88c22d1f last_write_checksum: sha1:81843dfe6675e4edca828465e7934f6505a69154 @@ -11480,9 +12001,81 @@ examples: application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getBenchmarks: + speakeasy-default-get-benchmarks: + responses: + "200": + application/json: {"data": [{"agentic_index": 58.3, "coding_index": 65.8, "display_name": "GPT-4o", "intelligence_index": 71.2, "model_permaslug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "source": "artificial-analysis"}], "meta": {"as_of": "2026-06-03T12:00:00Z", "citation": null, "model_count": 1, "source": null, "source_url": null, "task_type": null, "version": "v1"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getTaskClassifications: + speakeasy-default-get-task-classifications: + parameters: + query: + window: "7d" + responses: + "200": + application/json: {"data": {"as_of": "2026-06-17", "classifications": [{"category_token_share": 0.48, "category_usage_share": 0.51, "display_name": "Code Generation", "macro_category": "code", "models": [{"id": "openai/gpt-4.1-mini", "tag_token_share": 0.75, "tag_usage_share": 0.55}], "tag": "code:general_impl", "token_share": 0.31, "usage_share": 0.23}], "macro_categories": [{"key": "code", "label": "Code", "token_share": 0.52, "usage_share": 0.45}], "window_days": 7}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createImages: + speakeasy-default-create-images: + requestBody: + application/json: {"model": "bytedance-seed/seedream-4.5", "prompt": "a red panda astronaut floating in space, studio lighting"} + responses: + "200": + application/json: {"created": 1748372400, "data": [{"b64_json": ""}]} + "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"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + listImageModels: + speakeasy-default-list-image-models: + responses: + "200": + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "output_modalities": ["image"]}, "created": 1692901234, "description": "A text-to-image model.", "endpoints": "/api/v1/images/models/bytedance-seed/seedream-4.5/endpoints", "id": "bytedance-seed/seedream-4.5", "name": "Seedream 4.5", "supported_parameters": {"resolution": {"type": "enum", "values": ["1K", "2K", "4K"]}}, "supports_streaming": false}]} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listImageModelEndpoints: + speakeasy-default-list-image-model-endpoints: + parameters: + path: + author: "bytedance-seed" + slug: "seedream-4.5" + responses: + "200": + application/json: {"endpoints": [{"allowed_passthrough_parameters": [], "pricing": [{"billable": "output_image", "cost_usd": 0.05, "unit": "image"}], "provider_name": "Bytedance", "provider_slug": "bytedance", "provider_tag": "bytedance", "supported_parameters": {"resolution": {"type": "enum", "values": ["1K", "2K", "4K"]}}, "supports_streaming": false}], "id": "bytedance-seed/seedream-4.5"} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Typescript SDK Changes: - * `openrouter.workspaces.listBudgets()`: **Added** - * `openrouter.workspaces.deleteBudget()`: **Added** - * `openrouter.workspaces.setBudget()`: **Added** +releaseNotes: "## Typescript SDK Changes:\n* `openrouter.videoGeneration.generate()`: \n * `request.videoGenerationRequest` **Changed** (Breaking ⚠️)\n* `openrouter.chat.send()`: \n * `request.chatRequest` **Changed**\n * `response` **Changed**\n* `openrouter.presets.createPresetsResponses()`: \n * `request.responsesRequest` **Changed**\n* `openrouter.images.listModels()`: **Added**\n* `openrouter.images.listModelEndpoints()`: **Added**\n* `openrouter.datasets.getBenchmarksArtificialAnalysis()`: **Removed** (Breaking ⚠️)\n* `openrouter.datasets.getBenchmarksDesignArena()`: **Removed** (Breaking ⚠️)\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest` **Changed**\n * `response` **Changed**\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.provider.options.tenstorrent` **Added**\n* `openrouter.stt.createTranscription()`: \n * `request.sttRequest.provider.options.tenstorrent` **Added**\n* `openrouter.byok.list()`: \n * `request.provider` **Changed**\n * `response.data[].provider.enum(tenstorrent)` **Added**\n* `openrouter.byok.create()`: \n * `request.createByokKeyRequest.provider.enum(tenstorrent)` **Added**\n * `response.data.provider.enum(tenstorrent)` **Added**\n* `openrouter.embeddings.generate()`: \n * `request.requestBody.provider.ignore[].union(ProviderName).enum(tenstorrent)` **Added**\n * `response.usage` **Changed**\n* `openrouter.images.generate()`: **Added**\n* `openrouter.byok.update()`: `response.data.provider.enum(tenstorrent)` **Added**\n* `openrouter.byok.get()`: `response.data.provider.enum(tenstorrent)` **Added**\n* `openrouter.embeddings.listModels()`: `response.data[].reasoning` **Added**\n* `openrouter.endpoints.listZdrEndpoints()`: `response.data[].providerName.enum(tenstorrent)` **Added**\n* `openrouter.endpoints.list()`: `response.data.endpoints[].providerName.enum(tenstorrent)` **Added**\n* `openrouter.generations.getGeneration()`: `response.data.providerResponses[].providerName.enum(tenstorrent)` **Added**\n* `openrouter.models.get()`: `response.data.reasoning` **Added**\n* `openrouter.models.list()`: `response.data[].reasoning` **Added**\n* `openrouter.models.listForUser()`: `response.data[].reasoning` **Added**\n* `openrouter.presets.createPresetsChatCompletions()`: \n * `request.chatRequest` **Changed**\n* `openrouter.presets.createPresetsMessages()`: \n * `request.messagesRequest.provider.ignore[].union(ProviderName).enum(tenstorrent)` **Added**\n* `openrouter.benchmarks.getBenchmarks()`: **Added**\n* `openrouter.rerank.rerank()`: \n * `request.requestBody.provider.ignore[].union(ProviderName).enum(tenstorrent)` **Added**\n* `openrouter.classifications.getTaskClassifications()`: **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ebb40c73a..cc5ad2c3e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true typescript: - version: 0.13.12 + version: 0.13.13 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 3de5dd963..eb0b73498 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -177,6 +177,7 @@ components: effort: description: Reasoning effort level for the advisor call. enum: + - max - xhigh - high - medium @@ -2204,6 +2205,39 @@ components: required: - type type: object + ApiErrorType: + description: Canonical OpenRouter error type, stable across all API formats + enum: + - context_length_exceeded + - max_tokens_exceeded + - token_limit_exceeded + - string_too_long + - authentication + - permission_denied + - payment_required + - rate_limit_exceeded + - provider_overloaded + - provider_unavailable + - invalid_request + - invalid_prompt + - not_found + - precondition_failed + - payload_too_large + - unprocessable + - content_policy_violation + - refusal + - invalid_image + - image_too_large + - image_too_small + - unsupported_image_format + - image_not_found + - image_download_failed + - server + - timeout + - unmapped + example: rate_limit_exceeded + type: string + x-speakeasy-unknown-values: allow ApplyPatchCallItem: description: >- A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn. @@ -3651,353 +3685,22 @@ components: oneOf: - $ref: '#/components/schemas/ContainerAutoEnvironment' - $ref: '#/components/schemas/ContainerReferenceEnvironment' - BenchmarkPricing: - description: OpenRouter pricing per token for this model. Null if pricing is unavailable. - example: - completion: '0.000015' - prompt: '0.000003' - nullable: true - properties: - completion: - description: Cost per output token (USD, decimal string). - example: '0.000015' - type: string - prompt: - description: Cost per input token (USD, decimal string). - example: '0.000003' - type: string - required: - - prompt - - completion - type: object - BenchmarksAAItem: - example: - aa_name: GPT-4o - agentic_index: 58.3 - coding_index: 65.8 - intelligence_index: 71.2 - model_permaslug: openai/gpt-4o - pricing: - completion: '0.00001' - prompt: '0.0000025' - properties: - aa_name: - description: Model name as listed on Artificial Analysis. - example: GPT-4o - type: string - agentic_index: - description: Artificial Analysis Agentic Index composite score. Higher is better. - example: 58.3 - format: double - nullable: true - type: number - coding_index: - description: Artificial Analysis Coding Index composite score. Higher is better. - example: 65.8 - format: double - nullable: true - type: number - intelligence_index: - description: Artificial Analysis Intelligence Index composite score. Higher is better. - example: 71.2 - format: double - nullable: true - type: number - model_permaslug: - description: Stable OpenRouter model identifier. - example: openai/gpt-4o - type: string - pricing: - $ref: '#/components/schemas/BenchmarkPricing' - required: - - model_permaslug - - aa_name - - intelligence_index - - coding_index - - agentic_index - - pricing - type: object - BenchmarksAAMeta: - example: - as_of: '2026-06-03T12:00:00Z' - citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' - model_count: 50 - source: artificial-analysis - source_url: https://artificialanalysis.ai - version: v1 - properties: - as_of: - description: ISO-8601 timestamp of when this data was last updated. - example: '2026-06-03T12:00:00Z' - type: string - citation: - description: Required attribution when republishing this data. - example: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' - type: string - model_count: - description: Number of unique models in the response. - type: integer - source: - description: Data source identifier. - enum: - - artificial-analysis - type: string - source_url: - description: URL of the upstream data source. - enum: - - https://artificialanalysis.ai - type: string - version: - description: Dataset version. - enum: - - v1 - type: string - required: - - as_of - - version - - source - - source_url - - citation - - model_count - type: object - BenchmarksAAResponse: - example: - data: - - aa_name: GPT-4o - agentic_index: 58.3 - coding_index: 65.8 - intelligence_index: 71.2 - model_permaslug: openai/gpt-4o - pricing: - completion: '0.00001' - prompt: '0.0000025' - meta: - as_of: '2026-06-03T12:00:00Z' - citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' - model_count: 1 - source: artificial-analysis - source_url: https://artificialanalysis.ai - version: v1 - properties: - data: - items: - $ref: '#/components/schemas/BenchmarksAAItem' - type: array - meta: - $ref: '#/components/schemas/BenchmarksAAMeta' - required: - - data - - meta - type: object - BenchmarksDAItem: - example: - arena: models - avg_generation_time_ms: 3200 - category: codecategories - display_name: Claude Sonnet 4 - elo: 1423 - model_permaslug: anthropic/claude-sonnet-4 - pricing: - completion: '0.000015' - prompt: '0.000003' - tournament_stats: - first_place: 12 - fourth_place: 2 - second_place: 8 - third_place: 5 - total: 27 - win_rate: 72 - properties: - arena: - description: Arena this ranking belongs to. - example: models - type: string - avg_generation_time_ms: - description: Average generation time in milliseconds. - example: 3200 - format: double - nullable: true - type: number - category: - description: Category within the arena. - example: codecategories - type: string - display_name: - description: Human-readable model name from Design Arena. - example: Claude Sonnet 4 - type: string - elo: - description: ELO rating from head-to-head arena battles. - example: 1423 - format: double - type: number - model_permaslug: - description: >- - Stable OpenRouter model identifier when the model is on OpenRouter; otherwise the upstream Design Arena model id. Use pricing != null to detect OpenRouter-mapped models. - example: anthropic/claude-sonnet-4 - type: string - pricing: - $ref: '#/components/schemas/BenchmarkPricing' - tournament_stats: - description: Placement distribution from tournament matches. - properties: - first_place: - nullable: true - type: integer - fourth_place: - nullable: true - type: integer - second_place: - nullable: true - type: integer - third_place: - nullable: true - type: integer - total: - nullable: true - type: integer - required: - - first_place - - second_place - - third_place - - fourth_place - - total - type: object - win_rate: - description: Win rate as a percentage (0–100). - example: 72 - format: double - type: number - required: - - model_permaslug - - display_name - - arena - - category - - elo - - win_rate - - avg_generation_time_ms - - tournament_stats - - pricing - type: object - BenchmarksDAMeta: + BigNumberUnion: + description: Price per million prompt tokens + example: 1000 + type: string + BooleanCapability: + description: A supported-or-not flag. Present means the parameter is accepted. example: - arena: models - as_of: '2026-06-03T12:00:00Z' - category: null - citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).' - elo_bounds: - max: 1600 - min: 900 - model_count: 50 - source: design-arena - source_url: https://www.designarena.ai - version: v1 + type: boolean properties: - arena: - description: The arena filter applied. - type: string - as_of: - description: ISO-8601 timestamp of when this data was generated. - example: '2026-06-03T12:00:00Z' - type: string - category: - description: The category filter applied, or null if showing all. - nullable: true - type: string - citation: - description: Required attribution when republishing this data. - example: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).' - type: string - elo_bounds: - description: ELO range across all returned models for normalization. - properties: - max: - description: Maximum ELO in the result set. - format: double - type: number - min: - description: Minimum ELO in the result set. - format: double - type: number - required: - - min - - max - type: object - model_count: - description: Number of unique models in the response. - type: integer - source: - description: Data source identifier. - enum: - - design-arena - type: string - source_url: - description: URL of the upstream data source. - enum: - - https://www.designarena.ai - type: string - version: - description: Dataset version. + type: enum: - - v1 + - boolean type: string required: - - as_of - - version - - source - - source_url - - citation - - model_count - - arena - - category - - elo_bounds - type: object - BenchmarksDAResponse: - example: - data: - - arena: models - avg_generation_time_ms: 3200 - category: codecategories - display_name: Claude Sonnet 4 - elo: 1423 - model_permaslug: anthropic/claude-sonnet-4 - pricing: - completion: '0.000015' - prompt: '0.000003' - tournament_stats: - first_place: 12 - fourth_place: 2 - second_place: 8 - third_place: 5 - total: 27 - win_rate: 72 - meta: - arena: models - as_of: '2026-06-03T12:00:00Z' - category: null - citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).' - elo_bounds: - max: 1600 - min: 900 - model_count: 1 - source: design-arena - source_url: https://www.designarena.ai - version: v1 - properties: - data: - items: - $ref: '#/components/schemas/BenchmarksDAItem' - type: array - meta: - $ref: '#/components/schemas/BenchmarksDAMeta' - required: - - data - - meta + - type type: object - BigNumberUnion: - description: Price per million prompt tokens - example: 1000 - type: string BulkAddWorkspaceMembersRequest: example: user_ids: @@ -4357,6 +4060,7 @@ components: - stepfun - streamlake - switchpoint + - tenstorrent - together - upstage - venice @@ -4368,6 +4072,25 @@ components: example: openai type: string x-speakeasy-unknown-values: allow + CapabilityDescriptor: + description: A typed descriptor for one supported request parameter. + discriminator: + mapping: + boolean: '#/components/schemas/BooleanCapability' + enum: '#/components/schemas/EnumCapability' + range: '#/components/schemas/RangeCapability' + x-speakeasy-unknown-values: allow + propertyName: type + example: + type: enum + values: + - 1K + - 2K + - 4K + oneOf: + - $ref: '#/components/schemas/EnumCapability' + - $ref: '#/components/schemas/RangeCapability' + - $ref: '#/components/schemas/BooleanCapability' ChatAssistantImages: description: Generated images from image generation models example: @@ -5094,6 +4817,7 @@ components: effort: description: Constrains effort on reasoning for reasoning models enum: + - max - xhigh - high - medium @@ -5112,6 +4836,7 @@ components: description: >- Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ. enum: + - max - xhigh - high - medium @@ -5386,6 +5111,8 @@ components: example: code: 429 message: Rate limit exceeded + metadata: + error_type: rate_limit_exceeded properties: code: description: Error code @@ -5396,6 +5123,17 @@ components: description: Error message example: Rate limit exceeded type: string + metadata: + description: Structured error metadata + properties: + error_type: + $ref: '#/components/schemas/ApiErrorType' + provider_code: + description: Upstream provider-specific error code, when available + type: string + required: + - error_type + type: object required: - message - code @@ -5744,6 +5482,9 @@ components: prompt_tokens: 10 prompt_tokens_details: cached_tokens: 2 + server_tool_use_details: + tool_calls_executed: 2 + tool_calls_requested: 2 total_tokens: 25 properties: completion_tokens: @@ -5800,6 +5541,25 @@ components: description: Video input tokens type: integer type: object + server_tool_use_details: + description: Usage for server-side tool execution (e.g., web search) + nullable: true + properties: + tool_calls_executed: + description: Number of OpenRouter server tool calls that executed and produced a result + nullable: true + type: integer + tool_calls_requested: + description: >- + Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. + nullable: true + type: integer + web_search_requests: + description: >- + Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. + nullable: true + type: integer + type: object total_tokens: description: Total number of tokens type: integer @@ -7213,6 +6973,54 @@ components: example: America/New_York type: string type: object + DebugEvent: + description: >- + Debug event emitted when debug.echo_upstream_body is true. Contains the transformed upstream request body or timing milestones. + example: + debug: + echo_upstream_body: + messages: [] + model: anthropic/claude-sonnet-4 + sequence_number: 1 + type: response.debug + properties: + debug: + properties: + echo_upstream_body: + additionalProperties: + nullable: true + type: object + timings: + properties: + epoch_ms: + type: integer + event: + enum: + - adapter_request + - upstream_headers_received + - first_token_received + - upstream_body_ended + type: string + x-speakeasy-unknown-values: allow + start_ms: + type: integer + required: + - start_ms + - event + - epoch_ms + type: object + type: object + sequence_number: + type: integer + type: + enum: + - response.debug + type: string + required: + - type + - debug + - sequence_number + type: object DefaultParameters: additionalProperties: false description: Default parameters for this model @@ -7466,6 +7274,27 @@ components: example: 0 type: integer x-speakeasy-unknown-values: allow + EnumCapability: + description: A parameter that accepts one of a discrete set of string values. + example: + type: enum + values: + - 1K + - 2K + - 4K + properties: + type: + enum: + - enum + type: string + values: + items: + type: string + type: array + required: + - type + - values + type: object ErrorEvent: allOf: - $ref: '#/components/schemas/BaseErrorEvent' @@ -8464,6 +8293,8 @@ components: maxItems: 8 minItems: 1 type: array + cache_control: + $ref: '#/components/schemas/AnthropicCacheControlDirective' max_completion_tokens: description: >- Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, the provider's default applies. @@ -8488,6 +8319,7 @@ components: effort: description: Reasoning effort level for panelist and judge inner calls. enum: + - max - xhigh - high - medium @@ -9308,6 +9140,73 @@ components: aspect_ratio: '16:9' quality: high type: object + ImageEndpoint: + description: An endpoint that serves a given image model. + example: + allowed_passthrough_parameters: [] + pricing: + - billable: output_image + cost_usd: 0.05 + unit: image + provider_name: Bytedance + provider_slug: bytedance + provider_tag: bytedance + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + seed: + type: boolean + supports_streaming: false + properties: + allowed_passthrough_parameters: + description: Provider-specific options accepted under provider.options[provider_slug]. + example: [] + items: + type: string + type: array + pricing: + description: Billable pricing lines for this endpoint. + example: + - billable: output_image + cost_usd: 0.05 + unit: image + items: + $ref: '#/components/schemas/ImagePricingEntry' + type: array + provider_name: + description: Provider display name + example: Bytedance + type: string + provider_slug: + description: Provider slug + example: bytedance + type: string + provider_tag: + description: Provider tag for request-side selection + example: bytedance + nullable: true + type: string + supported_parameters: + allOf: + - $ref: '#/components/schemas/SupportedParameters' + - description: The definitive set of parameters this endpoint accepts for this model. + supports_streaming: + description: 'Whether this endpoint supports native SSE streaming (`stream: true` in the request).' + example: false + type: boolean + required: + - provider_name + - provider_slug + - provider_tag + - supported_parameters + - allowed_passthrough_parameters + - supports_streaming + - pricing + type: object ImageGenCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' @@ -9354,6 +9253,192 @@ components: partial_image_index: 0 sequence_number: 3 type: response.image_generation_call.partial_image + ImageGenCompletedEvent: + description: Emitted when generation completes and the final image is available + example: + b64_json: + created: 1748372400 + type: image_generation.completed + usage: + completion_tokens: 4175 + cost: 0.04 + prompt_tokens: 0 + total_tokens: 4175 + properties: + b64_json: + description: Base64-encoded final image data + type: string + created: + description: Unix timestamp (seconds) when the image was generated + type: integer + type: + description: The event type + enum: + - image_generation.completed + type: string + usage: + $ref: '#/components/schemas/ImageGenerationUsage' + required: + - type + - b64_json + - created + type: object + ImageGenerationRequest: + description: Image generation request input + example: + model: bytedance-seed/seedream-4.5 + prompt: a red panda astronaut floating in space, studio lighting + properties: + aspect_ratio: + description: Normalized aspect ratio of the generated image. Providers clamp to their supported subset. + enum: + - '1:1' + - '1:2' + - '1:4' + - '1:8' + - '2:1' + - '2:3' + - '3:2' + - '3:4' + - '4:1' + - '4:3' + - '4:5' + - '5:4' + - '8:1' + - '9:16' + - '16:9' + - '9:19.5' + - 19.5:9 + - '9:20' + - '20:9' + - '9:21' + - '21:9' + - auto + example: '16:9' + type: string + x-speakeasy-unknown-values: allow + background: + description: Background treatment. `transparent` requires an output_format that supports alpha (png or webp). + enum: + - auto + - transparent + - opaque + example: auto + type: string + x-speakeasy-unknown-values: allow + input_references: + description: Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs. + items: + $ref: '#/components/schemas/ContentPartImage' + maxItems: 16 + type: array + model: + description: The image generation model to use + example: bytedance-seed/seedream-4.5 + type: string + 'n': + description: Number of images to generate (1-10). Providers that only support single-image generation reject n > 1. + example: 1 + type: integer + output_compression: + description: Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob. + example: 100 + type: integer + output_format: + description: Encoding of the returned image bytes. + enum: + - png + - jpeg + - webp + example: png + type: string + x-speakeasy-unknown-values: allow + prompt: + description: Text description of the desired image + example: a red panda astronaut floating in space, studio lighting + minLength: 1 + type: string + provider: + description: Provider-specific passthrough configuration + properties: + options: + allOf: + - $ref: '#/components/schemas/ProviderOptions' + - example: + black-forest-labs: + guidance: 3 + steps: 40 + type: object + quality: + description: Rendering quality. Providers without a quality knob ignore this. + enum: + - auto + - low + - medium + - high + example: high + type: string + x-speakeasy-unknown-values: allow + resolution: + description: Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. + enum: + - '512' + - 1K + - 2K + - 4K + example: 2K + 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: >- + Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. Interchangeable with resolution + aspect_ratio; use those directly for enumerated, per-model discoverable values. Conflicting size + resolution/aspect_ratio is rejected. + example: 2K + type: string + stream: + description: >- + If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response. + type: boolean + required: + - model + - prompt + type: object + ImageGenerationResponse: + description: Image generation response + example: + created: 1748372400 + data: + - b64_json: + usage: + completion_tokens: 4175 + cost: 0.04 + prompt_tokens: 0 + total_tokens: 4175 + properties: + created: + description: Unix timestamp (seconds) when the image was generated + example: 1748372400 + type: integer + data: + description: Generated images + items: + properties: + b64_json: + description: Base64-encoded image bytes + type: string + required: + - b64_json + type: object + type: array + usage: + $ref: '#/components/schemas/ImageGenerationUsage' + required: + - created + - data + type: object ImageGenerationServerTool: description: Image generation tool configuration example: @@ -9476,6 +9561,382 @@ components: example: completed type: string x-speakeasy-unknown-values: allow + ImageGenerationUsage: + description: Token and cost usage for the image generation request, when available + example: + completion_tokens: 4175 + cost: 0.04 + prompt_tokens: 0 + total_tokens: 4175 + properties: + completion_tokens: + description: The tokens generated + type: integer + completion_tokens_details: + nullable: true + properties: + audio_tokens: + description: Tokens generated by the model for audio output. + nullable: true + type: integer + image_tokens: + description: Tokens generated by the model for image output. + nullable: true + type: integer + reasoning_tokens: + description: Tokens generated by the model for reasoning. + nullable: true + type: integer + type: object + cost: + description: Cost of the completion + format: double + nullable: true + type: number + cost_details: + $ref: '#/components/schemas/CostDetails' + is_byok: + description: Whether a request was made using a Bring Your Own Key configuration + type: boolean + iterations: + items: + $ref: '#/components/schemas/AnthropicUsageIteration' + nullable: true + type: array + prompt_tokens: + description: Including images, input audio, and tools if any + type: integer + prompt_tokens_details: + description: Breakdown of tokens used in the prompt. + nullable: true + properties: + audio_tokens: + description: Tokens used for input audio. + nullable: true + type: integer + cache_write_tokens: + description: Tokens written to cache. Only returned for models with explicit caching and cache write pricing. + nullable: true + type: integer + cached_tokens: + description: Tokens cached by the endpoint. + nullable: true + type: integer + file_tokens: + description: Tokens used for input files/documents. + nullable: true + type: integer + video_tokens: + description: Tokens used for input video. + nullable: true + type: integer + type: object + server_tool_use: + description: Usage for server-side tool execution (e.g., web search) + nullable: true + properties: + tool_calls_executed: + description: Number of OpenRouter server tool calls that executed and produced a result. + nullable: true + type: integer + tool_calls_requested: + description: >- + Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. + nullable: true + type: integer + web_search_requests: + description: >- + Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. + nullable: true + type: integer + type: object + service_tier: + description: The service tier used by the upstream provider for this request + nullable: true + type: string + speed: + $ref: '#/components/schemas/AnthropicSpeed' + total_tokens: + description: Sum of the above two fields + type: integer + required: + - prompt_tokens + - completion_tokens + - total_tokens + type: object + ImageGenPartialImageEvent: + description: Emitted when a partial image becomes available during streaming generation + example: + b64_json: + partial_image_index: 0 + type: image_generation.partial_image + properties: + b64_json: + description: Base64-encoded partial image data + type: string + partial_image_index: + description: 0-based index indicating which partial image this is in the sequence + type: integer + type: + description: The event type + enum: + - image_generation.partial_image + type: string + required: + - type + - partial_image_index + - b64_json + type: object + ImageGenStreamErrorEvent: + description: Emitted when streaming generation fails after the SSE response starts + example: + error: + code: upstream_error + message: The upstream provider returned an error + param: null + type: provider_error + type: error + properties: + error: + description: Provider error details + properties: + code: + description: Provider error code, when supplied + nullable: true + type: string + message: + description: Provider error message + type: string + param: + description: Request parameter associated with the error, when supplied + nullable: true + type: string + type: + description: Provider error type, when supplied + nullable: true + type: string + required: + - message + type: object + type: + description: The event type + enum: + - error + type: string + required: + - type + - error + type: object + ImageModelArchitecture: + example: + input_modalities: + - text + - image + output_modalities: + - image + properties: + input_modalities: + description: Supported input modalities + items: + $ref: '#/components/schemas/InputModality' + type: array + output_modalities: + description: Supported output modalities + items: + $ref: '#/components/schemas/ImageOutputModality' + type: array + required: + - input_modalities + - output_modalities + type: object + ImageModelEndpointsResponse: + description: The full per-endpoint records for an image model. + example: + endpoints: + - allowed_passthrough_parameters: [] + pricing: + - billable: output_image + cost_usd: 0.05 + unit: image + provider_name: Bytedance + provider_slug: bytedance + provider_tag: bytedance + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + supports_streaming: false + id: bytedance-seed/seedream-4.5 + properties: + endpoints: + items: + $ref: '#/components/schemas/ImageEndpoint' + type: array + id: + description: Model slug + example: bytedance-seed/seedream-4.5 + type: string + required: + - id + - endpoints + type: object + ImageModelListItem: + description: A single image model in the discovery listing. + example: + architecture: + input_modalities: + - text + - image + output_modalities: + - image + created: 1692901234 + description: A text-to-image model. + endpoints: /api/v1/images/models/bytedance-seed/seedream-4.5/endpoints + id: bytedance-seed/seedream-4.5 + name: Seedream 4.5 + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + seed: + type: boolean + supports_streaming: false + properties: + architecture: + $ref: '#/components/schemas/ImageModelArchitecture' + created: + description: Unix timestamp (seconds) of when the model was created + example: 1692901234 + type: integer + description: + example: A text-to-image model. + type: string + endpoints: + description: Relative URL to the full per-endpoint records for this model + example: /api/v1/images/models/bytedance-seed/seedream-4.5/endpoints + type: string + id: + description: Model slug + example: bytedance-seed/seedream-4.5 + type: string + name: + description: Display name + example: Seedream 4.5 + type: string + supported_parameters: + $ref: '#/components/schemas/SupportedParameters' + supports_streaming: + description: >- + Whether any endpoint of this model supports native SSE streaming on the dedicated Image API (i.e. `stream: true` in the request). OR across endpoints. + example: false + type: boolean + required: + - id + - name + - description + - created + - architecture + - supported_parameters + - supports_streaming + - endpoints + type: object + ImageModelsListResponse: + description: List of image generation models. + example: + data: + - architecture: + input_modalities: + - text + output_modalities: + - image + created: 1692901234 + description: A text-to-image model. + endpoints: /api/v1/images/models/bytedance-seed/seedream-4.5/endpoints + id: bytedance-seed/seedream-4.5 + name: Seedream 4.5 + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + supports_streaming: false + properties: + data: + items: + $ref: '#/components/schemas/ImageModelListItem' + type: array + required: + - data + type: object + ImageOutputModality: + enum: + - text + - image + - embeddings + - audio + - video + - rerank + - speech + - transcription + example: image + type: string + x-speakeasy-unknown-values: allow + ImagePricingEntry: + description: One billable pricing line for an image provider. + example: + billable: output_image + cost_usd: 0.05 + unit: image + properties: + billable: + enum: + - output_image + - input_image + - input_font + - input_reference + - input_text + type: string + x-speakeasy-unknown-values: allow + cost_usd: + format: double + type: number + unit: + enum: + - image + - megapixel + - token + type: string + x-speakeasy-unknown-values: allow + variant: + type: string + required: + - billable + - unit + - cost_usd + type: object + ImageStreamingResponse: + example: + data: + b64_json: + partial_image_index: 0 + type: image_generation.partial_image + properties: + data: + anyOf: + - $ref: '#/components/schemas/ImageGenPartialImageEvent' + - $ref: '#/components/schemas/ImageGenCompletedEvent' + - $ref: '#/components/schemas/ImageGenStreamErrorEvent' + required: + - data + type: object IncompleteDetails: example: reason: max_output_tokens @@ -11020,9 +11481,12 @@ components: type: object MessagesErrorDetail: example: + error_type: invalid_request message: Invalid request parameters type: invalid_request_error properties: + error_type: + $ref: '#/components/schemas/ApiErrorType' message: type: string type: @@ -11035,12 +11499,15 @@ components: description: Error event in the stream example: error: + error_type: provider_overloaded message: Overloaded type: overloaded_error type: error properties: error: properties: + error_type: + $ref: '#/components/schemas/ApiErrorType' message: type: string type: @@ -11049,6 +11516,8 @@ components: - type - message type: object + openrouter_metadata: + $ref: '#/components/schemas/OpenRouterMetadata' type: enum: - error @@ -11999,6 +12468,7 @@ components: - Stealth - StreamLake - Switchpoint + - Tenstorrent - Together - Upstage - Venice @@ -12160,6 +12630,15 @@ components: image: '0' prompt: '0.00003' request: '0' + reasoning: + default_effort: medium + default_enabled: true + mandatory: false + supported_efforts: + - high + - medium + - low + - minimal supported_parameters: - temperature - top_p @@ -12222,6 +12701,8 @@ components: $ref: '#/components/schemas/PerRequestLimits' pricing: $ref: '#/components/schemas/PublicPricing' + reasoning: + $ref: '#/components/schemas/ModelReasoning' supported_parameters: description: List of supported parameters for this model items: @@ -12386,6 +12867,43 @@ components: description: Model to use for completion example: openai/gpt-4 type: string + ModelReasoning: + description: Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. + example: + default_effort: medium + default_enabled: true + mandatory: false + supported_efforts: + - high + - medium + - low + - minimal + properties: + default_effort: + allOf: + - $ref: '#/components/schemas/ReasoningEffort' + - description: >- + Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `"none"`, prefer omitting effort unless the user explicitly disables reasoning. + default_enabled: + description: Default reasoning enabled state when the client does not set `reasoning.enabled`. + type: boolean + mandatory: + description: When true, reasoning cannot be disabled and effort "none" is rejected. + type: boolean + supported_efforts: + description: >- + Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted. + items: + $ref: '#/components/schemas/ReasoningEffort' + nullable: true + type: array + supports_max_tokens: + description: >- + Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise. + type: boolean + required: + - mandatory + type: object ModelResponse: description: Single model response example: @@ -12633,6 +13151,7 @@ components: description: Custom HTTP headers to include in requests to this destination. type: object modelId: + description: The name of the tracing project in Arize AX minLength: 1 type: string spaceKey: @@ -15050,6 +15569,8 @@ components: allOf: - $ref: '#/components/schemas/BaseResponsesResult' - properties: + error_type: + $ref: '#/components/schemas/ApiErrorType' openrouter_metadata: $ref: '#/components/schemas/OpenRouterMetadata' output: @@ -17319,6 +17840,7 @@ components: - Stealth - StreamLake - Switchpoint + - Tenstorrent - Together - Upstage - Venice @@ -17758,6 +18280,10 @@ components: additionalProperties: nullable: true type: object + tenstorrent: + additionalProperties: + nullable: true + type: object together: additionalProperties: nullable: true @@ -18107,6 +18633,7 @@ components: - Stealth - StreamLake - Switchpoint + - Tenstorrent - Together - Upstage - Venice @@ -18420,6 +18947,26 @@ components: example: fp16 type: string x-speakeasy-unknown-values: allow + RangeCapability: + description: A parameter that accepts any value within an inclusive numeric range. + example: + max: 100 + min: 0 + type: range + properties: + max: + type: number + min: + type: number + type: + enum: + - range + type: string + required: + - type + - min + - max + type: object RankingsDailyItem: example: date: '2026-05-11' @@ -18635,6 +19182,7 @@ components: type: response.reasoning_text.done ReasoningEffort: enum: + - max - xhigh - high - medium @@ -19000,6 +19548,8 @@ components: type: boolean cache_control: $ref: '#/components/schemas/AnthropicCacheControlDirective' + debug: + $ref: '#/components/schemas/ChatDebugOptions' frequency_penalty: format: double nullable: true @@ -19701,6 +20251,7 @@ components: response.created: '#/components/schemas/OpenResponsesCreatedEvent' response.custom_tool_call_input.delta: '#/components/schemas/CustomToolCallInputDeltaEvent' response.custom_tool_call_input.done: '#/components/schemas/CustomToolCallInputDoneEvent' + response.debug: '#/components/schemas/DebugEvent' response.failed: '#/components/schemas/StreamEventsResponseFailed' response.function_call_arguments.delta: '#/components/schemas/FunctionCallArgsDeltaEvent' response.function_call_arguments.done: '#/components/schemas/FunctionCallArgsDoneEvent' @@ -19800,6 +20351,7 @@ components: - $ref: '#/components/schemas/FusionCallAnalysisInProgressEvent' - $ref: '#/components/schemas/FusionCallAnalysisCompletedEvent' - $ref: '#/components/schemas/FusionCallCompletedEvent' + - $ref: '#/components/schemas/DebugEvent' StreamEventsResponseCompleted: allOf: - $ref: '#/components/schemas/CompletedEvent' @@ -20087,6 +20639,7 @@ components: effort: description: Reasoning effort level for the subagent call. enum: + - max - xhigh - high - medium @@ -20157,6 +20710,205 @@ components: $ref: '#/components/schemas/SubagentNestedTool' type: array type: object + SupportedParameters: + additionalProperties: + $ref: '#/components/schemas/CapabilityDescriptor' + description: >- + Union of supported parameters across every endpoint of this model. Coarse discovery aid; the definitive per-endpoint set is behind the endpoints URL. + example: + output_compression: + max: 100 + min: 0 + type: range + resolution: + type: enum + values: + - 1K + - 2K + - 4K + seed: + type: boolean + type: object + TaskClassificationItem: + example: + category_token_share: 0.48 + category_usage_share: 0.51 + display_name: Code Generation + macro_category: code + models: + - id: openai/gpt-4.1-mini + tag_token_share: 0.75 + tag_usage_share: 0.55 + - id: anthropic/claude-sonnet-4 + tag_token_share: 0.12 + tag_usage_share: 0.2 + tag: code:general_impl + token_share: 0.31 + usage_share: 0.23 + properties: + category_token_share: + description: >- + Fraction of this classification's token volume within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`. + example: 0.48 + format: double + type: number + category_usage_share: + description: >- + Fraction of this classification's usage within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`. + example: 0.51 + format: double + type: number + display_name: + description: Human-readable label for the classification. + example: Code Generation + type: string + macro_category: + description: 'Coarse grouping derived from the tag prefix: `code`, `data`, `agent`, or `general`.' + example: code + type: string + models: + description: >- + Top models for this classification by request volume, sorted descending. Each entry reports the model's share of this classification's requests and tokens. + items: + $ref: '#/components/schemas/TaskClassificationModel' + type: array + tag: + description: Classification tag identifier (e.g. `code:general_impl`, `agent:web_search`). + example: code:general_impl + type: string + token_share: + description: >- + Fraction of classified sampled token volume (prompt + completion) attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator. + example: 0.31 + format: double + type: number + usage_share: + description: >- + Fraction of classified sampled requests attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator. + example: 0.23 + format: double + type: number + required: + - tag + - display_name + - macro_category + - usage_share + - token_share + - category_usage_share + - category_token_share + - models + type: object + TaskClassificationMacroCategory: + example: + key: code + label: Code + token_share: 0.52 + usage_share: 0.45 + properties: + key: + description: Macro-category identifier. + example: code + type: string + label: + description: Human-readable label for the macro-category. + example: Code + type: string + token_share: + description: Combined token share of all classifications in this macro-category (0–1). + example: 0.52 + format: double + type: number + usage_share: + description: Combined usage share of all classifications in this macro-category (0–1). + example: 0.45 + format: double + type: number + required: + - key + - label + - usage_share + - token_share + type: object + TaskClassificationModel: + example: + id: openai/gpt-4.1-mini + tag_token_share: 0.75 + tag_usage_share: 0.55 + properties: + id: + description: Model identifier (permaslug). + example: openai/gpt-4.1-mini + type: string + tag_token_share: + description: >- + Fraction of this classification's sampled token volume attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded). + example: 0.75 + format: double + type: number + tag_usage_share: + description: >- + Fraction of this classification's sampled requests attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded). + example: 0.55 + format: double + type: number + required: + - id + - tag_usage_share + - tag_token_share + type: object + TaskClassificationResponse: + example: + data: + as_of: '2026-06-17' + classifications: + - category_token_share: 0.48 + category_usage_share: 0.51 + display_name: Code Generation + macro_category: code + models: + - id: openai/gpt-4.1-mini + tag_token_share: 0.75 + tag_usage_share: 0.55 + tag: code:general_impl + token_share: 0.31 + usage_share: 0.23 + macro_categories: + - key: code + label: Code + token_share: 0.52 + usage_share: 0.45 + window_days: 7 + properties: + data: + properties: + as_of: + description: >- + UTC date (YYYY-MM-DD) of the window upper bound (yesterday). Data is exclusive of the current incomplete UTC day. This is the expected latest date in the snapshot; it does not confirm data presence for that date. + example: '2026-06-17' + type: string + classifications: + description: Per-task classification market-share data, sorted by usage_share descending. + items: + $ref: '#/components/schemas/TaskClassificationItem' + type: array + macro_categories: + description: Aggregate market-share data per macro-category (code, data, agent, general). + items: + $ref: '#/components/schemas/TaskClassificationMacroCategory' + type: array + window_days: + description: Number of trailing days covered by this snapshot. + example: 7 + type: integer + required: + - window_days + - as_of + - classifications + - macro_categories + type: object + required: + - data + type: object TextConfig: description: Text output configuration including format and verbosity example: @@ -20403,6 +21155,269 @@ components: - code - message type: object + UnifiedBenchmarkPricing: + description: OpenRouter pricing per token for this model. Null if pricing is unavailable. + example: + completion: '0.000015' + prompt: '0.000003' + nullable: true + properties: + completion: + description: Cost per output token (USD, decimal string). + example: '0.000015' + type: string + prompt: + description: Cost per input token (USD, decimal string). + example: '0.000003' + type: string + required: + - prompt + - completion + type: object + UnifiedBenchmarksAAItem: + example: + agentic_index: 58.3 + coding_index: 65.8 + display_name: GPT-4o + intelligence_index: 71.2 + model_permaslug: openai/gpt-4o + pricing: + completion: '0.00001' + prompt: '0.0000025' + source: artificial-analysis + properties: + agentic_index: + description: Artificial Analysis Agentic Index composite score. Higher is better. + example: 58.3 + format: double + nullable: true + type: number + coding_index: + description: Artificial Analysis Coding Index composite score. Higher is better. + example: 65.8 + format: double + nullable: true + type: number + display_name: + description: Model name as listed on Artificial Analysis. + example: GPT-4o + type: string + intelligence_index: + description: Artificial Analysis Intelligence Index composite score. Higher is better. + example: 71.2 + format: double + nullable: true + type: number + model_permaslug: + description: Stable OpenRouter model identifier. + example: openai/gpt-4o + type: string + pricing: + $ref: '#/components/schemas/UnifiedBenchmarkPricing' + source: + description: Benchmark source discriminator. + enum: + - artificial-analysis + type: string + required: + - source + - model_permaslug + - display_name + - intelligence_index + - coding_index + - agentic_index + - pricing + type: object + UnifiedBenchmarksDAItem: + example: + arena: models + avg_generation_time_ms: 3200 + category: codecategories + display_name: Claude Sonnet 4 + elo: 1423 + model_permaslug: anthropic/claude-sonnet-4 + pricing: + completion: '0.000015' + prompt: '0.000003' + source: design-arena + tournament_stats: + first_place: 12 + fourth_place: 2 + second_place: 8 + third_place: 5 + total: 27 + win_rate: 72 + properties: + arena: + description: Arena this ranking belongs to. + example: models + type: string + avg_generation_time_ms: + description: Average generation time in milliseconds. + example: 3200 + format: double + nullable: true + type: number + category: + description: Category within the arena. + example: codecategories + type: string + display_name: + description: Human-readable model name from Design Arena. + example: Claude Sonnet 4 + type: string + elo: + description: ELO rating from head-to-head arena battles. + example: 1423 + format: double + type: number + model_permaslug: + description: Stable OpenRouter model identifier when mapped; otherwise the upstream Design Arena model id. + example: anthropic/claude-sonnet-4 + type: string + pricing: + $ref: '#/components/schemas/UnifiedBenchmarkPricing' + source: + description: Benchmark source discriminator. + enum: + - design-arena + type: string + tournament_stats: + description: Placement distribution from tournament matches. + properties: + first_place: + nullable: true + type: integer + fourth_place: + nullable: true + type: integer + second_place: + nullable: true + type: integer + third_place: + nullable: true + type: integer + total: + nullable: true + type: integer + required: + - first_place + - second_place + - third_place + - fourth_place + - total + type: object + win_rate: + description: Win rate as a percentage (0–100). + example: 72 + format: double + type: number + required: + - source + - model_permaslug + - display_name + - arena + - category + - elo + - win_rate + - avg_generation_time_ms + - tournament_stats + - pricing + type: object + UnifiedBenchmarksMeta: + example: + as_of: '2026-06-03T12:00:00Z' + citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' + model_count: 50 + source: artificial-analysis + source_url: https://artificialanalysis.ai + task_type: null + version: v1 + properties: + as_of: + description: ISO-8601 timestamp of when this data was last updated. + example: '2026-06-03T12:00:00Z' + type: string + citation: + description: >- + Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator). + example: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' + nullable: true + type: string + model_count: + description: Number of unique models in the response. + type: integer + source: + description: The source filter applied, or null when all sources are returned. + enum: + - artificial-analysis + - design-arena + - null + example: artificial-analysis + nullable: true + type: string + x-speakeasy-unknown-values: allow + source_url: + description: URL of the upstream data source, or null when results span multiple sources. + example: https://artificialanalysis.ai + nullable: true + type: string + task_type: + description: The task_type filter applied, or null if showing all. + nullable: true + type: string + version: + description: Dataset version. + enum: + - v1 + type: string + required: + - as_of + - version + - source + - source_url + - citation + - model_count + - task_type + type: object + UnifiedBenchmarksResponse: + example: + data: + - agentic_index: 58.3 + coding_index: 65.8 + display_name: GPT-4o + intelligence_index: 71.2 + model_permaslug: openai/gpt-4o + pricing: + completion: '0.00001' + prompt: '0.0000025' + source: artificial-analysis + meta: + as_of: '2026-06-03T12:00:00Z' + citation: null + model_count: 1 + source: null + source_url: null + task_type: null + version: v1 + properties: + data: + items: + discriminator: + mapping: + artificial-analysis: '#/components/schemas/UnifiedBenchmarksAAItem' + design-arena: '#/components/schemas/UnifiedBenchmarksDAItem' + propertyName: source + oneOf: + - $ref: '#/components/schemas/UnifiedBenchmarksAAItem' + - $ref: '#/components/schemas/UnifiedBenchmarksDAItem' + type: array + meta: + $ref: '#/components/schemas/UnifiedBenchmarksMeta' + required: + - data + - meta + type: object UnprocessableEntityResponse: description: Unprocessable Entity - Semantic validation failure example: @@ -22987,6 +24002,146 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /benchmarks: + get: + description: >- + Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + operationId: getBenchmarks + parameters: + - description: >- + Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. + in: query + name: source + required: false + schema: + description: >- + Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. + enum: + - artificial-analysis + - design-arena + example: artificial-analysis + type: string + x-speakeasy-unknown-values: allow + - description: >- + Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. + in: query + name: task_type + required: false + schema: + description: >- + Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. + enum: + - coding + - intelligence + - agentic + example: coding + type: string + x-speakeasy-unknown-values: allow + - description: 'Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.' + in: query + name: arena + required: false + schema: + description: 'Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.' + enum: + - models + - builders + - agents + example: models + type: string + x-speakeasy-unknown-values: allow + - description: >- + Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. + in: query + name: category + required: false + schema: + description: >- + Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. + example: codecategories + type: string + - description: Maximum number of items to return. When omitted, all matching results are returned. + in: query + name: max_results + required: false + schema: + description: Maximum number of items to return. When omitted, all matching results are returned. + example: 50 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + example: + data: + - agentic_index: 58.3 + coding_index: 65.8 + display_name: GPT-4o + intelligence_index: 71.2 + model_permaslug: openai/gpt-4o + pricing: + completion: '0.00001' + prompt: '0.0000025' + source: artificial-analysis + meta: + as_of: '2026-06-03T12:00:00Z' + citation: null + model_count: 1 + source: null + source_url: null + task_type: null + version: v1 + schema: + $ref: '#/components/schemas/UnifiedBenchmarksResponse' + description: Benchmark results filtered by the specified source and optional task type. + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: List Benchmarks + tags: + - Benchmarks + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /byok: get: description: >- @@ -23104,6 +24259,7 @@ paths: - stepfun - streamlake - switchpoint + - tenstorrent - together - upstage - venice @@ -23730,6 +24886,116 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /classifications/task: + get: + description: |- + Returns the market-share breakdown of OpenRouter traffic by task classification + (e.g. code generation, web search, summarization) over a trailing time window. + + Each classification reports its share of classified sampled requests (`usage_share`) + and classified sampled token volume (`token_share`) as fractions between 0 and 1. + The unclassified `other` bucket is excluded. Absolute volumes are not exposed + because the underlying data is sampled. + + Each classification also includes a `models` array listing the top models by + request volume within that classification, with their within-tag usage and token shares. + + Classifications are grouped into macro-categories (Code, Data, Agent, General) + with aggregate shares provided for each. + + Authenticate with any valid OpenRouter API key (same key used for inference). + Rate-limited to 30 requests/minute per key and 500 requests/day per account. + + When republishing or quoting this data, cite as: + "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}." + operationId: getTaskClassifications + parameters: + - description: Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported. + in: query + name: window + required: false + schema: + default: 7d + description: Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported. + enum: + - 7d + example: 7d + type: string + responses: + '200': + content: + application/json: + example: + data: + as_of: '2026-06-17' + classifications: + - category_token_share: 0.48 + category_usage_share: 0.51 + display_name: Code Generation + macro_category: code + models: + - id: openai/gpt-4.1-mini + tag_token_share: 0.75 + tag_usage_share: 0.55 + tag: code:general_impl + token_share: 0.31 + usage_share: 0.23 + macro_categories: + - key: code + label: Code + token_share: 0.52 + usage_share: 0.45 + window_days: 7 + schema: + $ref: '#/components/schemas/TaskClassificationResponse' + description: Task classification market-share data for the requested trailing window. + '400': + content: + application/json: + example: + error: + code: 400 + message: Invalid request parameters + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: Bad Request - Invalid request parameters or malformed input + '401': + content: + application/json: + example: + error: + code: 401 + message: Missing Authentication header + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: Unauthorized - Authentication required or invalid credentials + '429': + content: + application/json: + example: + error: + code: 429 + message: Rate limit exceeded + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': + content: + application/json: + example: + error: + code: 500 + message: Internal Server Error + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + summary: Task classification market share + tags: + - Classifications + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /credits: get: description: >- @@ -24058,219 +25324,6 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /datasets/benchmarks/artificial-analysis: - get: - description: >- - Returns composite index scores (Intelligence, Coding, Agentic) from Artificial Analysis for LLM models. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. - operationId: getBenchmarksArtificialAnalysis - parameters: - - description: Max results to return (1–100, default 50). - in: query - name: max_results - required: false - schema: - default: 50 - description: Max results to return (1–100, default 50). - example: 20 - maximum: 100 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - example: - data: - - aa_name: GPT-4o - agentic_index: 58.3 - coding_index: 65.8 - intelligence_index: 71.2 - model_permaslug: openai/gpt-4o - pricing: - completion: '0.00001' - prompt: '0.0000025' - meta: - as_of: '2026-06-03T12:00:00Z' - citation: 'Source: Artificial Analysis (artificialanalysis.ai) via OpenRouter (openrouter.ai/rankings).' - model_count: 1 - source: artificial-analysis - source_url: https://artificialanalysis.ai - version: v1 - schema: - $ref: '#/components/schemas/BenchmarksAAResponse' - description: Artificial Analysis composite index scores with pricing and attribution metadata. - '400': - content: - application/json: - example: - error: - code: 400 - message: Invalid request parameters - schema: - $ref: '#/components/schemas/BadRequestResponse' - description: Bad Request - Invalid request parameters or malformed input - '401': - content: - application/json: - example: - error: - code: 401 - message: Missing Authentication header - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - description: Unauthorized - Authentication required or invalid credentials - '429': - content: - application/json: - example: - error: - code: 429 - message: Rate limit exceeded - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - description: Too Many Requests - Rate limit exceeded - '500': - content: - application/json: - example: - error: - code: 500 - message: Internal Server Error - schema: - $ref: '#/components/schemas/InternalServerResponse' - description: Internal Server Error - Unexpected server error - summary: Artificial Analysis Benchmark Indices - tags: - - Datasets - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" - /datasets/benchmarks/design-arena: - get: - description: >- - Returns ELO ratings from head-to-head arena battles on Design Arena. Filterable by arena (models/builders/agents) and category. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. - operationId: getBenchmarksDesignArena - parameters: - - description: Arena to query. Defaults to `models`. - in: query - name: arena - required: false - schema: - default: models - description: Arena to query. Defaults to `models`. - enum: - - models - - builders - - agents - example: models - type: string - x-speakeasy-unknown-values: allow - - description: >- - Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. - in: query - name: category - required: false - schema: - description: >- - Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. - example: codecategories - type: string - - description: 'Max results to return: per category when no category filter is applied (1–100, default 50).' - in: query - name: max_results - required: false - schema: - default: 50 - description: 'Max results to return: per category when no category filter is applied (1–100, default 50).' - example: 20 - maximum: 100 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - example: - data: - - arena: models - avg_generation_time_ms: 3200 - category: codecategories - display_name: Claude Sonnet 4 - elo: 1423 - model_permaslug: anthropic/claude-sonnet-4 - pricing: - completion: '0.000015' - prompt: '0.000003' - tournament_stats: - first_place: 12 - fourth_place: 2 - second_place: 8 - third_place: 5 - total: 27 - win_rate: 72 - meta: - arena: models - as_of: '2026-06-03T12:00:00Z' - category: null - citation: 'Source: Design Arena (www.designarena.ai) via OpenRouter (openrouter.ai/rankings).' - elo_bounds: - max: 1600 - min: 900 - model_count: 1 - source: design-arena - source_url: https://www.designarena.ai - version: v1 - schema: - $ref: '#/components/schemas/BenchmarksDAResponse' - description: Design Arena ELO rankings with pricing and attribution metadata. - '400': - content: - application/json: - example: - error: - code: 400 - message: Invalid request parameters - schema: - $ref: '#/components/schemas/BadRequestResponse' - description: Bad Request - Invalid request parameters or malformed input - '401': - content: - application/json: - example: - error: - code: 401 - message: Missing Authentication header - schema: - $ref: '#/components/schemas/UnauthorizedResponse' - description: Unauthorized - Authentication required or invalid credentials - '429': - content: - application/json: - example: - error: - code: 429 - message: Rate limit exceeded - schema: - $ref: '#/components/schemas/TooManyRequestsResponse' - description: Too Many Requests - Rate limit exceeded - '500': - content: - application/json: - example: - error: - code: 500 - message: Internal Server Error - schema: - $ref: '#/components/schemas/InternalServerResponse' - description: Internal Server Error - Unexpected server error - summary: Design Arena Benchmark Rankings - tags: - - Datasets - parameters: - - $ref: "#/components/parameters/AppIdentifier" - - $ref: "#/components/parameters/AppDisplayName" - - $ref: "#/components/parameters/AppCategories" /datasets/rankings-daily: get: description: |- @@ -24578,6 +25631,31 @@ paths: example: 0.0001 format: double type: number + cost_details: + description: Breakdown of upstream inference costs + example: + upstream_inference_completions_cost: 0.0004 + upstream_inference_cost: null + upstream_inference_prompt_cost: 0.0008 + nullable: true + properties: + upstream_inference_completions_cost: + format: double + type: number + upstream_inference_cost: + format: double + nullable: true + type: number + upstream_inference_prompt_cost: + format: double + type: number + required: + - upstream_inference_prompt_cost + - upstream_inference_completions_cost + type: object + is_byok: + description: Whether a request was made using a Bring Your Own Key configuration + type: boolean prompt_tokens: description: Number of tokens in the input example: 8 @@ -26377,16 +27455,338 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials - '404': - content: - application/json: - example: - error: - code: 404 - message: Resource not found - schema: - $ref: '#/components/schemas/NotFoundResponse' - description: Not Found - Resource does not exist + '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 + nullable: true + 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 + nullable: true + 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: @@ -26397,10 +27797,10 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: List member assignments for a guardrail + summary: List all member assignments tags: - Guardrails - x-speakeasy-name-override: listGuardrailMemberAssignments + x-speakeasy-name-override: listMemberAssignments x-speakeasy-pagination: inputs: - in: parameters @@ -26412,39 +27812,48 @@ paths: outputs: results: $.data type: offsetLimit + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /images: 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 + description: Generates an image from a text prompt via the image generation router + operationId: createImages requestBody: content: application/json: example: - member_user_ids: - - user_abc123 - - user_def456 + model: bytedance-seed/seedream-4.5 + prompt: a red panda astronaut floating in space, studio lighting schema: - $ref: '#/components/schemas/BulkAssignMembersRequest' + $ref: '#/components/schemas/ImageGenerationRequest' required: true responses: '200': content: application/json: example: - assigned_count: 2 + created: 1748372400 + data: + - b64_json: + usage: + completion_tokens: 4175 + cost: 0.04 + prompt_tokens: 0 + total_tokens: 4175 schema: - $ref: '#/components/schemas/BulkAssignMembersResponse' - description: Assignment result + $ref: '#/components/schemas/ImageGenerationResponse' + text/event-stream: + example: + data: + b64_json: + partial_image_index: 0 + type: image_generation.partial_image + schema: + $ref: '#/components/schemas/ImageStreamingResponse' + x-speakeasy-sse-sentinel: '[DONE]' + description: Image generation response '400': content: application/json: @@ -26465,6 +27874,26 @@ paths: schema: $ref: '#/components/schemas/UnauthorizedResponse' description: Unauthorized - Authentication required or invalid credentials + '402': + content: + application/json: + example: + error: + code: 402 + message: Insufficient credits. Add more using https://openrouter.ai/credits + schema: + $ref: '#/components/schemas/PaymentRequiredResponse' + description: Payment Required - Insufficient credits or quota to complete request + '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: @@ -26475,159 +27904,96 @@ paths: schema: $ref: '#/components/schemas/NotFoundResponse' description: Not Found - Resource does not exist - '500': + '429': 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 + code: 429 + message: Rate limit exceeded schema: - $ref: '#/components/schemas/BulkUnassignMembersResponse' - description: Unassignment result - '400': + $ref: '#/components/schemas/TooManyRequestsResponse' + description: Too Many Requests - Rate limit exceeded + '500': content: application/json: example: error: - code: 400 - message: Invalid request parameters + code: 500 + message: Internal Server Error schema: - $ref: '#/components/schemas/BadRequestResponse' - description: Bad Request - Invalid request parameters or malformed input - '401': + $ref: '#/components/schemas/InternalServerResponse' + description: Internal Server Error - Unexpected server error + '502': content: application/json: example: error: - code: 401 - message: Missing Authentication header + code: 502 + message: Provider returned error schema: - $ref: '#/components/schemas/UnauthorizedResponse' - description: Unauthorized - Authentication required or invalid credentials - '404': + $ref: '#/components/schemas/BadGatewayResponse' + description: Bad Gateway - Provider/upstream API failure + '524': content: application/json: example: error: - code: 404 - message: Resource not found + code: 524 + message: Request timed out. Please try again later. schema: - $ref: '#/components/schemas/NotFoundResponse' - description: Not Found - Resource does not exist - '500': + $ref: '#/components/schemas/EdgeNetworkTimeoutResponse' + description: Infrastructure Timeout - Provider request timed out at edge network + '529': content: application/json: example: error: - code: 500 - message: Internal Server Error + code: 529 + message: Provider returned error schema: - $ref: '#/components/schemas/InternalServerResponse' - description: Internal Server Error - Unexpected server error - summary: Bulk unassign members from a guardrail + $ref: '#/components/schemas/ProviderOverloadedResponse' + description: Provider Overloaded - Provider is temporarily overloaded + summary: Generate an image tags: - - Guardrails - x-speakeasy-name-override: bulkUnassignMembers + - Images + x-speakeasy-name-override: generate parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/assignments/keys: + /images/models: 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 - nullable: true - 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 + Lists every image generation model with its top-level supported-parameter superset and a URL to its full per-endpoint records. + operationId: listImageModels 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 + - architecture: + input_modalities: + - text + output_modalities: + - image + created: 1692901234 + description: A text-to-image model. + endpoints: /api/v1/images/models/bytedance-seed/seedream-4.5/endpoints + id: bytedance-seed/seedream-4.5 + name: Seedream 4.5 + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + supports_streaming: false + schema: + $ref: '#/components/schemas/ImageModelsListResponse' + description: List of image generation models '500': content: application/json: @@ -26638,77 +28004,72 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: List all key assignments + summary: List image generation models 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 + - Images + x-speakeasy-name-override: listModels parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /guardrails/assignments/members: + /images/models/{author}/{slug}/endpoints: get: description: >- - List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. - operationId: listMemberAssignments + Returns the full per-endpoint records for an image model: each endpoint's definitive supported parameters, pricing, and passthrough allowlist. + operationId: listImageModelEndpoints parameters: - - description: Number of records to skip for pagination - in: query - name: offset - required: false + - description: Model author/organization + in: path + name: author + required: true schema: - description: Number of records to skip for pagination - example: 0 - minimum: 0 - nullable: true - type: integer - - description: Maximum number of records to return (max 100) - in: query - name: limit - required: false + description: Model author/organization + example: bytedance-seed + type: string + - description: Model slug + in: path + name: slug + required: true schema: - description: Maximum number of records to return (max 100) - example: 50 - maximum: 100 - minimum: 1 - type: integer + description: Model slug + example: seedream-4.5 + type: string 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': + endpoints: + - allowed_passthrough_parameters: [] + pricing: + - billable: output_image + cost_usd: 0.05 + unit: image + provider_name: Bytedance + provider_slug: bytedance + provider_tag: bytedance + supported_parameters: + resolution: + type: enum + values: + - 1K + - 2K + - 4K + supports_streaming: false + id: bytedance-seed/seedream-4.5 + schema: + $ref: '#/components/schemas/ImageModelEndpointsResponse' + description: The full per-endpoint records for an image model + '404': content: application/json: example: error: - code: 401 - message: Missing Authentication header + code: 404 + message: Resource not found schema: - $ref: '#/components/schemas/UnauthorizedResponse' - description: Unauthorized - Authentication required or invalid credentials + $ref: '#/components/schemas/NotFoundResponse' + description: Not Found - Resource does not exist '500': content: application/json: @@ -26719,21 +28080,10 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' description: Internal Server Error - Unexpected server error - summary: List all member assignments + summary: List endpoints for an image model 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 + - Images + x-speakeasy-name-override: listModelEndpoints parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -28734,7 +30084,7 @@ paths: id: openai/gpt-4 knowledge_cutoff: null links: - details: /api/v1/models/openai/gpt-5.4/endpoints + details: /api/v1/models/openai/gpt-4/endpoints name: GPT-4 per_request_limits: null pricing: @@ -32690,8 +34040,12 @@ tags: name: Anthropic Messages - description: BYOK endpoints name: BYOK + - description: Benchmarks endpoints + name: Benchmarks - description: Chat completion endpoints name: Chat + - description: Task classification market-share endpoints + name: Classifications - description: Credit management endpoints name: Credits - description: Datasets endpoints @@ -32706,6 +34060,8 @@ tags: name: Generations - description: Guardrails endpoints name: Guardrails + - description: Images endpoints + name: Images - description: Model information endpoints name: Models - description: OAuth authentication endpoints diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0cc33bd09..a9f9d3e8d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.763.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:40af9b9fd342d9b1902866ba1aae1c6708d028b0ad58cf338830011c27a5f2fe - sourceBlobDigest: sha256:bde7a0c1490354f5b9fc7ecf1a6722947087f769c521b2179199d3cd690c7c0e + sourceRevisionDigest: sha256:74dc7d104574d2df01ee4263ab510b6ff804ab2679784fc1307817b8b38786b3 + sourceBlobDigest: sha256:0dcabf1d209296f030ecf69e0c7b0cecafe23c2194eb0fd61333756020d48fdc tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:40af9b9fd342d9b1902866ba1aae1c6708d028b0ad58cf338830011c27a5f2fe - sourceBlobDigest: sha256:bde7a0c1490354f5b9fc7ecf1a6722947087f769c521b2179199d3cd690c7c0e + sourceRevisionDigest: sha256:74dc7d104574d2df01ee4263ab510b6ff804ab2679784fc1307817b8b38786b3 + sourceBlobDigest: sha256:0dcabf1d209296f030ecf69e0c7b0cecafe23c2194eb0fd61333756020d48fdc codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:96d0af75c0818bc7a7ef8b366a29274a9c180ad80c5831faeba65a70f60c2131 + codeSamplesRevisionDigest: sha256:70fa2bacecc7c45bb6d3468db7dc658e86bb14d97be219bb7886de935b9db68d workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.763.2 diff --git a/RELEASES.md b/RELEASES.md index 6a72aadea..80667ca53 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1356,4 +1356,14 @@ Based on: ### Generated - [typescript v0.13.12] . ### Releases -- [NPM v0.13.12] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.12 - . \ No newline at end of file +- [NPM v0.13.12] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.12 - . + +## 2026-06-24 00:54:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.2 (2.884.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.13.13] . +### Releases +- [NPM v0.13.13] https://www.npmjs.com/package/@openrouter/sdk/v/0.13.13 - . \ No newline at end of file diff --git a/docs/models/completiontokensdetails.md b/docs/models/completiontokensdetails.md deleted file mode 100644 index 2ec86eb2e..000000000 --- a/docs/models/completiontokensdetails.md +++ /dev/null @@ -1,20 +0,0 @@ -# CompletionTokensDetails - -Detailed completion token usage - -## Example Usage - -```typescript -import { CompletionTokensDetails } from "@openrouter/sdk/models"; - -let value: CompletionTokensDetails = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `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/errort.md b/docs/models/errort.md deleted file mode 100644 index 45064a571..000000000 --- a/docs/models/errort.md +++ /dev/null @@ -1,21 +0,0 @@ -# ErrorT - -Error information - -## Example Usage - -```typescript -import { ErrorT } from "@openrouter/sdk/models"; - -let value: ErrorT = { - code: 429, - message: "Rate limit exceeded", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `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/model.md b/docs/models/model.md index 1b38986df..13d36933c 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -62,6 +62,7 @@ let value: Model = { | `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"
} | +| `reasoning` | [models.ModelReasoning](../models/modelreasoning.md) | :heavy_minus_sign: | Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. | {
"default_effort": "medium",
"default_enabled": true,
"mandatory": false,
"supported_efforts": [
"high",
"medium",
"low",
"minimal"
]
} | | `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | List of supported parameters for this model | | | `supportedVoices` | *string*[] | :heavy_check_mark: | List of supported voice identifiers for TTS models. Null for non-TTS models. | | | `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/prompttokensdetails.md b/docs/models/prompttokensdetails.md deleted file mode 100644 index 4ef324730..000000000 --- a/docs/models/prompttokensdetails.md +++ /dev/null @@ -1,20 +0,0 @@ -# PromptTokensDetails - -Detailed prompt token usage - -## Example Usage - -```typescript -import { PromptTokensDetails } from "@openrouter/sdk/models"; - -let value: PromptTokensDetails = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `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/providername.md b/docs/models/providername.md index ec89fe614..07417d891 100644 --- a/docs/models/providername.md +++ b/docs/models/providername.md @@ -13,5 +13,5 @@ let value: ProviderName = "OpenAI"; ## Values ```typescript -"AkashML" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Baidu" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crucible" | "Crusoe" | "Darkbloom" | "Decart" | "DeepInfra" | "DeepSeek" | "DekaLLM" | "DigitalOcean" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "Nex AGI" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Poolside" | "Perceptron" | "Perplexity" | "Phala" | "Recraft" | "Reka" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "Wafer" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AkashML" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Baidu" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crucible" | "Crusoe" | "Darkbloom" | "Decart" | "DeepInfra" | "DeepSeek" | "DekaLLM" | "DigitalOcean" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "Nex AGI" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Poolside" | "Perceptron" | "Perplexity" | "Phala" | "Recraft" | "Reka" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Tenstorrent" | "Together" | "Upstage" | "Venice" | "Wafer" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/jsr.json b/jsr.json index 4da4364d1..5582223ca 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.13.12", + "version": "0.13.13", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 86784c8be..b1df32748 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.13.12", + "version": "0.13.13", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build", - "test:transit": "exit 0", - "test:watch": "vitest --watch --project unit", - "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0", - "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": "vitest --run --project unit" + "typecheck": "tsc --noEmit", + "typecheck:transit": "exit 0", + "compile": "tsc", + "test:transit": "exit 0", + "test:watch": "vitest --watch --project unit" }, "peerDependencies": {}, "devDependencies": { diff --git a/src/funcs/datasetsGetBenchmarksDesignArena.ts b/src/funcs/benchmarksGetBenchmarks.ts similarity index 85% rename from src/funcs/datasetsGetBenchmarksDesignArena.ts rename to src/funcs/benchmarksGetBenchmarks.ts index db10a9f95..61a56aae3 100644 --- a/src/funcs/datasetsGetBenchmarksDesignArena.ts +++ b/src/funcs/benchmarksGetBenchmarks.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 1e5ef73682ba + * @generated-id: 1b5fbe93cea7 */ import { OpenRouterCore } from "../core.js"; @@ -29,18 +29,18 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Design Arena Benchmark Rankings + * List Benchmarks * * @remarks - * Returns ELO ratings from head-to-head arena battles on Design Arena. Filterable by arena (models/builders/agents) and category. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + * Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. */ -export function datasetsGetBenchmarksDesignArena( +export function benchmarksGetBenchmarks( client: OpenRouterCore, - request?: operations.GetBenchmarksDesignArenaRequest | undefined, + request?: operations.GetBenchmarksRequest | undefined, options?: RequestOptions, ): APIPromise< Result< - models.BenchmarksDAResponse, + models.UnifiedBenchmarksResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -64,12 +64,12 @@ export function datasetsGetBenchmarksDesignArena( async function $do( client: OpenRouterCore, - request?: operations.GetBenchmarksDesignArenaRequest | undefined, + request?: operations.GetBenchmarksRequest | undefined, options?: RequestOptions, ): Promise< [ Result< - models.BenchmarksDAResponse, + models.UnifiedBenchmarksResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -89,8 +89,7 @@ async function $do( const parsed = safeParse( request, (value) => - operations.GetBenchmarksDesignArenaRequest$outboundSchema.optional() - .parse(value), + operations.GetBenchmarksRequest$outboundSchema.optional().parse(value), "Input validation failed", ); if (!parsed.ok) { @@ -99,12 +98,14 @@ async function $do( const payload = parsed.value; const body = null; - const path = pathToFunc("/datasets/benchmarks/design-arena")(); + const path = pathToFunc("/benchmarks")(); const query = encodeFormQuery({ "arena": payload?.arena, "category": payload?.category, "max_results": payload?.max_results, + "source": payload?.source, + "task_type": payload?.task_type, }); const headers = new Headers(compactMap({ @@ -133,7 +134,7 @@ async function $do( const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getBenchmarksDesignArena", + operationID: "getBenchmarks", oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -188,7 +189,7 @@ async function $do( }; const [result] = await M.match< - models.BenchmarksDAResponse, + models.UnifiedBenchmarksResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -202,7 +203,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, models.BenchmarksDAResponse$inboundSchema), + M.json(200, models.UnifiedBenchmarksResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), diff --git a/src/funcs/datasetsGetBenchmarksArtificialAnalysis.ts b/src/funcs/classificationsGetTaskClassifications.ts similarity index 77% rename from src/funcs/datasetsGetBenchmarksArtificialAnalysis.ts rename to src/funcs/classificationsGetTaskClassifications.ts index 317d232fa..24d8abc24 100644 --- a/src/funcs/datasetsGetBenchmarksArtificialAnalysis.ts +++ b/src/funcs/classificationsGetTaskClassifications.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 8997506a6260 + * @generated-id: 6f25b0c4e7a9 */ import { OpenRouterCore } from "../core.js"; @@ -29,18 +29,36 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Artificial Analysis Benchmark Indices + * Task classification market share * * @remarks - * Returns composite index scores (Intelligence, Coding, Agentic) from Artificial Analysis for LLM models. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + * Returns the market-share breakdown of OpenRouter traffic by task classification + * (e.g. code generation, web search, summarization) over a trailing time window. + * + * Each classification reports its share of classified sampled requests (`usage_share`) + * and classified sampled token volume (`token_share`) as fractions between 0 and 1. + * The unclassified `other` bucket is excluded. Absolute volumes are not exposed + * because the underlying data is sampled. + * + * Each classification also includes a `models` array listing the top models by + * request volume within that classification, with their within-tag usage and token shares. + * + * Classifications are grouped into macro-categories (Code, Data, Agent, General) + * with aggregate shares provided for each. + * + * Authenticate with any valid OpenRouter API key (same key used for inference). + * Rate-limited to 30 requests/minute per key and 500 requests/day per account. + * + * When republishing or quoting this data, cite as: + * "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}." */ -export function datasetsGetBenchmarksArtificialAnalysis( +export function classificationsGetTaskClassifications( client: OpenRouterCore, - request?: operations.GetBenchmarksArtificialAnalysisRequest | undefined, + request?: operations.GetTaskClassificationsRequest | undefined, options?: RequestOptions, ): APIPromise< Result< - models.BenchmarksAAResponse, + models.TaskClassificationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -64,12 +82,12 @@ export function datasetsGetBenchmarksArtificialAnalysis( async function $do( client: OpenRouterCore, - request?: operations.GetBenchmarksArtificialAnalysisRequest | undefined, + request?: operations.GetTaskClassificationsRequest | undefined, options?: RequestOptions, ): Promise< [ Result< - models.BenchmarksAAResponse, + models.TaskClassificationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -89,8 +107,9 @@ async function $do( const parsed = safeParse( request, (value) => - operations.GetBenchmarksArtificialAnalysisRequest$outboundSchema - .optional().parse(value), + operations.GetTaskClassificationsRequest$outboundSchema.optional().parse( + value, + ), "Input validation failed", ); if (!parsed.ok) { @@ -99,10 +118,10 @@ async function $do( const payload = parsed.value; const body = null; - const path = pathToFunc("/datasets/benchmarks/artificial-analysis")(); + const path = pathToFunc("/classifications/task")(); const query = encodeFormQuery({ - "max_results": payload?.max_results, + "window": payload?.window, }); const headers = new Headers(compactMap({ @@ -131,7 +150,7 @@ async function $do( const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "getBenchmarksArtificialAnalysis", + operationID: "getTaskClassifications", oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -186,7 +205,7 @@ async function $do( }; const [result] = await M.match< - models.BenchmarksAAResponse, + models.TaskClassificationResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.TooManyRequestsResponseError @@ -200,7 +219,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, models.BenchmarksAAResponse$inboundSchema), + M.json(200, models.TaskClassificationResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), diff --git a/src/funcs/imagesGenerate.ts b/src/funcs/imagesGenerate.ts new file mode 100644 index 000000000..3eacf26d8 --- /dev/null +++ b/src/funcs/imagesGenerate.ts @@ -0,0 +1,325 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5e770eb62f14 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { EventStream } from "../lib/event-streams.js"; +import { matchStatusCode } from "../lib/http.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"; + +/** + * Generate an image + * + * @remarks + * Generates an image from a text prompt via the image generation router + */ +export function imagesGenerate( + client: OpenRouterCore, + request: operations.CreateImagesRequest & { + imageGenerationRequest: { stream?: false }; + }, + options?: RequestOptions, +): APIPromise< + Result< + models.ImageGenerationResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +>; +export function imagesGenerate( + client: OpenRouterCore, + request: operations.CreateImagesRequest & { + imageGenerationRequest: { stream: true }; + }, + options?: RequestOptions, +): APIPromise< + Result< + EventStream, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +>; +export function imagesGenerate( + client: OpenRouterCore, + request: operations.CreateImagesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateImagesResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +>; +export function imagesGenerate( + client: OpenRouterCore, + request: operations.CreateImagesRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateImagesResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | 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.CreateImagesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateImagesResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateImagesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ImageGenerationRequest, { + explode: true, + }); + + const path = pathToFunc("/images")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: request?.imageGenerationRequest?.stream + ? "text/event-stream" + : "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: "createImages", + 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, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "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.CreateImagesResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.PaymentRequiredResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.TooManyRequestsResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | errors.EdgeNetworkTimeoutResponseError + | errors.ProviderOverloadedResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateImagesResponse$inboundSchema), + M.sse(200, operations.CreateImagesResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$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(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/imagesListModelEndpoints.ts b/src/funcs/imagesListModelEndpoints.ts new file mode 100644 index 000000000..8a9202cda --- /dev/null +++ b/src/funcs/imagesListModelEndpoints.ts @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ea7b12b2160 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.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 endpoints for an image model + * + * @remarks + * Returns the full per-endpoint records for an image model: each endpoint's definitive supported parameters, pricing, and passthrough allowlist. + */ +export function imagesListModelEndpoints( + client: OpenRouterCore, + request: operations.ListImageModelEndpointsRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ImageModelEndpointsResponse, + | 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.ListImageModelEndpointsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ImageModelEndpointsResponse, + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListImageModelEndpointsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + author: encodeSimple("author", payload.author, { + explode: false, + charEncoding: "percent", + }), + slug: encodeSimple("slug", payload.slug, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/images/models/{author}/{slug}/endpoints")( + 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: "listImageModelEndpoints", + 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, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "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.ImageModelEndpointsResponse, + | errors.NotFoundResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ImageModelEndpointsResponse$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/imagesListModels.ts b/src/funcs/imagesListModels.ts new file mode 100644 index 000000000..7cae27395 --- /dev/null +++ b/src/funcs/imagesListModels.ts @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fa32f43b49ee + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.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 image generation models + * + * @remarks + * Lists every image generation model with its top-level supported-parameter superset and a URL to its full per-endpoint records. + */ +export function imagesListModels( + client: OpenRouterCore, + request?: operations.ListImageModelsRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ImageModelsListResponse, + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request?: operations.ListImageModelsRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ImageModelsListResponse, + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListImageModelsRequest$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/images/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: "listImageModels", + 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, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "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.ImageModelsListResponse, + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ImageModelsListResponse$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 f9bb538d6..b932decc0 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.13.12", + sdkVersion: "0.13.13", genVersion: "2.884.4", - userAgent: "speakeasy-sdk/typescript 0.13.12 2.884.4 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.13.13 2.884.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/advisorreasoning.ts b/src/models/advisorreasoning.ts index ce1fb90dc..5b8bb504c 100644 --- a/src/models/advisorreasoning.ts +++ b/src/models/advisorreasoning.ts @@ -12,6 +12,7 @@ import { OpenEnum } from "../types/enums.js"; * Reasoning effort level for the advisor call. */ export const AdvisorReasoningEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", diff --git a/src/models/anthropicadvisormessageusageiteration.ts b/src/models/anthropicadvisormessageusageiteration.ts new file mode 100644 index 000000000..f12adaba2 --- /dev/null +++ b/src/models/anthropicadvisormessageusageiteration.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ff2ce164571e + */ + +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 { + AnthropicIterationCacheCreation, + AnthropicIterationCacheCreation$inboundSchema, +} from "./anthropiciterationcachecreation.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const AnthropicAdvisorMessageUsageIterationType = { + AdvisorMessage: "advisor_message", +} as const; +export type AnthropicAdvisorMessageUsageIterationType = ClosedEnum< + typeof AnthropicAdvisorMessageUsageIterationType +>; + +export type AnthropicAdvisorMessageUsageIteration = { + cacheCreation?: AnthropicIterationCacheCreation | null | undefined; + cacheCreationInputTokens?: number | undefined; + cacheReadInputTokens?: number | undefined; + inputTokens?: number | undefined; + outputTokens?: number | undefined; + model: string; + type: AnthropicAdvisorMessageUsageIterationType; +}; + +/** @internal */ +export const AnthropicAdvisorMessageUsageIterationType$inboundSchema: z.ZodEnum< + typeof AnthropicAdvisorMessageUsageIterationType +> = z.enum(AnthropicAdvisorMessageUsageIterationType); + +/** @internal */ +export const AnthropicAdvisorMessageUsageIteration$inboundSchema: z.ZodType< + AnthropicAdvisorMessageUsageIteration, + unknown +> = z.object({ + cache_creation: z.nullable(AnthropicIterationCacheCreation$inboundSchema) + .optional(), + cache_creation_input_tokens: z.int().optional(), + cache_read_input_tokens: z.int().optional(), + input_tokens: z.int().optional(), + output_tokens: z.int().optional(), + model: z.string(), + type: AnthropicAdvisorMessageUsageIterationType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "cache_creation": "cacheCreation", + "cache_creation_input_tokens": "cacheCreationInputTokens", + "cache_read_input_tokens": "cacheReadInputTokens", + "input_tokens": "inputTokens", + "output_tokens": "outputTokens", + }); +}); + +export function anthropicAdvisorMessageUsageIterationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + AnthropicAdvisorMessageUsageIteration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicAdvisorMessageUsageIteration' from JSON`, + ); +} diff --git a/src/models/anthropiccompactionusageiteration.ts b/src/models/anthropiccompactionusageiteration.ts new file mode 100644 index 000000000..fc4ac02f6 --- /dev/null +++ b/src/models/anthropiccompactionusageiteration.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5982ebca6c31 + */ + +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 { + AnthropicIterationCacheCreation, + AnthropicIterationCacheCreation$inboundSchema, +} from "./anthropiciterationcachecreation.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const AnthropicCompactionUsageIterationType = { + Compaction: "compaction", +} as const; +export type AnthropicCompactionUsageIterationType = ClosedEnum< + typeof AnthropicCompactionUsageIterationType +>; + +export type AnthropicCompactionUsageIteration = { + cacheCreation?: AnthropicIterationCacheCreation | null | undefined; + cacheCreationInputTokens?: number | undefined; + cacheReadInputTokens?: number | undefined; + inputTokens?: number | undefined; + outputTokens?: number | undefined; + type: AnthropicCompactionUsageIterationType; +}; + +/** @internal */ +export const AnthropicCompactionUsageIterationType$inboundSchema: z.ZodEnum< + typeof AnthropicCompactionUsageIterationType +> = z.enum(AnthropicCompactionUsageIterationType); + +/** @internal */ +export const AnthropicCompactionUsageIteration$inboundSchema: z.ZodType< + AnthropicCompactionUsageIteration, + unknown +> = z.object({ + cache_creation: z.nullable(AnthropicIterationCacheCreation$inboundSchema) + .optional(), + cache_creation_input_tokens: z.int().optional(), + cache_read_input_tokens: z.int().optional(), + input_tokens: z.int().optional(), + output_tokens: z.int().optional(), + type: AnthropicCompactionUsageIterationType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "cache_creation": "cacheCreation", + "cache_creation_input_tokens": "cacheCreationInputTokens", + "cache_read_input_tokens": "cacheReadInputTokens", + "input_tokens": "inputTokens", + "output_tokens": "outputTokens", + }); +}); + +export function anthropicCompactionUsageIterationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnthropicCompactionUsageIteration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicCompactionUsageIteration' from JSON`, + ); +} diff --git a/src/models/anthropiciterationcachecreation.ts b/src/models/anthropiciterationcachecreation.ts new file mode 100644 index 000000000..fec91ecde --- /dev/null +++ b/src/models/anthropiciterationcachecreation.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: eafcf72fb51c + */ + +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 AnthropicIterationCacheCreation = { + ephemeral1hInputTokens?: number | undefined; + ephemeral5mInputTokens?: number | undefined; +}; + +/** @internal */ +export const AnthropicIterationCacheCreation$inboundSchema: z.ZodType< + AnthropicIterationCacheCreation, + unknown +> = z.object({ + ephemeral_1h_input_tokens: z.int().optional(), + ephemeral_5m_input_tokens: z.int().optional(), +}).transform((v) => { + return remap$(v, { + "ephemeral_1h_input_tokens": "ephemeral1hInputTokens", + "ephemeral_5m_input_tokens": "ephemeral5mInputTokens", + }); +}); + +export function anthropicIterationCacheCreationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnthropicIterationCacheCreation$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicIterationCacheCreation' from JSON`, + ); +} diff --git a/src/models/anthropicmessageusageiteration.ts b/src/models/anthropicmessageusageiteration.ts new file mode 100644 index 000000000..98bc74f9b --- /dev/null +++ b/src/models/anthropicmessageusageiteration.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fabb23153447 + */ + +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 { + AnthropicIterationCacheCreation, + AnthropicIterationCacheCreation$inboundSchema, +} from "./anthropiciterationcachecreation.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const AnthropicMessageUsageIterationType = { + Message: "message", +} as const; +export type AnthropicMessageUsageIterationType = ClosedEnum< + typeof AnthropicMessageUsageIterationType +>; + +export type AnthropicMessageUsageIteration = { + cacheCreation?: AnthropicIterationCacheCreation | null | undefined; + cacheCreationInputTokens?: number | undefined; + cacheReadInputTokens?: number | undefined; + inputTokens?: number | undefined; + outputTokens?: number | undefined; + model?: string | undefined; + type: AnthropicMessageUsageIterationType; +}; + +/** @internal */ +export const AnthropicMessageUsageIterationType$inboundSchema: z.ZodEnum< + typeof AnthropicMessageUsageIterationType +> = z.enum(AnthropicMessageUsageIterationType); + +/** @internal */ +export const AnthropicMessageUsageIteration$inboundSchema: z.ZodType< + AnthropicMessageUsageIteration, + unknown +> = z.object({ + cache_creation: z.nullable(AnthropicIterationCacheCreation$inboundSchema) + .optional(), + cache_creation_input_tokens: z.int().optional(), + cache_read_input_tokens: z.int().optional(), + input_tokens: z.int().optional(), + output_tokens: z.int().optional(), + model: z.string().optional(), + type: AnthropicMessageUsageIterationType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "cache_creation": "cacheCreation", + "cache_creation_input_tokens": "cacheCreationInputTokens", + "cache_read_input_tokens": "cacheReadInputTokens", + "input_tokens": "inputTokens", + "output_tokens": "outputTokens", + }); +}); + +export function anthropicMessageUsageIterationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnthropicMessageUsageIteration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicMessageUsageIteration' from JSON`, + ); +} diff --git a/src/models/anthropicspeed.ts b/src/models/anthropicspeed.ts new file mode 100644 index 000000000..59606eec1 --- /dev/null +++ b/src/models/anthropicspeed.ts @@ -0,0 +1,18 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8c545705b9ae + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const AnthropicSpeed = { + Fast: "fast", + Standard: "standard", +} as const; +export type AnthropicSpeed = OpenEnum; + +/** @internal */ +export const AnthropicSpeed$inboundSchema: z.ZodType = + openEnums.inboundSchema(AnthropicSpeed); diff --git a/src/models/anthropicunknownusageiteration.ts b/src/models/anthropicunknownusageiteration.ts new file mode 100644 index 000000000..a49fe23d4 --- /dev/null +++ b/src/models/anthropicunknownusageiteration.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4c070ad010b0 + */ + +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 { + AnthropicIterationCacheCreation, + AnthropicIterationCacheCreation$inboundSchema, +} from "./anthropiciterationcachecreation.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type AnthropicUnknownUsageIteration = { + cacheCreation?: AnthropicIterationCacheCreation | null | undefined; + cacheCreationInputTokens?: number | undefined; + cacheReadInputTokens?: number | undefined; + inputTokens?: number | undefined; + outputTokens?: number | undefined; + type: string; +}; + +/** @internal */ +export const AnthropicUnknownUsageIteration$inboundSchema: z.ZodType< + AnthropicUnknownUsageIteration, + unknown +> = z.object({ + cache_creation: z.nullable(AnthropicIterationCacheCreation$inboundSchema) + .optional(), + cache_creation_input_tokens: z.int().optional(), + cache_read_input_tokens: z.int().optional(), + input_tokens: z.int().optional(), + output_tokens: z.int().optional(), + type: z.string(), +}).transform((v) => { + return remap$(v, { + "cache_creation": "cacheCreation", + "cache_creation_input_tokens": "cacheCreationInputTokens", + "cache_read_input_tokens": "cacheReadInputTokens", + "input_tokens": "inputTokens", + "output_tokens": "outputTokens", + }); +}); + +export function anthropicUnknownUsageIterationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnthropicUnknownUsageIteration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicUnknownUsageIteration' from JSON`, + ); +} diff --git a/src/models/anthropicusageiteration.ts b/src/models/anthropicusageiteration.ts new file mode 100644 index 000000000..3d38ee585 --- /dev/null +++ b/src/models/anthropicusageiteration.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8daa16a72772 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + AnthropicAdvisorMessageUsageIteration, + AnthropicAdvisorMessageUsageIteration$inboundSchema, +} from "./anthropicadvisormessageusageiteration.js"; +import { + AnthropicCompactionUsageIteration, + AnthropicCompactionUsageIteration$inboundSchema, +} from "./anthropiccompactionusageiteration.js"; +import { + AnthropicMessageUsageIteration, + AnthropicMessageUsageIteration$inboundSchema, +} from "./anthropicmessageusageiteration.js"; +import { + AnthropicUnknownUsageIteration, + AnthropicUnknownUsageIteration$inboundSchema, +} from "./anthropicunknownusageiteration.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type AnthropicUsageIteration = + | AnthropicAdvisorMessageUsageIteration + | AnthropicCompactionUsageIteration + | AnthropicMessageUsageIteration + | AnthropicUnknownUsageIteration; + +/** @internal */ +export const AnthropicUsageIteration$inboundSchema: z.ZodType< + AnthropicUsageIteration, + unknown +> = z.union([ + AnthropicAdvisorMessageUsageIteration$inboundSchema, + AnthropicCompactionUsageIteration$inboundSchema, + AnthropicMessageUsageIteration$inboundSchema, + AnthropicUnknownUsageIteration$inboundSchema, +]); + +export function anthropicUsageIterationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AnthropicUsageIteration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicUsageIteration' from JSON`, + ); +} diff --git a/src/models/apierrortype.ts b/src/models/apierrortype.ts new file mode 100644 index 000000000..c1ef90790 --- /dev/null +++ b/src/models/apierrortype.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 240e785ddd59 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Canonical OpenRouter error type, stable across all API formats + */ +export const ApiErrorType = { + ContextLengthExceeded: "context_length_exceeded", + MaxTokensExceeded: "max_tokens_exceeded", + TokenLimitExceeded: "token_limit_exceeded", + StringTooLong: "string_too_long", + Authentication: "authentication", + PermissionDenied: "permission_denied", + PaymentRequired: "payment_required", + RateLimitExceeded: "rate_limit_exceeded", + ProviderOverloaded: "provider_overloaded", + ProviderUnavailable: "provider_unavailable", + InvalidRequest: "invalid_request", + InvalidPrompt: "invalid_prompt", + NotFound: "not_found", + PreconditionFailed: "precondition_failed", + PayloadTooLarge: "payload_too_large", + Unprocessable: "unprocessable", + ContentPolicyViolation: "content_policy_violation", + Refusal: "refusal", + InvalidImage: "invalid_image", + ImageTooLarge: "image_too_large", + ImageTooSmall: "image_too_small", + UnsupportedImageFormat: "unsupported_image_format", + ImageNotFound: "image_not_found", + ImageDownloadFailed: "image_download_failed", + Server: "server", + Timeout: "timeout", + Unmapped: "unmapped", +} as const; +/** + * Canonical OpenRouter error type, stable across all API formats + */ +export type ApiErrorType = OpenEnum; + +/** @internal */ +export const ApiErrorType$inboundSchema: z.ZodType = + openEnums.inboundSchema(ApiErrorType); diff --git a/src/models/benchmarksaameta.ts b/src/models/benchmarksaameta.ts deleted file mode 100644 index c64ee9ca0..000000000 --- a/src/models/benchmarksaameta.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: ea7ac20c3f7c - */ - -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"; - -/** - * Data source identifier. - */ -export const BenchmarksAAMetaSource = { - ArtificialAnalysis: "artificial-analysis", -} as const; -/** - * Data source identifier. - */ -export type BenchmarksAAMetaSource = ClosedEnum; - -/** - * URL of the upstream data source. - */ -export const BenchmarksAAMetaSourceUrl = { - HttpsArtificialanalysisAi: "https://artificialanalysis.ai", -} as const; -/** - * URL of the upstream data source. - */ -export type BenchmarksAAMetaSourceUrl = ClosedEnum< - typeof BenchmarksAAMetaSourceUrl ->; - -/** - * Dataset version. - */ -export const BenchmarksAAMetaVersion = { - V1: "v1", -} as const; -/** - * Dataset version. - */ -export type BenchmarksAAMetaVersion = ClosedEnum< - typeof BenchmarksAAMetaVersion ->; - -export type BenchmarksAAMeta = { - /** - * ISO-8601 timestamp of when this data was last updated. - */ - asOf: string; - /** - * Required attribution when republishing this data. - */ - citation: string; - /** - * Number of unique models in the response. - */ - modelCount: number; - /** - * Data source identifier. - */ - source: BenchmarksAAMetaSource; - /** - * URL of the upstream data source. - */ - sourceUrl: BenchmarksAAMetaSourceUrl; - /** - * Dataset version. - */ - version: BenchmarksAAMetaVersion; -}; - -/** @internal */ -export const BenchmarksAAMetaSource$inboundSchema: z.ZodEnum< - typeof BenchmarksAAMetaSource -> = z.enum(BenchmarksAAMetaSource); - -/** @internal */ -export const BenchmarksAAMetaSourceUrl$inboundSchema: z.ZodEnum< - typeof BenchmarksAAMetaSourceUrl -> = z.enum(BenchmarksAAMetaSourceUrl); - -/** @internal */ -export const BenchmarksAAMetaVersion$inboundSchema: z.ZodEnum< - typeof BenchmarksAAMetaVersion -> = z.enum(BenchmarksAAMetaVersion); - -/** @internal */ -export const BenchmarksAAMeta$inboundSchema: z.ZodType< - BenchmarksAAMeta, - unknown -> = z.object({ - as_of: z.string(), - citation: z.string(), - model_count: z.int(), - source: BenchmarksAAMetaSource$inboundSchema, - source_url: BenchmarksAAMetaSourceUrl$inboundSchema, - version: BenchmarksAAMetaVersion$inboundSchema, -}).transform((v) => { - return remap$(v, { - "as_of": "asOf", - "model_count": "modelCount", - "source_url": "sourceUrl", - }); -}); - -export function benchmarksAAMetaFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BenchmarksAAMeta$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksAAMeta' from JSON`, - ); -} diff --git a/src/models/benchmarksaaresponse.ts b/src/models/benchmarksaaresponse.ts deleted file mode 100644 index 39ae16b8e..000000000 --- a/src/models/benchmarksaaresponse.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 57a074171835 - */ - -import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { - BenchmarksAAItem, - BenchmarksAAItem$inboundSchema, -} from "./benchmarksaaitem.js"; -import { - BenchmarksAAMeta, - BenchmarksAAMeta$inboundSchema, -} from "./benchmarksaameta.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export type BenchmarksAAResponse = { - data: Array; - meta: BenchmarksAAMeta; -}; - -/** @internal */ -export const BenchmarksAAResponse$inboundSchema: z.ZodType< - BenchmarksAAResponse, - unknown -> = z.object({ - data: z.array(BenchmarksAAItem$inboundSchema), - meta: BenchmarksAAMeta$inboundSchema, -}); - -export function benchmarksAAResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BenchmarksAAResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksAAResponse' from JSON`, - ); -} diff --git a/src/models/benchmarksdameta.ts b/src/models/benchmarksdameta.ts deleted file mode 100644 index 3ae479d96..000000000 --- a/src/models/benchmarksdameta.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: caee78d8918e - */ - -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"; - -/** - * ELO range across all returned models for normalization. - */ -export type EloBounds = { - /** - * Maximum ELO in the result set. - */ - max: number; - /** - * Minimum ELO in the result set. - */ - min: number; -}; - -/** - * Data source identifier. - */ -export const BenchmarksDAMetaSource = { - DesignArena: "design-arena", -} as const; -/** - * Data source identifier. - */ -export type BenchmarksDAMetaSource = ClosedEnum; - -/** - * URL of the upstream data source. - */ -export const BenchmarksDAMetaSourceUrl = { - HttpsWwwDesignarenaAi: "https://www.designarena.ai", -} as const; -/** - * URL of the upstream data source. - */ -export type BenchmarksDAMetaSourceUrl = ClosedEnum< - typeof BenchmarksDAMetaSourceUrl ->; - -/** - * Dataset version. - */ -export const BenchmarksDAMetaVersion = { - V1: "v1", -} as const; -/** - * Dataset version. - */ -export type BenchmarksDAMetaVersion = ClosedEnum< - typeof BenchmarksDAMetaVersion ->; - -export type BenchmarksDAMeta = { - /** - * The arena filter applied. - */ - arena: string; - /** - * ISO-8601 timestamp of when this data was generated. - */ - asOf: string; - /** - * The category filter applied, or null if showing all. - */ - category: string | null; - /** - * Required attribution when republishing this data. - */ - citation: string; - /** - * ELO range across all returned models for normalization. - */ - eloBounds: EloBounds; - /** - * Number of unique models in the response. - */ - modelCount: number; - /** - * Data source identifier. - */ - source: BenchmarksDAMetaSource; - /** - * URL of the upstream data source. - */ - sourceUrl: BenchmarksDAMetaSourceUrl; - /** - * Dataset version. - */ - version: BenchmarksDAMetaVersion; -}; - -/** @internal */ -export const EloBounds$inboundSchema: z.ZodType = z.object({ - max: z.number(), - min: z.number(), -}); - -export function eloBoundsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EloBounds$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EloBounds' from JSON`, - ); -} - -/** @internal */ -export const BenchmarksDAMetaSource$inboundSchema: z.ZodEnum< - typeof BenchmarksDAMetaSource -> = z.enum(BenchmarksDAMetaSource); - -/** @internal */ -export const BenchmarksDAMetaSourceUrl$inboundSchema: z.ZodEnum< - typeof BenchmarksDAMetaSourceUrl -> = z.enum(BenchmarksDAMetaSourceUrl); - -/** @internal */ -export const BenchmarksDAMetaVersion$inboundSchema: z.ZodEnum< - typeof BenchmarksDAMetaVersion -> = z.enum(BenchmarksDAMetaVersion); - -/** @internal */ -export const BenchmarksDAMeta$inboundSchema: z.ZodType< - BenchmarksDAMeta, - unknown -> = z.object({ - arena: z.string(), - as_of: z.string(), - category: z.nullable(z.string()), - citation: z.string(), - elo_bounds: z.lazy(() => EloBounds$inboundSchema), - model_count: z.int(), - source: BenchmarksDAMetaSource$inboundSchema, - source_url: BenchmarksDAMetaSourceUrl$inboundSchema, - version: BenchmarksDAMetaVersion$inboundSchema, -}).transform((v) => { - return remap$(v, { - "as_of": "asOf", - "elo_bounds": "eloBounds", - "model_count": "modelCount", - "source_url": "sourceUrl", - }); -}); - -export function benchmarksDAMetaFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BenchmarksDAMeta$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksDAMeta' from JSON`, - ); -} diff --git a/src/models/benchmarksdaresponse.ts b/src/models/benchmarksdaresponse.ts deleted file mode 100644 index 7477dd447..000000000 --- a/src/models/benchmarksdaresponse.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: ea90fb0e8882 - */ - -import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { - BenchmarksDAItem, - BenchmarksDAItem$inboundSchema, -} from "./benchmarksdaitem.js"; -import { - BenchmarksDAMeta, - BenchmarksDAMeta$inboundSchema, -} from "./benchmarksdameta.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export type BenchmarksDAResponse = { - data: Array; - meta: BenchmarksDAMeta; -}; - -/** @internal */ -export const BenchmarksDAResponse$inboundSchema: z.ZodType< - BenchmarksDAResponse, - unknown -> = z.object({ - data: z.array(BenchmarksDAItem$inboundSchema), - meta: BenchmarksDAMeta$inboundSchema, -}); - -export function benchmarksDAResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BenchmarksDAResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksDAResponse' from JSON`, - ); -} diff --git a/src/models/booleancapability.ts b/src/models/booleancapability.ts new file mode 100644 index 000000000..dc7b68366 --- /dev/null +++ b/src/models/booleancapability.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b920d99cecda + */ + +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"; + +/** + * A supported-or-not flag. Present means the parameter is accepted. + */ +export type BooleanCapability = { + type: "boolean"; +}; + +/** @internal */ +export const BooleanCapability$inboundSchema: z.ZodType< + BooleanCapability, + unknown +> = z.object({ + type: z.literal("boolean"), +}); + +export function booleanCapabilityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BooleanCapability$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BooleanCapability' from JSON`, + ); +} diff --git a/src/models/byokproviderslug.ts b/src/models/byokproviderslug.ts index 7a424178e..0ca78dd04 100644 --- a/src/models/byokproviderslug.ts +++ b/src/models/byokproviderslug.ts @@ -86,6 +86,7 @@ export const BYOKProviderSlug = { Stepfun: "stepfun", Streamlake: "streamlake", Switchpoint: "switchpoint", + Tenstorrent: "tenstorrent", Together: "together", Upstage: "upstage", Venice: "venice", diff --git a/src/models/capabilitydescriptor.ts b/src/models/capabilitydescriptor.ts new file mode 100644 index 000000000..610154ca3 --- /dev/null +++ b/src/models/capabilitydescriptor.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 867d654ac8ab + */ + +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 { + BooleanCapability, + BooleanCapability$inboundSchema, +} from "./booleancapability.js"; +import { + EnumCapability, + EnumCapability$inboundSchema, +} from "./enumcapability.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + RangeCapability, + RangeCapability$inboundSchema, +} from "./rangecapability.js"; + +/** + * A typed descriptor for one supported request parameter. + */ +export type CapabilityDescriptor = + | EnumCapability + | RangeCapability + | BooleanCapability + | discriminatedUnionTypes.Unknown<"type">; + +/** @internal */ +export const CapabilityDescriptor$inboundSchema: z.ZodType< + CapabilityDescriptor, + unknown +> = discriminatedUnion("type", { + enum: EnumCapability$inboundSchema, + range: RangeCapability$inboundSchema, + boolean: BooleanCapability$inboundSchema, +}); + +export function capabilityDescriptorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CapabilityDescriptor$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CapabilityDescriptor' from JSON`, + ); +} diff --git a/src/models/chatrequest.ts b/src/models/chatrequest.ts index 0cb4c3cb8..09ff1b69f 100644 --- a/src/models/chatrequest.ts +++ b/src/models/chatrequest.ts @@ -154,6 +154,7 @@ export type ChatRequestPlugin = * Constrains effort on reasoning for reasoning models */ export const ChatRequestEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", @@ -181,6 +182,7 @@ export type ChatRequestReasoning = { * Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ. */ export const ChatRequestReasoningEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", diff --git a/src/models/chatstreamchunk.ts b/src/models/chatstreamchunk.ts index b4c41124a..3a2e42e6e 100644 --- a/src/models/chatstreamchunk.ts +++ b/src/models/chatstreamchunk.ts @@ -8,6 +8,7 @@ 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 { ApiErrorType, ApiErrorType$inboundSchema } from "./apierrortype.js"; import { ChatStreamChoice, ChatStreamChoice$inboundSchema, @@ -19,10 +20,24 @@ import { OpenRouterMetadata$inboundSchema, } from "./openroutermetadata.js"; +/** + * Structured error metadata + */ +export type ChatStreamChunkMetadata = { + /** + * Canonical OpenRouter error type, stable across all API formats + */ + errorType: ApiErrorType; + /** + * Upstream provider-specific error code, when available + */ + providerCode?: string | undefined; +}; + /** * Error information */ -export type ErrorT = { +export type ChatStreamChunkError = { /** * Error code */ @@ -31,6 +46,10 @@ export type ErrorT = { * Error message */ message: string; + /** + * Structured error metadata + */ + metadata?: ChatStreamChunkMetadata | undefined; }; export const ChatStreamChunkObject = { @@ -53,7 +72,7 @@ export type ChatStreamChunk = { /** * Error information */ - error?: ErrorT | undefined; + error?: ChatStreamChunkError | undefined; /** * Unique chunk identifier */ @@ -79,18 +98,46 @@ export type ChatStreamChunk = { }; /** @internal */ -export const ErrorT$inboundSchema: z.ZodType = z.object({ +export const ChatStreamChunkMetadata$inboundSchema: z.ZodType< + ChatStreamChunkMetadata, + unknown +> = z.object({ + error_type: ApiErrorType$inboundSchema, + provider_code: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "error_type": "errorType", + "provider_code": "providerCode", + }); +}); + +export function chatStreamChunkMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChatStreamChunkMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatStreamChunkMetadata' from JSON`, + ); +} + +/** @internal */ +export const ChatStreamChunkError$inboundSchema: z.ZodType< + ChatStreamChunkError, + unknown +> = z.object({ code: z.int(), message: z.string(), + metadata: z.lazy(() => ChatStreamChunkMetadata$inboundSchema).optional(), }); -export function errorFromJSON( +export function chatStreamChunkErrorFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ErrorT' from JSON`, + (x) => ChatStreamChunkError$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatStreamChunkError' from JSON`, ); } @@ -106,7 +153,7 @@ export const ChatStreamChunk$inboundSchema: z.ZodType< > = z.object({ choices: z.array(ChatStreamChoice$inboundSchema), created: z.int(), - error: z.lazy(() => ErrorT$inboundSchema).optional(), + error: z.lazy(() => ChatStreamChunkError$inboundSchema).optional(), id: z.string(), model: z.string(), object: ChatStreamChunkObject$inboundSchema, diff --git a/src/models/chatusage.ts b/src/models/chatusage.ts index 830cb8f0c..6c8b508bc 100644 --- a/src/models/chatusage.ts +++ b/src/models/chatusage.ts @@ -13,7 +13,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; /** * Detailed completion token usage */ -export type CompletionTokensDetails = { +export type ChatUsageCompletionTokensDetails = { /** * Accepted prediction tokens */ @@ -35,7 +35,7 @@ export type CompletionTokensDetails = { /** * Detailed prompt token usage */ -export type PromptTokensDetails = { +export type ChatUsagePromptTokensDetails = { /** * Audio input tokens */ @@ -54,6 +54,24 @@ export type PromptTokensDetails = { videoTokens?: number | undefined; }; +/** + * Usage for server-side tool execution (e.g., web search) + */ +export type ServerToolUseDetails = { + /** + * Number of OpenRouter server tool calls that executed and produced a result + */ + toolCallsExecuted?: number | null | undefined; + /** + * Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. + */ + toolCallsRequested?: number | null | undefined; + /** + * Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. + */ + webSearchRequests?: number | null | undefined; +}; + /** * Token usage statistics */ @@ -65,7 +83,7 @@ export type ChatUsage = { /** * Detailed completion token usage */ - completionTokensDetails?: CompletionTokensDetails | null | undefined; + completionTokensDetails?: ChatUsageCompletionTokensDetails | null | undefined; /** * Cost of the completion */ @@ -85,7 +103,11 @@ export type ChatUsage = { /** * Detailed prompt token usage */ - promptTokensDetails?: PromptTokensDetails | null | undefined; + promptTokensDetails?: ChatUsagePromptTokensDetails | null | undefined; + /** + * Usage for server-side tool execution (e.g., web search) + */ + serverToolUseDetails?: ServerToolUseDetails | null | undefined; /** * Total number of tokens */ @@ -93,8 +115,8 @@ export type ChatUsage = { }; /** @internal */ -export const CompletionTokensDetails$inboundSchema: z.ZodType< - CompletionTokensDetails, +export const ChatUsageCompletionTokensDetails$inboundSchema: z.ZodType< + ChatUsageCompletionTokensDetails, unknown > = z.object({ accepted_prediction_tokens: z.nullable(z.int()).optional(), @@ -110,19 +132,19 @@ export const CompletionTokensDetails$inboundSchema: z.ZodType< }); }); -export function completionTokensDetailsFromJSON( +export function chatUsageCompletionTokensDetailsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => CompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompletionTokensDetails' from JSON`, + (x) => ChatUsageCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatUsageCompletionTokensDetails' from JSON`, ); } /** @internal */ -export const PromptTokensDetails$inboundSchema: z.ZodType< - PromptTokensDetails, +export const ChatUsagePromptTokensDetails$inboundSchema: z.ZodType< + ChatUsagePromptTokensDetails, unknown > = z.object({ audio_tokens: z.int().optional(), @@ -138,13 +160,39 @@ export const PromptTokensDetails$inboundSchema: z.ZodType< }); }); -export function promptTokensDetailsFromJSON( +export function chatUsagePromptTokensDetailsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => PromptTokensDetails$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PromptTokensDetails' from JSON`, + (x) => ChatUsagePromptTokensDetails$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatUsagePromptTokensDetails' from JSON`, + ); +} + +/** @internal */ +export const ServerToolUseDetails$inboundSchema: z.ZodType< + ServerToolUseDetails, + unknown +> = z.object({ + tool_calls_executed: z.nullable(z.int()).optional(), + tool_calls_requested: z.nullable(z.int()).optional(), + web_search_requests: z.nullable(z.int()).optional(), +}).transform((v) => { + return remap$(v, { + "tool_calls_executed": "toolCallsExecuted", + "tool_calls_requested": "toolCallsRequested", + "web_search_requests": "webSearchRequests", + }); +}); + +export function serverToolUseDetailsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerToolUseDetails$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerToolUseDetails' from JSON`, ); } @@ -152,14 +200,17 @@ export function promptTokensDetailsFromJSON( export const ChatUsage$inboundSchema: z.ZodType = z.object({ completion_tokens: z.int(), completion_tokens_details: z.nullable( - z.lazy(() => CompletionTokensDetails$inboundSchema), + z.lazy(() => ChatUsageCompletionTokensDetails$inboundSchema), ).optional(), cost: z.nullable(z.number()).optional(), cost_details: z.nullable(CostDetails$inboundSchema).optional(), is_byok: z.boolean().optional(), prompt_tokens: z.int(), prompt_tokens_details: z.nullable( - z.lazy(() => PromptTokensDetails$inboundSchema), + z.lazy(() => ChatUsagePromptTokensDetails$inboundSchema), + ).optional(), + server_tool_use_details: z.nullable( + z.lazy(() => ServerToolUseDetails$inboundSchema), ).optional(), total_tokens: z.int(), }).transform((v) => { @@ -170,6 +221,7 @@ export const ChatUsage$inboundSchema: z.ZodType = z.object({ "is_byok": "isByok", "prompt_tokens": "promptTokens", "prompt_tokens_details": "promptTokensDetails", + "server_tool_use_details": "serverToolUseDetails", "total_tokens": "totalTokens", }); }); diff --git a/src/models/contentpartimage.ts b/src/models/contentpartimage.ts index ac4278f18..2b26b4e8a 100644 --- a/src/models/contentpartimage.ts +++ b/src/models/contentpartimage.ts @@ -5,14 +5,20 @@ 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: "image_url"; + type: ContentPartImageType; }; /** @internal */ @@ -36,10 +42,15 @@ export function contentPartImageImageUrlToJSON( ); } +/** @internal */ +export const ContentPartImageType$outboundSchema: z.ZodEnum< + typeof ContentPartImageType +> = z.enum(ContentPartImageType); + /** @internal */ export type ContentPartImage$Outbound = { image_url: ContentPartImageImageUrl$Outbound; - type: "image_url"; + type: string; }; /** @internal */ @@ -48,7 +59,7 @@ export const ContentPartImage$outboundSchema: z.ZodType< ContentPartImage > = z.object({ imageUrl: z.lazy(() => ContentPartImageImageUrl$outboundSchema), - type: z.literal("image_url"), + type: ContentPartImageType$outboundSchema, }).transform((v) => { return remap$(v, { imageUrl: "image_url", diff --git a/src/models/debugevent.ts b/src/models/debugevent.ts new file mode 100644 index 000000000..2af8c3bcc --- /dev/null +++ b/src/models/debugevent.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8afa2111f54c + */ + +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 Event = { + AdapterRequest: "adapter_request", + UpstreamHeadersReceived: "upstream_headers_received", + FirstTokenReceived: "first_token_received", + UpstreamBodyEnded: "upstream_body_ended", +} as const; +export type Event = OpenEnum; + +export type Timings = { + epochMs: number; + event: Event; + startMs: number; +}; + +export type Debug = { + echoUpstreamBody?: { [k: string]: any | null } | undefined; + timings?: Timings | undefined; +}; + +/** + * Debug event emitted when debug.echo_upstream_body is true. Contains the transformed upstream request body or timing milestones. + */ +export type DebugEvent = { + debug: Debug; + sequenceNumber: number; + type: "response.debug"; +}; + +/** @internal */ +export const Event$inboundSchema: z.ZodType = openEnums + .inboundSchema(Event); + +/** @internal */ +export const Timings$inboundSchema: z.ZodType = z.object({ + epoch_ms: z.int(), + event: Event$inboundSchema, + start_ms: z.int(), +}).transform((v) => { + return remap$(v, { + "epoch_ms": "epochMs", + "start_ms": "startMs", + }); +}); + +export function timingsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Timings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Timings' from JSON`, + ); +} + +/** @internal */ +export const Debug$inboundSchema: z.ZodType = z.object({ + echo_upstream_body: z.record(z.string(), z.nullable(z.any())).optional(), + timings: z.lazy(() => Timings$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "echo_upstream_body": "echoUpstreamBody", + }); +}); + +export function debugFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Debug$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Debug' from JSON`, + ); +} + +/** @internal */ +export const DebugEvent$inboundSchema: z.ZodType = z + .object({ + debug: z.lazy(() => Debug$inboundSchema), + sequence_number: z.int(), + type: z.literal("response.debug"), + }).transform((v) => { + return remap$(v, { + "sequence_number": "sequenceNumber", + }); + }); + +export function debugEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DebugEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DebugEvent' from JSON`, + ); +} diff --git a/src/models/enumcapability.ts b/src/models/enumcapability.ts new file mode 100644 index 000000000..a983fb06d --- /dev/null +++ b/src/models/enumcapability.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5ad7989f6f99 + */ + +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"; + +/** + * A parameter that accepts one of a discrete set of string values. + */ +export type EnumCapability = { + type: "enum"; + values: Array; +}; + +/** @internal */ +export const EnumCapability$inboundSchema: z.ZodType = + z.object({ + type: z.literal("enum"), + values: z.array(z.string()), + }); + +export function enumCapabilityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnumCapability$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnumCapability' from JSON`, + ); +} diff --git a/src/models/fusionservertoolconfig.ts b/src/models/fusionservertoolconfig.ts index f56bb1a57..b6e1465ce 100644 --- a/src/models/fusionservertoolconfig.ts +++ b/src/models/fusionservertoolconfig.ts @@ -7,11 +7,17 @@ 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 { + AnthropicCacheControlDirective, + AnthropicCacheControlDirective$Outbound, + AnthropicCacheControlDirective$outboundSchema, +} from "./anthropiccachecontroldirective.js"; /** * Reasoning effort level for panelist and judge inner calls. */ export const FusionServerToolConfigEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", @@ -59,6 +65,10 @@ export type FusionServerToolConfig = { * Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. */ analysisModels?: Array | undefined; + /** + * Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + */ + cacheControl?: AnthropicCacheControlDirective | undefined; /** * Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, the provider's default applies. */ @@ -146,6 +156,7 @@ export function fusionServerToolConfigToolToJSON( /** @internal */ export type FusionServerToolConfig$Outbound = { analysis_models?: Array | undefined; + cache_control?: AnthropicCacheControlDirective$Outbound | undefined; max_completion_tokens?: number | undefined; max_tool_calls?: number | undefined; model?: string | undefined; @@ -160,6 +171,7 @@ export const FusionServerToolConfig$outboundSchema: z.ZodType< FusionServerToolConfig > = z.object({ analysisModels: z.array(z.string()).optional(), + cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(), maxCompletionTokens: z.int().optional(), maxToolCalls: z.int().optional(), model: z.string().optional(), @@ -171,6 +183,7 @@ export const FusionServerToolConfig$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { analysisModels: "analysis_models", + cacheControl: "cache_control", maxCompletionTokens: "max_completion_tokens", maxToolCalls: "max_tool_calls", }); diff --git a/src/models/imageendpoint.ts b/src/models/imageendpoint.ts new file mode 100644 index 000000000..7ef4d9db4 --- /dev/null +++ b/src/models/imageendpoint.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e13b5353df71 + */ + +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 { + CapabilityDescriptor, + CapabilityDescriptor$inboundSchema, +} from "./capabilitydescriptor.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ImagePricingEntry, + ImagePricingEntry$inboundSchema, +} from "./imagepricingentry.js"; + +/** + * An endpoint that serves a given image model. + */ +export type ImageEndpoint = { + /** + * Provider-specific options accepted under provider.options[provider_slug]. + */ + allowedPassthroughParameters: Array; + /** + * Billable pricing lines for this endpoint. + */ + pricing: Array; + /** + * Provider display name + */ + providerName: string; + /** + * Provider slug + */ + providerSlug: string; + /** + * Provider tag for request-side selection + */ + providerTag: string | null; + supportedParameters: { [k: string]: CapabilityDescriptor }; + /** + * Whether this endpoint supports native SSE streaming (`stream: true` in the request). + */ + supportsStreaming: boolean; +}; + +/** @internal */ +export const ImageEndpoint$inboundSchema: z.ZodType = z + .object({ + allowed_passthrough_parameters: z.array(z.string()), + pricing: z.array(ImagePricingEntry$inboundSchema), + provider_name: z.string(), + provider_slug: z.string(), + provider_tag: z.nullable(z.string()), + supported_parameters: z.record( + z.string(), + CapabilityDescriptor$inboundSchema, + ), + supports_streaming: z.boolean(), + }).transform((v) => { + return remap$(v, { + "allowed_passthrough_parameters": "allowedPassthroughParameters", + "provider_name": "providerName", + "provider_slug": "providerSlug", + "provider_tag": "providerTag", + "supported_parameters": "supportedParameters", + "supports_streaming": "supportsStreaming", + }); + }); + +export function imageEndpointFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageEndpoint$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageEndpoint' from JSON`, + ); +} diff --git a/src/models/imagegencompletedevent.ts b/src/models/imagegencompletedevent.ts new file mode 100644 index 000000000..9702916f9 --- /dev/null +++ b/src/models/imagegencompletedevent.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: df990f384b54 + */ + +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 { + ImageGenerationUsage, + ImageGenerationUsage$inboundSchema, +} from "./imagegenerationusage.js"; + +/** + * Emitted when generation completes and the final image is available + */ +export type ImageGenCompletedEvent = { + /** + * Base64-encoded final image data + */ + b64Json: string; + /** + * Unix timestamp (seconds) when the image was generated + */ + created: number; + /** + * The event type + */ + type: "image_generation.completed"; + /** + * Token and cost usage for the image generation request, when available + */ + usage?: ImageGenerationUsage | undefined; +}; + +/** @internal */ +export const ImageGenCompletedEvent$inboundSchema: z.ZodType< + ImageGenCompletedEvent, + unknown +> = z.object({ + b64_json: z.string(), + created: z.int(), + type: z.literal("image_generation.completed"), + usage: ImageGenerationUsage$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "b64_json": "b64Json", + }); +}); + +export function imageGenCompletedEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenCompletedEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenCompletedEvent' from JSON`, + ); +} diff --git a/src/models/imagegenerationrequest.ts b/src/models/imagegenerationrequest.ts new file mode 100644 index 000000000..2b790e11d --- /dev/null +++ b/src/models/imagegenerationrequest.ts @@ -0,0 +1,687 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ea1ffc0d2470 + */ + +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"; + +/** + * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. + */ +export const ImageGenerationRequestAspectRatio = { + Eleven: "1:1", + Twelve: "1:2", + Fourteen: "1:4", + Eighteen: "1:8", + TwentyOne: "2:1", + TwentyThree: "2:3", + ThirtyTwo: "3:2", + ThirtyFour: "3:4", + FortyOne: "4:1", + FortyThree: "4:3", + FortyFive: "4:5", + FiftyFour: "5:4", + EightyOne: "8:1", + NineHundredAndSixteen: "9:16", + OneHundredAndSixtyNine: "16:9", + NineHundredAndNineteenDot5: "9:19.5", + NineteenDot59: "19.5:9", + NineHundredAndTwenty: "9:20", + TwoHundredAndNine: "20:9", + NineHundredAndTwentyOne: "9:21", + TwoHundredAndNineteen: "21:9", + Auto: "auto", +} as const; +/** + * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. + */ +export type ImageGenerationRequestAspectRatio = OpenEnum< + typeof ImageGenerationRequestAspectRatio +>; + +/** + * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). + */ +export const ImageGenerationRequestBackground = { + Auto: "auto", + Transparent: "transparent", + Opaque: "opaque", +} as const; +/** + * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). + */ +export type ImageGenerationRequestBackground = OpenEnum< + typeof ImageGenerationRequestBackground +>; + +/** + * Encoding of the returned image bytes. + */ +export const ImageGenerationRequestOutputFormat = { + Png: "png", + Jpeg: "jpeg", + Webp: "webp", +} as const; +/** + * Encoding of the returned image bytes. + */ +export type ImageGenerationRequestOutputFormat = OpenEnum< + typeof ImageGenerationRequestOutputFormat +>; + +/** + * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + */ +export type ImageGenerationRequestOptions = { + 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; + baidu?: { [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; + crucible?: { [k: string]: any | null } | undefined; + crusoe?: { [k: string]: any | null } | undefined; + darkbloom?: { [k: string]: any | null } | undefined; + decart?: { [k: string]: any | null } | undefined; + deepinfra?: { [k: string]: any | null } | undefined; + deepseek?: { [k: string]: any | null } | undefined; + dekallm?: { [k: string]: any | null } | undefined; + digitalocean?: { [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; + nexAgi?: { [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; + perceptron?: { [k: string]: any | null } | undefined; + perplexity?: { [k: string]: any | null } | undefined; + phala?: { [k: string]: any | null } | undefined; + poolside?: { [k: string]: any | null } | undefined; + recraft?: { [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; + tenstorrent?: { [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; + wafer?: { [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 ImageGenerationRequestProvider = { + options?: ImageGenerationRequestOptions | undefined; +}; + +/** + * Rendering quality. Providers without a quality knob ignore this. + */ +export const ImageGenerationRequestQuality = { + Auto: "auto", + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * Rendering quality. Providers without a quality knob ignore this. + */ +export type ImageGenerationRequestQuality = OpenEnum< + typeof ImageGenerationRequestQuality +>; + +/** + * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. + */ +export const ImageGenerationRequestResolution = { + FiveHundredAndTwelve: "512", + OneK: "1K", + TwoK: "2K", + FourK: "4K", +} as const; +/** + * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. + */ +export type ImageGenerationRequestResolution = OpenEnum< + typeof ImageGenerationRequestResolution +>; + +/** + * Image generation request input + */ +export type ImageGenerationRequest = { + /** + * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. + */ + aspectRatio?: ImageGenerationRequestAspectRatio | undefined; + /** + * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). + */ + background?: ImageGenerationRequestBackground | undefined; + /** + * Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs. + */ + inputReferences?: Array | undefined; + /** + * The image generation model to use + */ + model: string; + /** + * Number of images to generate (1-10). Providers that only support single-image generation reject n > 1. + */ + n?: number | undefined; + /** + * Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob. + */ + outputCompression?: number | undefined; + /** + * Encoding of the returned image bytes. + */ + outputFormat?: ImageGenerationRequestOutputFormat | undefined; + /** + * Text description of the desired image + */ + prompt: string; + /** + * Provider-specific passthrough configuration + */ + provider?: ImageGenerationRequestProvider | undefined; + /** + * Rendering quality. Providers without a quality knob ignore this. + */ + quality?: ImageGenerationRequestQuality | undefined; + /** + * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. + */ + resolution?: ImageGenerationRequestResolution | 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; + /** + * Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. Interchangeable with resolution + aspect_ratio; use those directly for enumerated, per-model discoverable values. Conflicting size + resolution/aspect_ratio is rejected. + */ + size?: string | undefined; + /** + * If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response. + */ + stream?: boolean | undefined; +}; + +/** @internal */ +export const ImageGenerationRequestAspectRatio$outboundSchema: z.ZodType< + string, + ImageGenerationRequestAspectRatio +> = openEnums.outboundSchema(ImageGenerationRequestAspectRatio); + +/** @internal */ +export const ImageGenerationRequestBackground$outboundSchema: z.ZodType< + string, + ImageGenerationRequestBackground +> = openEnums.outboundSchema(ImageGenerationRequestBackground); + +/** @internal */ +export const ImageGenerationRequestOutputFormat$outboundSchema: z.ZodType< + string, + ImageGenerationRequestOutputFormat +> = openEnums.outboundSchema(ImageGenerationRequestOutputFormat); + +/** @internal */ +export type ImageGenerationRequestOptions$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; + baidu?: { [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; + crucible?: { [k: string]: any | null } | undefined; + crusoe?: { [k: string]: any | null } | undefined; + darkbloom?: { [k: string]: any | null } | undefined; + decart?: { [k: string]: any | null } | undefined; + deepinfra?: { [k: string]: any | null } | undefined; + deepseek?: { [k: string]: any | null } | undefined; + dekallm?: { [k: string]: any | null } | undefined; + digitalocean?: { [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; + "nex-agi"?: { [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; + perceptron?: { [k: string]: any | null } | undefined; + perplexity?: { [k: string]: any | null } | undefined; + phala?: { [k: string]: any | null } | undefined; + poolside?: { [k: string]: any | null } | undefined; + recraft?: { [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; + tenstorrent?: { [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; + wafer?: { [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 ImageGenerationRequestOptions$outboundSchema: z.ZodType< + ImageGenerationRequestOptions$Outbound, + ImageGenerationRequestOptions +> = 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(), + baidu: 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(), + crucible: z.record(z.string(), z.nullable(z.any())).optional(), + crusoe: z.record(z.string(), z.nullable(z.any())).optional(), + darkbloom: z.record(z.string(), z.nullable(z.any())).optional(), + decart: 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(), + dekallm: z.record(z.string(), z.nullable(z.any())).optional(), + digitalocean: 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(), + nexAgi: 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(), + perceptron: 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(), + poolside: z.record(z.string(), z.nullable(z.any())).optional(), + recraft: 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(), + tenstorrent: 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(), + wafer: 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", + nexAgi: "nex-agi", + openInference: "open-inference", + sambanovaCloaked: "sambanova-cloaked", + sfCompute: "sf-compute", + togetherLite: "together-lite", + zAi: "z-ai", + }); +}); + +export function imageGenerationRequestOptionsToJSON( + imageGenerationRequestOptions: ImageGenerationRequestOptions, +): string { + return JSON.stringify( + ImageGenerationRequestOptions$outboundSchema.parse( + imageGenerationRequestOptions, + ), + ); +} + +/** @internal */ +export type ImageGenerationRequestProvider$Outbound = { + options?: ImageGenerationRequestOptions$Outbound | undefined; +}; + +/** @internal */ +export const ImageGenerationRequestProvider$outboundSchema: z.ZodType< + ImageGenerationRequestProvider$Outbound, + ImageGenerationRequestProvider +> = z.object({ + options: z.lazy(() => ImageGenerationRequestOptions$outboundSchema) + .optional(), +}); + +export function imageGenerationRequestProviderToJSON( + imageGenerationRequestProvider: ImageGenerationRequestProvider, +): string { + return JSON.stringify( + ImageGenerationRequestProvider$outboundSchema.parse( + imageGenerationRequestProvider, + ), + ); +} + +/** @internal */ +export const ImageGenerationRequestQuality$outboundSchema: z.ZodType< + string, + ImageGenerationRequestQuality +> = openEnums.outboundSchema(ImageGenerationRequestQuality); + +/** @internal */ +export const ImageGenerationRequestResolution$outboundSchema: z.ZodType< + string, + ImageGenerationRequestResolution +> = openEnums.outboundSchema(ImageGenerationRequestResolution); + +/** @internal */ +export type ImageGenerationRequest$Outbound = { + aspect_ratio?: string | undefined; + background?: string | undefined; + input_references?: Array | undefined; + model: string; + n?: number | undefined; + output_compression?: number | undefined; + output_format?: string | undefined; + prompt: string; + provider?: ImageGenerationRequestProvider$Outbound | undefined; + quality?: string | undefined; + resolution?: string | undefined; + seed?: number | undefined; + size?: string | undefined; + stream?: boolean | undefined; +}; + +/** @internal */ +export const ImageGenerationRequest$outboundSchema: z.ZodType< + ImageGenerationRequest$Outbound, + ImageGenerationRequest +> = z.object({ + aspectRatio: ImageGenerationRequestAspectRatio$outboundSchema.optional(), + background: ImageGenerationRequestBackground$outboundSchema.optional(), + inputReferences: z.array(ContentPartImage$outboundSchema).optional(), + model: z.string(), + n: z.int().optional(), + outputCompression: z.int().optional(), + outputFormat: ImageGenerationRequestOutputFormat$outboundSchema.optional(), + prompt: z.string(), + provider: z.lazy(() => ImageGenerationRequestProvider$outboundSchema) + .optional(), + quality: ImageGenerationRequestQuality$outboundSchema.optional(), + resolution: ImageGenerationRequestResolution$outboundSchema.optional(), + seed: z.int().optional(), + size: z.string().optional(), + stream: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + aspectRatio: "aspect_ratio", + inputReferences: "input_references", + outputCompression: "output_compression", + outputFormat: "output_format", + }); +}); + +export function imageGenerationRequestToJSON( + imageGenerationRequest: ImageGenerationRequest, +): string { + return JSON.stringify( + ImageGenerationRequest$outboundSchema.parse(imageGenerationRequest), + ); +} diff --git a/src/models/imagegenerationresponse.ts b/src/models/imagegenerationresponse.ts new file mode 100644 index 000000000..9f62f7163 --- /dev/null +++ b/src/models/imagegenerationresponse.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 18aeba0f13cc + */ + +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 { + ImageGenerationUsage, + ImageGenerationUsage$inboundSchema, +} from "./imagegenerationusage.js"; + +export type ImageGenerationResponseData = { + /** + * Base64-encoded image bytes + */ + b64Json: string; +}; + +/** + * Image generation response + */ +export type ImageGenerationResponse = { + /** + * Unix timestamp (seconds) when the image was generated + */ + created: number; + /** + * Generated images + */ + data: Array; + /** + * Token and cost usage for the image generation request, when available + */ + usage?: ImageGenerationUsage | undefined; +}; + +/** @internal */ +export const ImageGenerationResponseData$inboundSchema: z.ZodType< + ImageGenerationResponseData, + unknown +> = z.object({ + b64_json: z.string(), +}).transform((v) => { + return remap$(v, { + "b64_json": "b64Json", + }); +}); + +export function imageGenerationResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenerationResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenerationResponseData' from JSON`, + ); +} + +/** @internal */ +export const ImageGenerationResponse$inboundSchema: z.ZodType< + ImageGenerationResponse, + unknown +> = z.object({ + created: z.int(), + data: z.array(z.lazy(() => ImageGenerationResponseData$inboundSchema)), + usage: ImageGenerationUsage$inboundSchema.optional(), +}); + +export function imageGenerationResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenerationResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenerationResponse' from JSON`, + ); +} diff --git a/src/models/imagegenerationservertool.ts b/src/models/imagegenerationservertool.ts index 9f01df09f..c19ef5e28 100644 --- a/src/models/imagegenerationservertool.ts +++ b/src/models/imagegenerationservertool.ts @@ -11,12 +11,14 @@ import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const Background = { +export const ImageGenerationServerToolBackground = { Transparent: "transparent", Opaque: "opaque", Auto: "auto", } as const; -export type Background = OpenEnum; +export type ImageGenerationServerToolBackground = OpenEnum< + typeof ImageGenerationServerToolBackground +>; export const InputFidelity = { High: "high", @@ -41,20 +43,24 @@ export const Moderation = { } as const; export type Moderation = OpenEnum; -export const OutputFormat = { +export const ImageGenerationServerToolOutputFormat = { Png: "png", Webp: "webp", Jpeg: "jpeg", } as const; -export type OutputFormat = OpenEnum; +export type ImageGenerationServerToolOutputFormat = OpenEnum< + typeof ImageGenerationServerToolOutputFormat +>; -export const Quality = { +export const ImageGenerationServerToolQuality = { Low: "low", Medium: "medium", High: "high", Auto: "auto", } as const; -export type Quality = OpenEnum; +export type ImageGenerationServerToolQuality = OpenEnum< + typeof ImageGenerationServerToolQuality +>; export const Size = { OneThousandAndTwentyFourx1024: "1024x1024", @@ -68,25 +74,29 @@ export type Size = OpenEnum; * Image generation tool configuration */ export type ImageGenerationServerTool = { - background?: Background | undefined; + background?: ImageGenerationServerToolBackground | undefined; inputFidelity?: InputFidelity | null | undefined; inputImageMask?: InputImageMask | undefined; model?: ModelEnum | undefined; moderation?: Moderation | undefined; outputCompression?: number | undefined; - outputFormat?: OutputFormat | undefined; + outputFormat?: ImageGenerationServerToolOutputFormat | undefined; partialImages?: number | undefined; - quality?: Quality | undefined; + quality?: ImageGenerationServerToolQuality | undefined; size?: Size | undefined; type: "image_generation"; }; /** @internal */ -export const Background$inboundSchema: z.ZodType = - openEnums.inboundSchema(Background); +export const ImageGenerationServerToolBackground$inboundSchema: z.ZodType< + ImageGenerationServerToolBackground, + unknown +> = openEnums.inboundSchema(ImageGenerationServerToolBackground); /** @internal */ -export const Background$outboundSchema: z.ZodType = - openEnums.outboundSchema(Background); +export const ImageGenerationServerToolBackground$outboundSchema: z.ZodType< + string, + ImageGenerationServerToolBackground +> = openEnums.outboundSchema(ImageGenerationServerToolBackground); /** @internal */ export const InputFidelity$inboundSchema: z.ZodType = @@ -154,18 +164,26 @@ export const Moderation$outboundSchema: z.ZodType = openEnums.outboundSchema(Moderation); /** @internal */ -export const OutputFormat$inboundSchema: z.ZodType = - openEnums.inboundSchema(OutputFormat); +export const ImageGenerationServerToolOutputFormat$inboundSchema: z.ZodType< + ImageGenerationServerToolOutputFormat, + unknown +> = openEnums.inboundSchema(ImageGenerationServerToolOutputFormat); /** @internal */ -export const OutputFormat$outboundSchema: z.ZodType = - openEnums.outboundSchema(OutputFormat); +export const ImageGenerationServerToolOutputFormat$outboundSchema: z.ZodType< + string, + ImageGenerationServerToolOutputFormat +> = openEnums.outboundSchema(ImageGenerationServerToolOutputFormat); /** @internal */ -export const Quality$inboundSchema: z.ZodType = openEnums - .inboundSchema(Quality); +export const ImageGenerationServerToolQuality$inboundSchema: z.ZodType< + ImageGenerationServerToolQuality, + unknown +> = openEnums.inboundSchema(ImageGenerationServerToolQuality); /** @internal */ -export const Quality$outboundSchema: z.ZodType = openEnums - .outboundSchema(Quality); +export const ImageGenerationServerToolQuality$outboundSchema: z.ZodType< + string, + ImageGenerationServerToolQuality +> = openEnums.outboundSchema(ImageGenerationServerToolQuality); /** @internal */ export const Size$inboundSchema: z.ZodType = openEnums @@ -179,15 +197,15 @@ export const ImageGenerationServerTool$inboundSchema: z.ZodType< ImageGenerationServerTool, unknown > = z.object({ - background: Background$inboundSchema.optional(), + background: ImageGenerationServerToolBackground$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.int().optional(), - output_format: OutputFormat$inboundSchema.optional(), + output_format: ImageGenerationServerToolOutputFormat$inboundSchema.optional(), partial_images: z.int().optional(), - quality: Quality$inboundSchema.optional(), + quality: ImageGenerationServerToolQuality$inboundSchema.optional(), size: Size$inboundSchema.optional(), type: z.literal("image_generation"), }).transform((v) => { @@ -219,15 +237,15 @@ export const ImageGenerationServerTool$outboundSchema: z.ZodType< ImageGenerationServerTool$Outbound, ImageGenerationServerTool > = z.object({ - background: Background$outboundSchema.optional(), + background: ImageGenerationServerToolBackground$outboundSchema.optional(), inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(), inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(), model: ModelEnum$outboundSchema.optional(), moderation: Moderation$outboundSchema.optional(), outputCompression: z.int().optional(), - outputFormat: OutputFormat$outboundSchema.optional(), + outputFormat: ImageGenerationServerToolOutputFormat$outboundSchema.optional(), partialImages: z.int().optional(), - quality: Quality$outboundSchema.optional(), + quality: ImageGenerationServerToolQuality$outboundSchema.optional(), size: Size$outboundSchema.optional(), type: z.literal("image_generation"), }).transform((v) => { diff --git a/src/models/imagegenerationusage.ts b/src/models/imagegenerationusage.ts new file mode 100644 index 000000000..e6e336952 --- /dev/null +++ b/src/models/imagegenerationusage.ts @@ -0,0 +1,266 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4f128ace6b39 + */ + +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 { + AnthropicSpeed, + AnthropicSpeed$inboundSchema, +} from "./anthropicspeed.js"; +import { + AnthropicUsageIteration, + AnthropicUsageIteration$inboundSchema, +} from "./anthropicusageiteration.js"; +import { CostDetails, CostDetails$inboundSchema } from "./costdetails.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type ImageGenerationUsageCompletionTokensDetails = { + /** + * Tokens generated by the model for audio output. + */ + audioTokens?: number | null | undefined; + /** + * Tokens generated by the model for image output. + */ + imageTokens?: number | null | undefined; + /** + * Tokens generated by the model for reasoning. + */ + reasoningTokens?: number | null | undefined; +}; + +/** + * Breakdown of tokens used in the prompt. + */ +export type ImageGenerationUsagePromptTokensDetails = { + /** + * Tokens used for input audio. + */ + audioTokens?: number | null | undefined; + /** + * Tokens written to cache. Only returned for models with explicit caching and cache write pricing. + */ + cacheWriteTokens?: number | null | undefined; + /** + * Tokens cached by the endpoint. + */ + cachedTokens?: number | null | undefined; + /** + * Tokens used for input files/documents. + */ + fileTokens?: number | null | undefined; + /** + * Tokens used for input video. + */ + videoTokens?: number | null | undefined; +}; + +/** + * Usage for server-side tool execution (e.g., web search) + */ +export type ServerToolUse = { + /** + * Number of OpenRouter server tool calls that executed and produced a result. + */ + toolCallsExecuted?: number | null | undefined; + /** + * Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. + */ + toolCallsRequested?: number | null | undefined; + /** + * Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. + */ + webSearchRequests?: number | null | undefined; +}; + +/** + * Token and cost usage for the image generation request, when available + */ +export type ImageGenerationUsage = { + /** + * The tokens generated + */ + completionTokens: number; + completionTokensDetails?: + | ImageGenerationUsageCompletionTokensDetails + | null + | undefined; + /** + * Cost of the completion + */ + cost?: number | null | undefined; + /** + * Breakdown of upstream inference costs + */ + costDetails?: CostDetails | null | undefined; + /** + * Whether a request was made using a Bring Your Own Key configuration + */ + isByok?: boolean | undefined; + iterations?: Array | null | undefined; + /** + * Including images, input audio, and tools if any + */ + promptTokens: number; + /** + * Breakdown of tokens used in the prompt. + */ + promptTokensDetails?: + | ImageGenerationUsagePromptTokensDetails + | null + | undefined; + /** + * Usage for server-side tool execution (e.g., web search) + */ + serverToolUse?: ServerToolUse | null | undefined; + /** + * The service tier used by the upstream provider for this request + */ + serviceTier?: string | null | undefined; + speed?: AnthropicSpeed | null | undefined; + /** + * Sum of the above two fields + */ + totalTokens: number; +}; + +/** @internal */ +export const ImageGenerationUsageCompletionTokensDetails$inboundSchema: + z.ZodType = z.object({ + audio_tokens: z.nullable(z.int()).optional(), + image_tokens: z.nullable(z.int()).optional(), + reasoning_tokens: z.nullable(z.int()).optional(), + }).transform((v) => { + return remap$(v, { + "audio_tokens": "audioTokens", + "image_tokens": "imageTokens", + "reasoning_tokens": "reasoningTokens", + }); + }); + +export function imageGenerationUsageCompletionTokensDetailsFromJSON( + jsonString: string, +): SafeParseResult< + ImageGenerationUsageCompletionTokensDetails, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ImageGenerationUsageCompletionTokensDetails$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ImageGenerationUsageCompletionTokensDetails' from JSON`, + ); +} + +/** @internal */ +export const ImageGenerationUsagePromptTokensDetails$inboundSchema: z.ZodType< + ImageGenerationUsagePromptTokensDetails, + unknown +> = z.object({ + audio_tokens: z.nullable(z.int()).optional(), + cache_write_tokens: z.nullable(z.int()).optional(), + cached_tokens: z.nullable(z.int()).optional(), + file_tokens: z.nullable(z.int()).optional(), + video_tokens: z.nullable(z.int()).optional(), +}).transform((v) => { + return remap$(v, { + "audio_tokens": "audioTokens", + "cache_write_tokens": "cacheWriteTokens", + "cached_tokens": "cachedTokens", + "file_tokens": "fileTokens", + "video_tokens": "videoTokens", + }); +}); + +export function imageGenerationUsagePromptTokensDetailsFromJSON( + jsonString: string, +): SafeParseResult< + ImageGenerationUsagePromptTokensDetails, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ImageGenerationUsagePromptTokensDetails$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ImageGenerationUsagePromptTokensDetails' from JSON`, + ); +} + +/** @internal */ +export const ServerToolUse$inboundSchema: z.ZodType = z + .object({ + tool_calls_executed: z.nullable(z.int()).optional(), + tool_calls_requested: z.nullable(z.int()).optional(), + web_search_requests: z.nullable(z.int()).optional(), + }).transform((v) => { + return remap$(v, { + "tool_calls_executed": "toolCallsExecuted", + "tool_calls_requested": "toolCallsRequested", + "web_search_requests": "webSearchRequests", + }); + }); + +export function serverToolUseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ServerToolUse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServerToolUse' from JSON`, + ); +} + +/** @internal */ +export const ImageGenerationUsage$inboundSchema: z.ZodType< + ImageGenerationUsage, + unknown +> = z.object({ + completion_tokens: z.int(), + completion_tokens_details: z.nullable( + z.lazy(() => ImageGenerationUsageCompletionTokensDetails$inboundSchema), + ).optional(), + cost: z.nullable(z.number()).optional(), + cost_details: z.nullable(CostDetails$inboundSchema).optional(), + is_byok: z.boolean().optional(), + iterations: z.nullable(z.array(AnthropicUsageIteration$inboundSchema)) + .optional(), + prompt_tokens: z.int(), + prompt_tokens_details: z.nullable( + z.lazy(() => ImageGenerationUsagePromptTokensDetails$inboundSchema), + ).optional(), + server_tool_use: z.nullable(z.lazy(() => ServerToolUse$inboundSchema)) + .optional(), + service_tier: z.nullable(z.string()).optional(), + speed: z.nullable(AnthropicSpeed$inboundSchema).optional(), + total_tokens: z.int(), +}).transform((v) => { + return remap$(v, { + "completion_tokens": "completionTokens", + "completion_tokens_details": "completionTokensDetails", + "cost_details": "costDetails", + "is_byok": "isByok", + "prompt_tokens": "promptTokens", + "prompt_tokens_details": "promptTokensDetails", + "server_tool_use": "serverToolUse", + "service_tier": "serviceTier", + "total_tokens": "totalTokens", + }); +}); + +export function imageGenerationUsageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenerationUsage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenerationUsage' from JSON`, + ); +} diff --git a/src/models/imagegenpartialimageevent.ts b/src/models/imagegenpartialimageevent.ts new file mode 100644 index 000000000..b5205a323 --- /dev/null +++ b/src/models/imagegenpartialimageevent.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ee4283390600 + */ + +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"; + +/** + * Emitted when a partial image becomes available during streaming generation + */ +export type ImageGenPartialImageEvent = { + /** + * Base64-encoded partial image data + */ + b64Json: string; + /** + * 0-based index indicating which partial image this is in the sequence + */ + partialImageIndex: number; + /** + * The event type + */ + type: "image_generation.partial_image"; +}; + +/** @internal */ +export const ImageGenPartialImageEvent$inboundSchema: z.ZodType< + ImageGenPartialImageEvent, + unknown +> = z.object({ + b64_json: z.string(), + partial_image_index: z.int(), + type: z.literal("image_generation.partial_image"), +}).transform((v) => { + return remap$(v, { + "b64_json": "b64Json", + "partial_image_index": "partialImageIndex", + }); +}); + +export function imageGenPartialImageEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenPartialImageEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenPartialImageEvent' from JSON`, + ); +} diff --git a/src/models/imagegenstreamerrorevent.ts b/src/models/imagegenstreamerrorevent.ts new file mode 100644 index 000000000..eaf7e8eb3 --- /dev/null +++ b/src/models/imagegenstreamerrorevent.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ba1d6d94b96 + */ + +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"; + +/** + * Provider error details + */ +export type ImageGenStreamErrorEventError = { + /** + * Provider error code, when supplied + */ + code?: string | null | undefined; + /** + * Provider error message + */ + message: string; + /** + * Request parameter associated with the error, when supplied + */ + param?: string | null | undefined; + /** + * Provider error type, when supplied + */ + type?: string | null | undefined; +}; + +/** + * Emitted when streaming generation fails after the SSE response starts + */ +export type ImageGenStreamErrorEvent = { + /** + * Provider error details + */ + error: ImageGenStreamErrorEventError; + /** + * The event type + */ + type: "error"; +}; + +/** @internal */ +export const ImageGenStreamErrorEventError$inboundSchema: z.ZodType< + ImageGenStreamErrorEventError, + unknown +> = z.object({ + code: z.nullable(z.string()).optional(), + message: z.string(), + param: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), +}); + +export function imageGenStreamErrorEventErrorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenStreamErrorEventError$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenStreamErrorEventError' from JSON`, + ); +} + +/** @internal */ +export const ImageGenStreamErrorEvent$inboundSchema: z.ZodType< + ImageGenStreamErrorEvent, + unknown +> = z.object({ + error: z.lazy(() => ImageGenStreamErrorEventError$inboundSchema), + type: z.literal("error"), +}); + +export function imageGenStreamErrorEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageGenStreamErrorEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageGenStreamErrorEvent' from JSON`, + ); +} diff --git a/src/models/imagemodelarchitecture.ts b/src/models/imagemodelarchitecture.ts new file mode 100644 index 000000000..02de4afc6 --- /dev/null +++ b/src/models/imagemodelarchitecture.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b316f2890f6c + */ + +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 { + ImageOutputModality, + ImageOutputModality$inboundSchema, +} from "./imageoutputmodality.js"; +import { InputModality, InputModality$inboundSchema } from "./inputmodality.js"; + +export type ImageModelArchitecture = { + /** + * Supported input modalities + */ + inputModalities: Array; + /** + * Supported output modalities + */ + outputModalities: Array; +}; + +/** @internal */ +export const ImageModelArchitecture$inboundSchema: z.ZodType< + ImageModelArchitecture, + unknown +> = z.object({ + input_modalities: z.array(InputModality$inboundSchema), + output_modalities: z.array(ImageOutputModality$inboundSchema), +}).transform((v) => { + return remap$(v, { + "input_modalities": "inputModalities", + "output_modalities": "outputModalities", + }); +}); + +export function imageModelArchitectureFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageModelArchitecture$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageModelArchitecture' from JSON`, + ); +} diff --git a/src/models/imagemodelendpointsresponse.ts b/src/models/imagemodelendpointsresponse.ts new file mode 100644 index 000000000..7a2e3f2b1 --- /dev/null +++ b/src/models/imagemodelendpointsresponse.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 77af9d23f8cb + */ + +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 { ImageEndpoint, ImageEndpoint$inboundSchema } from "./imageendpoint.js"; + +/** + * The full per-endpoint records for an image model. + */ +export type ImageModelEndpointsResponse = { + endpoints: Array; + /** + * Model slug + */ + id: string; +}; + +/** @internal */ +export const ImageModelEndpointsResponse$inboundSchema: z.ZodType< + ImageModelEndpointsResponse, + unknown +> = z.object({ + endpoints: z.array(ImageEndpoint$inboundSchema), + id: z.string(), +}); + +export function imageModelEndpointsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageModelEndpointsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageModelEndpointsResponse' from JSON`, + ); +} diff --git a/src/models/imagemodellistitem.ts b/src/models/imagemodellistitem.ts new file mode 100644 index 000000000..4de8d0a67 --- /dev/null +++ b/src/models/imagemodellistitem.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 12f1f7100366 + */ + +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 { + CapabilityDescriptor, + CapabilityDescriptor$inboundSchema, +} from "./capabilitydescriptor.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ImageModelArchitecture, + ImageModelArchitecture$inboundSchema, +} from "./imagemodelarchitecture.js"; + +/** + * A single image model in the discovery listing. + */ +export type ImageModelListItem = { + architecture: ImageModelArchitecture; + /** + * Unix timestamp (seconds) of when the model was created + */ + created: number; + description: string; + /** + * Relative URL to the full per-endpoint records for this model + */ + endpoints: string; + /** + * Model slug + */ + id: string; + /** + * Display name + */ + name: string; + /** + * Union of supported parameters across every endpoint of this model. Coarse discovery aid; the definitive per-endpoint set is behind the endpoints URL. + */ + supportedParameters: { [k: string]: CapabilityDescriptor }; + /** + * Whether any endpoint of this model supports native SSE streaming on the dedicated Image API (i.e. `stream: true` in the request). OR across endpoints. + */ + supportsStreaming: boolean; +}; + +/** @internal */ +export const ImageModelListItem$inboundSchema: z.ZodType< + ImageModelListItem, + unknown +> = z.object({ + architecture: ImageModelArchitecture$inboundSchema, + created: z.int(), + description: z.string(), + endpoints: z.string(), + id: z.string(), + name: z.string(), + supported_parameters: z.record( + z.string(), + CapabilityDescriptor$inboundSchema, + ), + supports_streaming: z.boolean(), +}).transform((v) => { + return remap$(v, { + "supported_parameters": "supportedParameters", + "supports_streaming": "supportsStreaming", + }); +}); + +export function imageModelListItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageModelListItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageModelListItem' from JSON`, + ); +} diff --git a/src/models/imagemodelslistresponse.ts b/src/models/imagemodelslistresponse.ts new file mode 100644 index 000000000..749d7fd16 --- /dev/null +++ b/src/models/imagemodelslistresponse.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 635379f06ace + */ + +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 { + ImageModelListItem, + ImageModelListItem$inboundSchema, +} from "./imagemodellistitem.js"; + +/** + * List of image generation models. + */ +export type ImageModelsListResponse = { + data: Array; +}; + +/** @internal */ +export const ImageModelsListResponse$inboundSchema: z.ZodType< + ImageModelsListResponse, + unknown +> = z.object({ + data: z.array(ImageModelListItem$inboundSchema), +}); + +export function imageModelsListResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageModelsListResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageModelsListResponse' from JSON`, + ); +} diff --git a/src/models/imageoutputmodality.ts b/src/models/imageoutputmodality.ts new file mode 100644 index 000000000..fdd6b3748 --- /dev/null +++ b/src/models/imageoutputmodality.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7af79a028664 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ImageOutputModality = { + Text: "text", + Image: "image", + Embeddings: "embeddings", + Audio: "audio", + Video: "video", + Rerank: "rerank", + Speech: "speech", + Transcription: "transcription", +} as const; +export type ImageOutputModality = OpenEnum; + +/** @internal */ +export const ImageOutputModality$inboundSchema: z.ZodType< + ImageOutputModality, + unknown +> = openEnums.inboundSchema(ImageOutputModality); diff --git a/src/models/imagepricingentry.ts b/src/models/imagepricingentry.ts new file mode 100644 index 000000000..9842d1f2b --- /dev/null +++ b/src/models/imagepricingentry.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7a0d3f05b12c + */ + +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 Billable = { + OutputImage: "output_image", + InputImage: "input_image", + InputFont: "input_font", + InputReference: "input_reference", + InputText: "input_text", +} as const; +export type Billable = OpenEnum; + +export const Unit = { + Image: "image", + Megapixel: "megapixel", + Token: "token", +} as const; +export type Unit = OpenEnum; + +/** + * One billable pricing line for an image provider. + */ +export type ImagePricingEntry = { + billable: Billable; + costUsd: number; + unit: Unit; + variant?: string | undefined; +}; + +/** @internal */ +export const Billable$inboundSchema: z.ZodType = openEnums + .inboundSchema(Billable); + +/** @internal */ +export const Unit$inboundSchema: z.ZodType = openEnums + .inboundSchema(Unit); + +/** @internal */ +export const ImagePricingEntry$inboundSchema: z.ZodType< + ImagePricingEntry, + unknown +> = z.object({ + billable: Billable$inboundSchema, + cost_usd: z.number(), + unit: Unit$inboundSchema, + variant: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "cost_usd": "costUsd", + }); +}); + +export function imagePricingEntryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImagePricingEntry$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImagePricingEntry' from JSON`, + ); +} diff --git a/src/models/imagestreamingresponse.ts b/src/models/imagestreamingresponse.ts new file mode 100644 index 000000000..d76607d5f --- /dev/null +++ b/src/models/imagestreamingresponse.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 845661ccae1f + */ + +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 { + ImageGenCompletedEvent, + ImageGenCompletedEvent$inboundSchema, +} from "./imagegencompletedevent.js"; +import { + ImageGenPartialImageEvent, + ImageGenPartialImageEvent$inboundSchema, +} from "./imagegenpartialimageevent.js"; +import { + ImageGenStreamErrorEvent, + ImageGenStreamErrorEvent$inboundSchema, +} from "./imagegenstreamerrorevent.js"; + +export type ImageStreamingResponseData = + | ImageGenPartialImageEvent + | ImageGenCompletedEvent + | ImageGenStreamErrorEvent + | discriminatedUnionTypes.Unknown<"type">; + +export type ImageStreamingResponse = { + data: + | ImageGenPartialImageEvent + | ImageGenCompletedEvent + | ImageGenStreamErrorEvent + | discriminatedUnionTypes.Unknown<"type">; +}; + +/** @internal */ +export const ImageStreamingResponseData$inboundSchema: z.ZodType< + ImageStreamingResponseData, + unknown +> = discriminatedUnion("type", { + ["image_generation.partial_image"]: ImageGenPartialImageEvent$inboundSchema, + ["image_generation.completed"]: ImageGenCompletedEvent$inboundSchema, + error: ImageGenStreamErrorEvent$inboundSchema, +}); + +export function imageStreamingResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageStreamingResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageStreamingResponseData' from JSON`, + ); +} + +/** @internal */ +export const ImageStreamingResponse$inboundSchema: z.ZodType< + ImageStreamingResponse, + unknown +> = z.object({ + data: z.string().transform((v, ctx) => { + try { + return JSON.parse(v); + } catch (err) { + ctx.addIssue({ + input: v, + code: "custom", + message: `malformed json: ${err}`, + }); + return z.NEVER; + } + }).pipe(discriminatedUnion("type", { + ["image_generation.partial_image"]: ImageGenPartialImageEvent$inboundSchema, + ["image_generation.completed"]: ImageGenCompletedEvent$inboundSchema, + error: ImageGenStreamErrorEvent$inboundSchema, + })), +}); + +export function imageStreamingResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ImageStreamingResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ImageStreamingResponse' from JSON`, + ); +} diff --git a/src/models/index.ts b/src/models/index.ts index b6af20234..051c58c64 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -11,6 +11,7 @@ export * from "./advisorreasoning.js"; export * from "./advisorservertoolconfig.js"; export * from "./advisorservertoolopenrouter.js"; export * from "./annotationaddedevent.js"; +export * from "./anthropicadvisormessageusageiteration.js"; export * from "./anthropicallowedcallers.js"; export * from "./anthropicbase64imagesource.js"; export * from "./anthropicbase64pdfsource.js"; @@ -21,23 +22,30 @@ export * from "./anthropiccitationcontentblocklocationparam.js"; export * from "./anthropiccitationpagelocationparam.js"; export * from "./anthropiccitationsearchresultlocation.js"; export * from "./anthropiccitationwebsearchresultlocation.js"; +export * from "./anthropiccompactionusageiteration.js"; export * from "./anthropicdocumentblockparam.js"; export * from "./anthropicfiledocumentsource.js"; export * from "./anthropicimageblockparam.js"; export * from "./anthropicimagemimetype.js"; export * from "./anthropicinputtokensclearatleast.js"; export * from "./anthropicinputtokenstrigger.js"; +export * from "./anthropiciterationcachecreation.js"; +export * from "./anthropicmessageusageiteration.js"; export * from "./anthropicplaintextsource.js"; export * from "./anthropicsearchresultblockparam.js"; +export * from "./anthropicspeed.js"; export * from "./anthropictextblockparam.js"; export * from "./anthropicthinkingdisplay.js"; export * from "./anthropicthinkingturns.js"; export * from "./anthropictooluseskeep.js"; export * from "./anthropictoolusestrigger.js"; +export * from "./anthropicunknownusageiteration.js"; export * from "./anthropicurlimagesource.js"; export * from "./anthropicurlpdfsource.js"; +export * from "./anthropicusageiteration.js"; export * from "./anthropicwebsearchresultblockparam.js"; export * from "./anthropicwebsearchtooluserlocation.js"; +export * from "./apierrortype.js"; export * from "./applypatchcallitem.js"; export * from "./applypatchcalloperation.js"; export * from "./applypatchcalloperationdiffdeltaevent.js"; @@ -62,13 +70,7 @@ export * from "./bashservertool.js"; export * from "./bashservertoolconfig.js"; export * from "./bashservertoolengine.js"; export * from "./bashservertoolenvironment.js"; -export * from "./benchmarkpricing.js"; -export * from "./benchmarksaaitem.js"; -export * from "./benchmarksaameta.js"; -export * from "./benchmarksaaresponse.js"; -export * from "./benchmarksdaitem.js"; -export * from "./benchmarksdameta.js"; -export * from "./benchmarksdaresponse.js"; +export * from "./booleancapability.js"; export * from "./bulkaddworkspacemembersrequest.js"; export * from "./bulkaddworkspacemembersresponse.js"; export * from "./bulkassignkeysrequest.js"; @@ -83,6 +85,7 @@ export * from "./bulkunassignmembersrequest.js"; export * from "./bulkunassignmembersresponse.js"; export * from "./byokkey.js"; export * from "./byokproviderslug.js"; +export * from "./capabilitydescriptor.js"; export * from "./chatassistantimages.js"; export * from "./chatassistantmessage.js"; export * from "./chataudiooutput.js"; @@ -168,6 +171,7 @@ export * from "./customtoolcalloutputitem.js"; export * from "./dabenchmarkentry.js"; export * from "./datetimeservertool.js"; export * from "./datetimeservertoolconfig.js"; +export * from "./debugevent.js"; export * from "./defaultparameters.js"; export * from "./deletebyokkeyresponse.js"; export * from "./deleteguardrailresponse.js"; @@ -179,6 +183,7 @@ export * from "./edgenetworktimeoutresponseerrordata.js"; export * from "./endpointinfo.js"; export * from "./endpointsmetadata.js"; export * from "./endpointstatus.js"; +export * from "./enumcapability.js"; export * from "./errorevent.js"; export * from "./filecitation.js"; export * from "./filedeleteresponse.js"; @@ -222,15 +227,29 @@ export * from "./getworkspaceresponse.js"; export * from "./guardrail.js"; export * from "./guardrailinterval.js"; export * from "./imageconfig.js"; +export * from "./imageendpoint.js"; export * from "./imagegencallcompletedevent.js"; export * from "./imagegencallgeneratingevent.js"; export * from "./imagegencallinprogressevent.js"; export * from "./imagegencallpartialimageevent.js"; +export * from "./imagegencompletedevent.js"; +export * from "./imagegenerationrequest.js"; +export * from "./imagegenerationresponse.js"; export * from "./imagegenerationservertool.js"; export * from "./imagegenerationservertoolconfig.js"; export * from "./imagegenerationservertoolconfigunion.js"; export * from "./imagegenerationservertoolopenrouter.js"; export * from "./imagegenerationstatus.js"; +export * from "./imagegenerationusage.js"; +export * from "./imagegenpartialimageevent.js"; +export * from "./imagegenstreamerrorevent.js"; +export * from "./imagemodelarchitecture.js"; +export * from "./imagemodelendpointsresponse.js"; +export * from "./imagemodellistitem.js"; +export * from "./imagemodelslistresponse.js"; +export * from "./imageoutputmodality.js"; +export * from "./imagepricingentry.js"; +export * from "./imagestreamingresponse.js"; export * from "./incompletedetails.js"; export * from "./inputaudio.js"; export * from "./inputfile.js"; @@ -276,6 +295,7 @@ export * from "./modelarchitecture.js"; export * from "./modelbenchmarks.js"; export * from "./modelgroup.js"; export * from "./modellinks.js"; +export * from "./modelreasoning.js"; export * from "./modelresponse.js"; export * from "./modelscountresponse.js"; export * from "./modelslistresponse.js"; @@ -382,6 +402,7 @@ export * from "./providersortconfig.js"; export * from "./publicendpoint.js"; export * from "./publicpricing.js"; export * from "./quantization.js"; +export * from "./rangecapability.js"; export * from "./rankingsdailyitem.js"; export * from "./rankingsdailymeta.js"; export * from "./rankingsdailyresponse.js"; @@ -451,6 +472,10 @@ export * from "./subagentnestedtool.js"; export * from "./subagentreasoning.js"; export * from "./subagentservertoolconfig.js"; export * from "./subagentservertoolopenrouter.js"; +export * from "./taskclassificationitem.js"; +export * from "./taskclassificationmacrocategory.js"; +export * from "./taskclassificationmodel.js"; +export * from "./taskclassificationresponse.js"; export * from "./textdeltaevent.js"; export * from "./textdoneevent.js"; export * from "./textextendedconfig.js"; @@ -461,6 +486,11 @@ export * from "./topproviderinfo.js"; export * from "./traceconfig.js"; export * from "./truncation.js"; export * from "./unauthorizedresponseerrordata.js"; +export * from "./unifiedbenchmarkpricing.js"; +export * from "./unifiedbenchmarksaaitem.js"; +export * from "./unifiedbenchmarksdaitem.js"; +export * from "./unifiedbenchmarksmeta.js"; +export * from "./unifiedbenchmarksresponse.js"; export * from "./unprocessableentityresponseerrordata.js"; export * from "./updatebyokkeyrequest.js"; export * from "./updatebyokkeyresponse.js"; diff --git a/src/models/inputreference.ts b/src/models/inputreference.ts index d03f51d83..17d6675ad 100644 --- a/src/models/inputreference.ts +++ b/src/models/inputreference.ts @@ -25,13 +25,13 @@ import { */ export type InputReference = | ContentPartAudio - | ContentPartImage + | (ContentPartImage & { type: "image_url" }) | ContentPartVideo; /** @internal */ export type InputReference$Outbound = | ContentPartAudio$Outbound - | ContentPartImage$Outbound + | (ContentPartImage$Outbound & { type: "image_url" }) | ContentPartVideo$Outbound; /** @internal */ @@ -40,7 +40,9 @@ export const InputReference$outboundSchema: z.ZodType< InputReference > = z.union([ ContentPartAudio$outboundSchema, - ContentPartImage$outboundSchema, + ContentPartImage$outboundSchema.and( + z.object({ type: z.literal("image_url") }), + ), ContentPartVideo$outboundSchema, ]); diff --git a/src/models/messagesrequest.ts b/src/models/messagesrequest.ts index affa52981..934cb586b 100644 --- a/src/models/messagesrequest.ts +++ b/src/models/messagesrequest.ts @@ -231,7 +231,7 @@ export type ContextManagement = { | undefined; }; -export type Metadata = { +export type MessagesRequestMetadata = { userId?: string | null | undefined; }; @@ -483,7 +483,7 @@ export type MessagesRequest = { fallbacks?: Array | null | undefined; maxTokens?: number | undefined; messages: Array | null; - metadata?: Metadata | undefined; + metadata?: MessagesRequestMetadata | undefined; model: string; models?: Array | undefined; /** @@ -821,22 +821,28 @@ export function contextManagementToJSON( } /** @internal */ -export type Metadata$Outbound = { +export type MessagesRequestMetadata$Outbound = { user_id?: string | null | undefined; }; /** @internal */ -export const Metadata$outboundSchema: z.ZodType = z - .object({ - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); +export const MessagesRequestMetadata$outboundSchema: z.ZodType< + MessagesRequestMetadata$Outbound, + MessagesRequestMetadata +> = z.object({ + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", }); +}); -export function metadataToJSON(metadata: Metadata): string { - return JSON.stringify(Metadata$outboundSchema.parse(metadata)); +export function messagesRequestMetadataToJSON( + messagesRequestMetadata: MessagesRequestMetadata, +): string { + return JSON.stringify( + MessagesRequestMetadata$outboundSchema.parse(messagesRequestMetadata), + ); } /** @internal */ @@ -1497,7 +1503,7 @@ export type MessagesRequest$Outbound = { fallbacks?: Array | null | undefined; max_tokens?: number | undefined; messages: Array | null; - metadata?: Metadata$Outbound | undefined; + metadata?: MessagesRequestMetadata$Outbound | undefined; model: string; models?: Array | undefined; output_config?: MessagesOutputConfig$Outbound | undefined; @@ -1571,7 +1577,7 @@ export const MessagesRequest$outboundSchema: z.ZodType< .optional(), maxTokens: z.int().optional(), messages: z.nullable(z.array(MessagesMessageParam$outboundSchema)), - metadata: z.lazy(() => Metadata$outboundSchema).optional(), + metadata: z.lazy(() => MessagesRequestMetadata$outboundSchema).optional(), model: z.string(), models: z.array(z.string()).optional(), outputConfig: MessagesOutputConfig$outboundSchema.optional(), diff --git a/src/models/model.ts b/src/models/model.ts index 414b0872a..36fc52455 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -21,6 +21,10 @@ import { ModelBenchmarks$inboundSchema, } from "./modelbenchmarks.js"; import { ModelLinks, ModelLinks$inboundSchema } from "./modellinks.js"; +import { + ModelReasoning, + ModelReasoning$inboundSchema, +} from "./modelreasoning.js"; import { Parameter, Parameter$inboundSchema } from "./parameter.js"; import { PerRequestLimits, @@ -96,6 +100,10 @@ export type Model = { * Pricing information for the model */ pricing: PublicPricing; + /** + * Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. + */ + reasoning?: ModelReasoning | undefined; /** * List of supported parameters for this model */ @@ -127,6 +135,7 @@ export const Model$inboundSchema: z.ZodType = z.object({ name: z.string(), per_request_limits: z.nullable(PerRequestLimits$inboundSchema), pricing: PublicPricing$inboundSchema, + reasoning: ModelReasoning$inboundSchema.optional(), supported_parameters: z.array(Parameter$inboundSchema), supported_voices: z.nullable(z.array(z.string())), top_provider: TopProviderInfo$inboundSchema, diff --git a/src/models/modelreasoning.ts b/src/models/modelreasoning.ts new file mode 100644 index 000000000..51568c020 --- /dev/null +++ b/src/models/modelreasoning.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c7312e55417d + */ + +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 { + ReasoningEffort, + ReasoningEffort$inboundSchema, +} from "./reasoningeffort.js"; + +/** + * Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `"none"`, prefer omitting effort unless the user explicitly disables reasoning. + */ +export const DefaultEffort = { + Max: "max", + Xhigh: "xhigh", + High: "high", + Medium: "medium", + Low: "low", + Minimal: "minimal", + None: "none", +} as const; +/** + * Default reasoning effort when the client enables reasoning without specifying effort. Maps to `reasoning.effort` in chat requests. When `"none"`, prefer omitting effort unless the user explicitly disables reasoning. + */ +export type DefaultEffort = OpenEnum; + +/** + * Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. + */ +export type ModelReasoning = { + defaultEffort?: DefaultEffort | null | undefined; + /** + * Default reasoning enabled state when the client does not set `reasoning.enabled`. + */ + defaultEnabled?: boolean | undefined; + /** + * When true, reasoning cannot be disabled and effort "none" is rejected. + */ + mandatory: boolean; + /** + * Allowed reasoning effort values for this model, in descending effort order (highest first). Null means no allowlist — all gateway effort values are accepted. + */ + supportedEfforts?: Array | null | undefined; + /** + * Present and `true` when the model accepts `reasoning.max_tokens` in requests (Anthropic-style) instead of or in addition to `reasoning.effort`. Omitted otherwise. + */ + supportsMaxTokens?: boolean | undefined; +}; + +/** @internal */ +export const DefaultEffort$inboundSchema: z.ZodType = + openEnums.inboundSchema(DefaultEffort); + +/** @internal */ +export const ModelReasoning$inboundSchema: z.ZodType = + z.object({ + default_effort: z.nullable(DefaultEffort$inboundSchema).optional(), + default_enabled: z.boolean().optional(), + mandatory: z.boolean(), + supported_efforts: z.nullable( + z.array(z.nullable(ReasoningEffort$inboundSchema)), + ).optional(), + supports_max_tokens: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + "default_effort": "defaultEffort", + "default_enabled": "defaultEnabled", + "supported_efforts": "supportedEfforts", + "supports_max_tokens": "supportsMaxTokens", + }); + }); + +export function modelReasoningFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ModelReasoning$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ModelReasoning' from JSON`, + ); +} diff --git a/src/models/observabilityarizedestination.ts b/src/models/observabilityarizedestination.ts index cb98814e8..2f2776951 100644 --- a/src/models/observabilityarizedestination.ts +++ b/src/models/observabilityarizedestination.ts @@ -20,6 +20,9 @@ export type ObservabilityArizeDestinationConfig = { * Custom HTTP headers to include in requests to this destination. */ headers?: { [k: string]: string } | undefined; + /** + * The name of the tracing project in Arize AX + */ modelId: string; spaceKey: string; }; diff --git a/src/models/openresponsesresult.ts b/src/models/openresponsesresult.ts index e233b23a1..fe0e3b166 100644 --- a/src/models/openresponsesresult.ts +++ b/src/models/openresponsesresult.ts @@ -10,6 +10,7 @@ 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 { ApiErrorType, ApiErrorType$inboundSchema } from "./apierrortype.js"; import { ApplyPatchServerTool, ApplyPatchServerTool$inboundSchema, @@ -198,6 +199,10 @@ export type OpenResponsesResult = { */ usage?: Usage | null | undefined; user?: string | null | undefined; + /** + * Canonical OpenRouter error type, stable across all API formats + */ + errorType?: ApiErrorType | undefined; openrouterMetadata?: OpenRouterMetadata | undefined; }; @@ -315,6 +320,7 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< truncation: z.nullable(Truncation$inboundSchema).optional(), usage: z.nullable(Usage$inboundSchema).optional(), user: z.nullable(z.string()).optional(), + error_type: ApiErrorType$inboundSchema.optional(), openrouter_metadata: OpenRouterMetadata$inboundSchema.optional(), }).transform((v) => { return remap$(v, { @@ -334,6 +340,7 @@ export const OpenResponsesResult$inboundSchema: z.ZodType< "tool_choice": "toolChoice", "top_logprobs": "topLogprobs", "top_p": "topP", + "error_type": "errorType", "openrouter_metadata": "openrouterMetadata", }); }); diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index 03226207e..3469cd4dd 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -176,6 +176,15 @@ export const ObjectT = { } as const; export type ObjectT = ClosedEnum; +/** + * Breakdown of upstream inference costs + */ +export type CostDetails = { + upstreamInferenceCompletionsCost: number; + upstreamInferenceCost?: number | null | undefined; + upstreamInferencePromptCost: number; +}; + /** * Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. */ @@ -210,6 +219,14 @@ export type CreateEmbeddingsUsage = { * Cost of the request in credits */ cost?: number | undefined; + /** + * Breakdown of upstream inference costs + */ + costDetails?: CostDetails | null | undefined; + /** + * Whether a request was made using a Bring Your Own Key configuration + */ + isByok?: boolean | undefined; /** * Number of tokens in the input */ @@ -512,6 +529,30 @@ export function createEmbeddingsDataFromJSON( /** @internal */ export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); +/** @internal */ +export const CostDetails$inboundSchema: z.ZodType = z + .object({ + upstream_inference_completions_cost: z.number(), + upstream_inference_cost: z.nullable(z.number()).optional(), + upstream_inference_prompt_cost: z.number(), + }).transform((v) => { + return remap$(v, { + "upstream_inference_completions_cost": "upstreamInferenceCompletionsCost", + "upstream_inference_cost": "upstreamInferenceCost", + "upstream_inference_prompt_cost": "upstreamInferencePromptCost", + }); + }); + +export function costDetailsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CostDetails$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CostDetails' from JSON`, + ); +} + /** @internal */ export const PromptTokensDetails$inboundSchema: z.ZodType< PromptTokensDetails, @@ -548,12 +589,16 @@ export const CreateEmbeddingsUsage$inboundSchema: z.ZodType< unknown > = z.object({ cost: z.number().optional(), + cost_details: z.nullable(z.lazy(() => CostDetails$inboundSchema)).optional(), + is_byok: z.boolean().optional(), prompt_tokens: z.int(), prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema) .optional(), total_tokens: z.int(), }).transform((v) => { return remap$(v, { + "cost_details": "costDetails", + "is_byok": "isByok", "prompt_tokens": "promptTokens", "prompt_tokens_details": "promptTokensDetails", "total_tokens": "totalTokens", diff --git a/src/models/operations/createimages.ts b/src/models/operations/createimages.ts new file mode 100644 index 000000000..0a2ca2582 --- /dev/null +++ b/src/models/operations/createimages.ts @@ -0,0 +1,122 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0a478467f700 + */ + +import * as z from "zod/v4"; +import { EventStream } from "../../lib/event-streams.js"; +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 CreateImagesGlobals = { + /** + * 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 CreateImagesRequest = { + /** + * 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; + imageGenerationRequest: models.ImageGenerationRequest; +}; + +export type CreateImagesResponse = + | models.ImageGenerationResponse + | EventStream; + +/** @internal */ +export type CreateImagesRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + ImageGenerationRequest: models.ImageGenerationRequest$Outbound; +}; + +/** @internal */ +export const CreateImagesRequest$outboundSchema: z.ZodType< + CreateImagesRequest$Outbound, + CreateImagesRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + imageGenerationRequest: models.ImageGenerationRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + imageGenerationRequest: "ImageGenerationRequest", + }); +}); + +export function createImagesRequestToJSON( + createImagesRequest: CreateImagesRequest, +): string { + return JSON.stringify( + CreateImagesRequest$outboundSchema.parse(createImagesRequest), + ); +} + +/** @internal */ +export const CreateImagesResponse$inboundSchema: z.ZodType< + CreateImagesResponse, + unknown +> = z.union([ + models.ImageGenerationResponse$inboundSchema, + z.custom>(x => x instanceof ReadableStream) + .transform(stream => { + return new EventStream(stream, rawEvent => { + if (rawEvent.data === "[DONE]") return { done: true, value: undefined }; + return { + done: false, + value: models.ImageStreamingResponse$inboundSchema.parse(rawEvent) + ?.data, + }; + }); + }), +]); + +export function createImagesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateImagesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateImagesResponse' from JSON`, + ); +} diff --git a/src/models/operations/getbenchmarks.ts b/src/models/operations/getbenchmarks.ts new file mode 100644 index 000000000..dc197dd76 --- /dev/null +++ b/src/models/operations/getbenchmarks.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 52eb1eb063ae + */ + +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 type GetBenchmarksGlobals = { + /** + * 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; +}; + +/** + * Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. + */ +export const Source = { + ArtificialAnalysis: "artificial-analysis", + DesignArena: "design-arena", +} as const; +/** + * Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. + */ +export type Source = OpenEnum; + +/** + * Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. + */ +export const TaskType = { + Coding: "coding", + Intelligence: "intelligence", + Agentic: "agentic", +} as const; +/** + * Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. + */ +export type TaskType = OpenEnum; + +/** + * Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. + */ +export const Arena = { + Models: "models", + Builders: "builders", + Agents: "agents", +} as const; +/** + * Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. + */ +export type Arena = OpenEnum; + +export type GetBenchmarksRequest = { + /** + * 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; + /** + * Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources. + */ + source?: Source | undefined; + /** + * Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category. + */ + taskType?: TaskType | undefined; + /** + * Design Arena only: arena to query. Defaults to `models` when source is `design-arena`. + */ + arena?: Arena | undefined; + /** + * Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. + */ + category?: string | undefined; + /** + * Maximum number of items to return. When omitted, all matching results are returned. + */ + maxResults?: number | undefined; +}; + +/** @internal */ +export const Source$outboundSchema: z.ZodType = openEnums + .outboundSchema(Source); + +/** @internal */ +export const TaskType$outboundSchema: z.ZodType = openEnums + .outboundSchema(TaskType); + +/** @internal */ +export const Arena$outboundSchema: z.ZodType = openEnums + .outboundSchema(Arena); + +/** @internal */ +export type GetBenchmarksRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + source?: string | undefined; + task_type?: string | undefined; + arena?: string | undefined; + category?: string | undefined; + max_results?: number | undefined; +}; + +/** @internal */ +export const GetBenchmarksRequest$outboundSchema: z.ZodType< + GetBenchmarksRequest$Outbound, + GetBenchmarksRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + source: Source$outboundSchema.optional(), + taskType: TaskType$outboundSchema.optional(), + arena: Arena$outboundSchema.optional(), + category: z.string().optional(), + maxResults: z.int().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + taskType: "task_type", + maxResults: "max_results", + }); +}); + +export function getBenchmarksRequestToJSON( + getBenchmarksRequest: GetBenchmarksRequest, +): string { + return JSON.stringify( + GetBenchmarksRequest$outboundSchema.parse(getBenchmarksRequest), + ); +} diff --git a/src/models/operations/getbenchmarksdesignarena.ts b/src/models/operations/gettaskclassifications.ts similarity index 52% rename from src/models/operations/getbenchmarksdesignarena.ts rename to src/models/operations/gettaskclassifications.ts index 09db903b1..47868501a 100644 --- a/src/models/operations/getbenchmarksdesignarena.ts +++ b/src/models/operations/gettaskclassifications.ts @@ -1,14 +1,13 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 86e27de57b33 + * @generated-id: 8482753ddd33 */ 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 { ClosedEnum } from "../../types/enums.js"; -export type GetBenchmarksDesignArenaGlobals = { +export type GetTaskClassificationsGlobals = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * @@ -31,19 +30,17 @@ export type GetBenchmarksDesignArenaGlobals = { }; /** - * Arena to query. Defaults to `models`. + * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported. */ -export const Arena = { - Models: "models", - Builders: "builders", - Agents: "agents", +export const Window = { + Sevend: "7d", } as const; /** - * Arena to query. Defaults to `models`. + * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported. */ -export type Arena = OpenEnum; +export type Window = ClosedEnum; -export type GetBenchmarksDesignArenaRequest = { +export type GetTaskClassificationsRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * @@ -64,57 +61,43 @@ export type GetBenchmarksDesignArenaRequest = { */ appCategories?: string | undefined; /** - * Arena to query. Defaults to `models`. + * Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported. */ - arena?: Arena | undefined; - /** - * Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories. - */ - category?: string | undefined; - /** - * Max results to return: per category when no category filter is applied (1–100, default 50). - */ - maxResults?: number | undefined; + window?: Window | undefined; }; /** @internal */ -export const Arena$outboundSchema: z.ZodType = openEnums - .outboundSchema(Arena); +export const Window$outboundSchema: z.ZodEnum = z.enum(Window); /** @internal */ -export type GetBenchmarksDesignArenaRequest$Outbound = { +export type GetTaskClassificationsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - arena: string; - category?: string | undefined; - max_results: number; + window: string; }; /** @internal */ -export const GetBenchmarksDesignArenaRequest$outboundSchema: z.ZodType< - GetBenchmarksDesignArenaRequest$Outbound, - GetBenchmarksDesignArenaRequest +export const GetTaskClassificationsRequest$outboundSchema: z.ZodType< + GetTaskClassificationsRequest$Outbound, + GetTaskClassificationsRequest > = z.object({ httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - arena: Arena$outboundSchema.default("models"), - category: z.string().optional(), - maxResults: z.int().default(50), + window: Window$outboundSchema.default("7d"), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - maxResults: "max_results", }); }); -export function getBenchmarksDesignArenaRequestToJSON( - getBenchmarksDesignArenaRequest: GetBenchmarksDesignArenaRequest, +export function getTaskClassificationsRequestToJSON( + getTaskClassificationsRequest: GetTaskClassificationsRequest, ): string { return JSON.stringify( - GetBenchmarksDesignArenaRequest$outboundSchema.parse( - getBenchmarksDesignArenaRequest, + GetTaskClassificationsRequest$outboundSchema.parse( + getTaskClassificationsRequest, ), ); } diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 54f61e82e..11720ee4c 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -15,6 +15,7 @@ export * from "./createauthkeyscode.js"; export * from "./createbyokkey.js"; export * from "./createembeddings.js"; export * from "./createguardrail.js"; +export * from "./createimages.js"; export * from "./createkeys.js"; export * from "./createobservabilitydestination.js"; export * from "./createpresetschatcompletions.js"; @@ -35,8 +36,7 @@ export * from "./downloadfilecontent.js"; export * from "./exchangeauthcodeforapikey.js"; export * from "./getanalyticsmeta.js"; export * from "./getapprankings.js"; -export * from "./getbenchmarksartificialanalysis.js"; -export * from "./getbenchmarksdesignarena.js"; +export * from "./getbenchmarks.js"; export * from "./getbyokkey.js"; export * from "./getcredits.js"; export * from "./getcurrentkey.js"; @@ -50,6 +50,7 @@ export * from "./getobservabilitydestination.js"; export * from "./getpreset.js"; export * from "./getpresetversion.js"; export * from "./getrankingsdaily.js"; +export * from "./gettaskclassifications.js"; export * from "./getuseractivity.js"; export * from "./getvideos.js"; export * from "./getworkspace.js"; @@ -63,6 +64,8 @@ export * from "./listgenerationcontent.js"; export * from "./listguardrailkeyassignments.js"; export * from "./listguardrailmemberassignments.js"; export * from "./listguardrails.js"; +export * from "./listimagemodelendpoints.js"; +export * from "./listimagemodels.js"; export * from "./listkeyassignments.js"; export * from "./listmemberassignments.js"; export * from "./listmodelscount.js"; diff --git a/src/models/operations/listbyokkeys.ts b/src/models/operations/listbyokkeys.ts index ea2d4b6fc..70d688634 100644 --- a/src/models/operations/listbyokkeys.ts +++ b/src/models/operations/listbyokkeys.ts @@ -113,6 +113,7 @@ export const Provider = { Stepfun: "stepfun", Streamlake: "streamlake", Switchpoint: "switchpoint", + Tenstorrent: "tenstorrent", Together: "together", Upstage: "upstage", Venice: "venice", diff --git a/src/models/operations/getbenchmarksartificialanalysis.ts b/src/models/operations/listimagemodelendpoints.ts similarity index 68% rename from src/models/operations/getbenchmarksartificialanalysis.ts rename to src/models/operations/listimagemodelendpoints.ts index a510b9302..2297b5a25 100644 --- a/src/models/operations/getbenchmarksartificialanalysis.ts +++ b/src/models/operations/listimagemodelendpoints.ts @@ -1,12 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 1b7863e0088a + * @generated-id: efc8274ae41c */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -export type GetBenchmarksArtificialAnalysisGlobals = { +export type ListImageModelEndpointsGlobals = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * @@ -28,7 +28,7 @@ export type GetBenchmarksArtificialAnalysisGlobals = { appCategories?: string | undefined; }; -export type GetBenchmarksArtificialAnalysisRequest = { +export type ListImageModelEndpointsRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * @@ -49,42 +49,46 @@ export type GetBenchmarksArtificialAnalysisRequest = { */ appCategories?: string | undefined; /** - * Max results to return (1–100, default 50). + * Model author/organization */ - maxResults?: number | undefined; + author: string; + /** + * Model slug + */ + slug: string; }; /** @internal */ -export type GetBenchmarksArtificialAnalysisRequest$Outbound = { +export type ListImageModelEndpointsRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; - max_results: number; + author: string; + slug: string; }; /** @internal */ -export const GetBenchmarksArtificialAnalysisRequest$outboundSchema: z.ZodType< - GetBenchmarksArtificialAnalysisRequest$Outbound, - GetBenchmarksArtificialAnalysisRequest +export const ListImageModelEndpointsRequest$outboundSchema: z.ZodType< + ListImageModelEndpointsRequest$Outbound, + ListImageModelEndpointsRequest > = z.object({ httpReferer: z.string().optional(), appTitle: z.string().optional(), appCategories: z.string().optional(), - maxResults: z.int().default(50), + author: z.string(), + slug: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - maxResults: "max_results", }); }); -export function getBenchmarksArtificialAnalysisRequestToJSON( - getBenchmarksArtificialAnalysisRequest: - GetBenchmarksArtificialAnalysisRequest, +export function listImageModelEndpointsRequestToJSON( + listImageModelEndpointsRequest: ListImageModelEndpointsRequest, ): string { return JSON.stringify( - GetBenchmarksArtificialAnalysisRequest$outboundSchema.parse( - getBenchmarksArtificialAnalysisRequest, + ListImageModelEndpointsRequest$outboundSchema.parse( + listImageModelEndpointsRequest, ), ); } diff --git a/src/models/operations/listimagemodels.ts b/src/models/operations/listimagemodels.ts new file mode 100644 index 000000000..53af57ce4 --- /dev/null +++ b/src/models/operations/listimagemodels.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 439d3eed4cf3 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ListImageModelsGlobals = { + /** + * 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 ListImageModelsRequest = { + /** + * 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 ListImageModelsRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; +}; + +/** @internal */ +export const ListImageModelsRequest$outboundSchema: z.ZodType< + ListImageModelsRequest$Outbound, + ListImageModelsRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listImageModelsRequestToJSON( + listImageModelsRequest: ListImageModelsRequest, +): string { + return JSON.stringify( + ListImageModelsRequest$outboundSchema.parse(listImageModelsRequest), + ); +} diff --git a/src/models/providername.ts b/src/models/providername.ts index 7a46799fb..3f27b88ec 100644 --- a/src/models/providername.ts +++ b/src/models/providername.ts @@ -85,6 +85,7 @@ export const ProviderName = { Stealth: "Stealth", StreamLake: "StreamLake", Switchpoint: "Switchpoint", + Tenstorrent: "Tenstorrent", Together: "Together", Upstage: "Upstage", Venice: "Venice", diff --git a/src/models/provideroptions.ts b/src/models/provideroptions.ts index dc49d8b51..47f7f7181 100644 --- a/src/models/provideroptions.ts +++ b/src/models/provideroptions.ts @@ -115,6 +115,7 @@ export type ProviderOptions = { streamlake?: { [k: string]: any | null } | undefined; switchpoint?: { [k: string]: any | null } | undefined; targon?: { [k: string]: any | null } | undefined; + tenstorrent?: { [k: string]: any | null } | undefined; together?: { [k: string]: any | null } | undefined; togetherLite?: { [k: string]: any | null } | undefined; ubicloud?: { [k: string]: any | null } | undefined; @@ -234,6 +235,7 @@ export type ProviderOptions$Outbound = { streamlake?: { [k: string]: any | null } | undefined; switchpoint?: { [k: string]: any | null } | undefined; targon?: { [k: string]: any | null } | undefined; + tenstorrent?: { [k: string]: any | null } | undefined; together?: { [k: string]: any | null } | undefined; "together-lite"?: { [k: string]: any | null } | undefined; ubicloud?: { [k: string]: any | null } | undefined; @@ -356,6 +358,7 @@ export const ProviderOptions$outboundSchema: z.ZodType< 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(), + tenstorrent: 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(), diff --git a/src/models/providerresponse.ts b/src/models/providerresponse.ts index 4015a951b..f80be3b64 100644 --- a/src/models/providerresponse.ts +++ b/src/models/providerresponse.ts @@ -121,6 +121,7 @@ export const ProviderResponseProviderName = { Stealth: "Stealth", StreamLake: "StreamLake", Switchpoint: "Switchpoint", + Tenstorrent: "Tenstorrent", Together: "Together", Upstage: "Upstage", Venice: "Venice", diff --git a/src/models/rangecapability.ts b/src/models/rangecapability.ts new file mode 100644 index 000000000..978f55268 --- /dev/null +++ b/src/models/rangecapability.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2a301274c1ac + */ + +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"; + +/** + * A parameter that accepts any value within an inclusive numeric range. + */ +export type RangeCapability = { + max: number; + min: number; + type: "range"; +}; + +/** @internal */ +export const RangeCapability$inboundSchema: z.ZodType< + RangeCapability, + unknown +> = z.object({ + max: z.number(), + min: z.number(), + type: z.literal("range"), +}); + +export function rangeCapabilityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RangeCapability$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RangeCapability' from JSON`, + ); +} diff --git a/src/models/reasoningeffort.ts b/src/models/reasoningeffort.ts index 2804617c1..e9e0767ea 100644 --- a/src/models/reasoningeffort.ts +++ b/src/models/reasoningeffort.ts @@ -8,6 +8,7 @@ import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; export const ReasoningEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", diff --git a/src/models/responsesrequest.ts b/src/models/responsesrequest.ts index 811f5ab49..8a563db74 100644 --- a/src/models/responsesrequest.ts +++ b/src/models/responsesrequest.ts @@ -37,6 +37,11 @@ import { BashServerTool$Outbound, BashServerTool$outboundSchema, } from "./bashservertool.js"; +import { + ChatDebugOptions, + ChatDebugOptions$Outbound, + ChatDebugOptions$outboundSchema, +} from "./chatdebugoptions.js"; import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound, @@ -308,6 +313,10 @@ export type ResponsesRequest = { * Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. */ cacheControl?: AnthropicCacheControlDirective | undefined; + /** + * Debug options for inspecting request transformations (streaming only) + */ + debug?: ChatDebugOptions | undefined; frequencyPenalty?: number | null | 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. @@ -588,6 +597,7 @@ export function responsesRequestToolUnionToJSON( export type ResponsesRequest$Outbound = { background?: boolean | null | undefined; cache_control?: AnthropicCacheControlDirective$Outbound | undefined; + debug?: ChatDebugOptions$Outbound | undefined; frequency_penalty?: number | null | undefined; image_config?: { [k: string]: ImageConfig$Outbound } | undefined; include?: Array | null | undefined; @@ -680,6 +690,7 @@ export const ResponsesRequest$outboundSchema: z.ZodType< > = z.object({ background: z.nullable(z.boolean()).optional(), cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(), + debug: ChatDebugOptions$outboundSchema.optional(), frequencyPenalty: z.nullable(z.number()).optional(), imageConfig: z.record(z.string(), ImageConfig$outboundSchema).optional(), include: z.nullable(z.array(ResponseIncludesEnum$outboundSchema)).optional(), diff --git a/src/models/streamevents.ts b/src/models/streamevents.ts index 3fef329fe..82be1dbf6 100644 --- a/src/models/streamevents.ts +++ b/src/models/streamevents.ts @@ -36,6 +36,7 @@ import { CustomToolCallInputDoneEvent, CustomToolCallInputDoneEvent$inboundSchema, } from "./customtoolcallinputdoneevent.js"; +import { DebugEvent, DebugEvent$inboundSchema } from "./debugevent.js"; import { ErrorEvent, ErrorEvent$inboundSchema } from "./errorevent.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -189,6 +190,7 @@ export type StreamEvents = | OpenResponsesCreatedEvent | CustomToolCallInputDeltaEvent | CustomToolCallInputDoneEvent + | DebugEvent | StreamEventsResponseFailed | FunctionCallArgsDeltaEvent | FunctionCallArgsDoneEvent @@ -241,6 +243,7 @@ export const StreamEvents$inboundSchema: z.ZodType = CustomToolCallInputDeltaEvent$inboundSchema, ["response.custom_tool_call_input.done"]: CustomToolCallInputDoneEvent$inboundSchema, + ["response.debug"]: DebugEvent$inboundSchema, ["response.failed"]: StreamEventsResponseFailed$inboundSchema, ["response.function_call_arguments.delta"]: FunctionCallArgsDeltaEvent$inboundSchema, diff --git a/src/models/subagentreasoning.ts b/src/models/subagentreasoning.ts index 32611b13d..8b73e10c5 100644 --- a/src/models/subagentreasoning.ts +++ b/src/models/subagentreasoning.ts @@ -12,6 +12,7 @@ import { OpenEnum } from "../types/enums.js"; * Reasoning effort level for the subagent call. */ export const SubagentReasoningEffort = { + Max: "max", Xhigh: "xhigh", High: "high", Medium: "medium", diff --git a/src/models/taskclassificationitem.ts b/src/models/taskclassificationitem.ts new file mode 100644 index 000000000..b49f51a47 --- /dev/null +++ b/src/models/taskclassificationitem.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 58896645e490 + */ + +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 { + TaskClassificationModel, + TaskClassificationModel$inboundSchema, +} from "./taskclassificationmodel.js"; + +export type TaskClassificationItem = { + /** + * Fraction of this classification's token volume within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`. + */ + categoryTokenShare: number; + /** + * Fraction of this classification's usage within its macro-category (0–1). Sums to 1 across all classifications sharing the same `macro_category`. + */ + categoryUsageShare: number; + /** + * Human-readable label for the classification. + */ + displayName: string; + /** + * Coarse grouping derived from the tag prefix: `code`, `data`, `agent`, or `general`. + */ + macroCategory: string; + /** + * Top models for this classification by request volume, sorted descending. Each entry reports the model's share of this classification's requests and tokens. + */ + models: Array; + /** + * Classification tag identifier (e.g. `code:general_impl`, `agent:web_search`). + */ + tag: string; + /** + * Fraction of classified sampled token volume (prompt + completion) attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator. + */ + tokenShare: number; + /** + * Fraction of classified sampled requests attributed to this classification (0–1). The unclassified `other` bucket is excluded from the denominator. + */ + usageShare: number; +}; + +/** @internal */ +export const TaskClassificationItem$inboundSchema: z.ZodType< + TaskClassificationItem, + unknown +> = z.object({ + category_token_share: z.number(), + category_usage_share: z.number(), + display_name: z.string(), + macro_category: z.string(), + models: z.array(TaskClassificationModel$inboundSchema), + tag: z.string(), + token_share: z.number(), + usage_share: z.number(), +}).transform((v) => { + return remap$(v, { + "category_token_share": "categoryTokenShare", + "category_usage_share": "categoryUsageShare", + "display_name": "displayName", + "macro_category": "macroCategory", + "token_share": "tokenShare", + "usage_share": "usageShare", + }); +}); + +export function taskClassificationItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskClassificationItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskClassificationItem' from JSON`, + ); +} diff --git a/src/models/taskclassificationmacrocategory.ts b/src/models/taskclassificationmacrocategory.ts new file mode 100644 index 000000000..276b0b767 --- /dev/null +++ b/src/models/taskclassificationmacrocategory.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 72bec2c5ebbb + */ + +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 TaskClassificationMacroCategory = { + /** + * Macro-category identifier. + */ + key: string; + /** + * Human-readable label for the macro-category. + */ + label: string; + /** + * Combined token share of all classifications in this macro-category (0–1). + */ + tokenShare: number; + /** + * Combined usage share of all classifications in this macro-category (0–1). + */ + usageShare: number; +}; + +/** @internal */ +export const TaskClassificationMacroCategory$inboundSchema: z.ZodType< + TaskClassificationMacroCategory, + unknown +> = z.object({ + key: z.string(), + label: z.string(), + token_share: z.number(), + usage_share: z.number(), +}).transform((v) => { + return remap$(v, { + "token_share": "tokenShare", + "usage_share": "usageShare", + }); +}); + +export function taskClassificationMacroCategoryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskClassificationMacroCategory$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskClassificationMacroCategory' from JSON`, + ); +} diff --git a/src/models/taskclassificationmodel.ts b/src/models/taskclassificationmodel.ts new file mode 100644 index 000000000..f79bf0dcd --- /dev/null +++ b/src/models/taskclassificationmodel.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5cf061d8d849 + */ + +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 TaskClassificationModel = { + /** + * Model identifier (permaslug). + */ + id: string; + /** + * Fraction of this classification's sampled token volume attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded). + */ + tagTokenShare: number; + /** + * Fraction of this classification's sampled requests attributed to this model (0–1). Sums to ≤1 across the returned models (only top-N are included and unattributed requests are excluded). + */ + tagUsageShare: number; +}; + +/** @internal */ +export const TaskClassificationModel$inboundSchema: z.ZodType< + TaskClassificationModel, + unknown +> = z.object({ + id: z.string(), + tag_token_share: z.number(), + tag_usage_share: z.number(), +}).transform((v) => { + return remap$(v, { + "tag_token_share": "tagTokenShare", + "tag_usage_share": "tagUsageShare", + }); +}); + +export function taskClassificationModelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskClassificationModel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskClassificationModel' from JSON`, + ); +} diff --git a/src/models/taskclassificationresponse.ts b/src/models/taskclassificationresponse.ts new file mode 100644 index 000000000..a8ce6fb7f --- /dev/null +++ b/src/models/taskclassificationresponse.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e618eb0802a7 + */ + +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 { + TaskClassificationItem, + TaskClassificationItem$inboundSchema, +} from "./taskclassificationitem.js"; +import { + TaskClassificationMacroCategory, + TaskClassificationMacroCategory$inboundSchema, +} from "./taskclassificationmacrocategory.js"; + +export type TaskClassificationResponseData = { + /** + * UTC date (YYYY-MM-DD) of the window upper bound (yesterday). Data is exclusive of the current incomplete UTC day. This is the expected latest date in the snapshot; it does not confirm data presence for that date. + */ + asOf: string; + /** + * Per-task classification market-share data, sorted by usage_share descending. + */ + classifications: Array; + /** + * Aggregate market-share data per macro-category (code, data, agent, general). + */ + macroCategories: Array; + /** + * Number of trailing days covered by this snapshot. + */ + windowDays: number; +}; + +export type TaskClassificationResponse = { + data: TaskClassificationResponseData; +}; + +/** @internal */ +export const TaskClassificationResponseData$inboundSchema: z.ZodType< + TaskClassificationResponseData, + unknown +> = z.object({ + as_of: z.string(), + classifications: z.array(TaskClassificationItem$inboundSchema), + macro_categories: z.array(TaskClassificationMacroCategory$inboundSchema), + window_days: z.int(), +}).transform((v) => { + return remap$(v, { + "as_of": "asOf", + "macro_categories": "macroCategories", + "window_days": "windowDays", + }); +}); + +export function taskClassificationResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskClassificationResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskClassificationResponseData' from JSON`, + ); +} + +/** @internal */ +export const TaskClassificationResponse$inboundSchema: z.ZodType< + TaskClassificationResponse, + unknown +> = z.object({ + data: z.lazy(() => TaskClassificationResponseData$inboundSchema), +}); + +export function taskClassificationResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskClassificationResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskClassificationResponse' from JSON`, + ); +} diff --git a/src/models/benchmarkpricing.ts b/src/models/unifiedbenchmarkpricing.ts similarity index 63% rename from src/models/benchmarkpricing.ts rename to src/models/unifiedbenchmarkpricing.ts index 274450e53..0a39dad24 100644 --- a/src/models/benchmarkpricing.ts +++ b/src/models/unifiedbenchmarkpricing.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 74aab084b178 + * @generated-id: c6862b5223a1 */ import * as z from "zod/v4"; @@ -11,7 +11,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; /** * OpenRouter pricing per token for this model. Null if pricing is unavailable. */ -export type BenchmarkPricing = { +export type UnifiedBenchmarkPricing = { /** * Cost per output token (USD, decimal string). */ @@ -23,20 +23,20 @@ export type BenchmarkPricing = { }; /** @internal */ -export const BenchmarkPricing$inboundSchema: z.ZodType< - BenchmarkPricing, +export const UnifiedBenchmarkPricing$inboundSchema: z.ZodType< + UnifiedBenchmarkPricing, unknown > = z.object({ completion: z.string(), prompt: z.string(), }); -export function benchmarkPricingFromJSON( +export function unifiedBenchmarkPricingFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BenchmarkPricing$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarkPricing' from JSON`, + (x) => UnifiedBenchmarkPricing$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarkPricing' from JSON`, ); } diff --git a/src/models/benchmarksaaitem.ts b/src/models/unifiedbenchmarksaaitem.ts similarity index 63% rename from src/models/benchmarksaaitem.ts rename to src/models/unifiedbenchmarksaaitem.ts index 54fbada85..b81f764c6 100644 --- a/src/models/benchmarksaaitem.ts +++ b/src/models/unifiedbenchmarksaaitem.ts @@ -1,23 +1,19 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 82b5c9f01e00 + * @generated-id: 436660899947 */ 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 { - BenchmarkPricing, - BenchmarkPricing$inboundSchema, -} from "./benchmarkpricing.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + UnifiedBenchmarkPricing, + UnifiedBenchmarkPricing$inboundSchema, +} from "./unifiedbenchmarkpricing.js"; -export type BenchmarksAAItem = { - /** - * Model name as listed on Artificial Analysis. - */ - aaName: string; +export type UnifiedBenchmarksAAItem = { /** * Artificial Analysis Agentic Index composite score. Higher is better. */ @@ -26,6 +22,10 @@ export type BenchmarksAAItem = { * Artificial Analysis Coding Index composite score. Higher is better. */ codingIndex: number | null; + /** + * Model name as listed on Artificial Analysis. + */ + displayName: string; /** * Artificial Analysis Intelligence Index composite score. Higher is better. */ @@ -37,36 +37,41 @@ export type BenchmarksAAItem = { /** * OpenRouter pricing per token for this model. Null if pricing is unavailable. */ - pricing: BenchmarkPricing | null; + pricing: UnifiedBenchmarkPricing | null; + /** + * Benchmark source discriminator. + */ + source: "artificial-analysis"; }; /** @internal */ -export const BenchmarksAAItem$inboundSchema: z.ZodType< - BenchmarksAAItem, +export const UnifiedBenchmarksAAItem$inboundSchema: z.ZodType< + UnifiedBenchmarksAAItem, unknown > = z.object({ - aa_name: z.string(), agentic_index: z.nullable(z.number()), coding_index: z.nullable(z.number()), + display_name: z.string(), intelligence_index: z.nullable(z.number()), model_permaslug: z.string(), - pricing: z.nullable(BenchmarkPricing$inboundSchema), + pricing: z.nullable(UnifiedBenchmarkPricing$inboundSchema), + source: z.literal("artificial-analysis"), }).transform((v) => { return remap$(v, { - "aa_name": "aaName", "agentic_index": "agenticIndex", "coding_index": "codingIndex", + "display_name": "displayName", "intelligence_index": "intelligenceIndex", "model_permaslug": "modelPermaslug", }); }); -export function benchmarksAAItemFromJSON( +export function unifiedBenchmarksAAItemFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BenchmarksAAItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksAAItem' from JSON`, + (x) => UnifiedBenchmarksAAItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarksAAItem' from JSON`, ); } diff --git a/src/models/benchmarksdaitem.ts b/src/models/unifiedbenchmarksdaitem.ts similarity index 76% rename from src/models/benchmarksdaitem.ts rename to src/models/unifiedbenchmarksdaitem.ts index 60e0bed98..caebfff51 100644 --- a/src/models/benchmarksdaitem.ts +++ b/src/models/unifiedbenchmarksdaitem.ts @@ -1,17 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: a8a7a42ac948 + * @generated-id: f911314affb3 */ 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 { - BenchmarkPricing, - BenchmarkPricing$inboundSchema, -} from "./benchmarkpricing.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + UnifiedBenchmarkPricing, + UnifiedBenchmarkPricing$inboundSchema, +} from "./unifiedbenchmarkpricing.js"; /** * Placement distribution from tournament matches. @@ -24,7 +24,7 @@ export type TournamentStats = { total: number | null; }; -export type BenchmarksDAItem = { +export type UnifiedBenchmarksDAItem = { /** * Arena this ranking belongs to. */ @@ -46,13 +46,17 @@ export type BenchmarksDAItem = { */ elo: number; /** - * Stable OpenRouter model identifier when the model is on OpenRouter; otherwise the upstream Design Arena model id. Use pricing != null to detect OpenRouter-mapped models. + * Stable OpenRouter model identifier when mapped; otherwise the upstream Design Arena model id. */ modelPermaslug: string; /** * OpenRouter pricing per token for this model. Null if pricing is unavailable. */ - pricing: BenchmarkPricing | null; + pricing: UnifiedBenchmarkPricing | null; + /** + * Benchmark source discriminator. + */ + source: "design-arena"; /** * Placement distribution from tournament matches. */ @@ -93,8 +97,8 @@ export function tournamentStatsFromJSON( } /** @internal */ -export const BenchmarksDAItem$inboundSchema: z.ZodType< - BenchmarksDAItem, +export const UnifiedBenchmarksDAItem$inboundSchema: z.ZodType< + UnifiedBenchmarksDAItem, unknown > = z.object({ arena: z.string(), @@ -103,7 +107,8 @@ export const BenchmarksDAItem$inboundSchema: z.ZodType< display_name: z.string(), elo: z.number(), model_permaslug: z.string(), - pricing: z.nullable(BenchmarkPricing$inboundSchema), + pricing: z.nullable(UnifiedBenchmarkPricing$inboundSchema), + source: z.literal("design-arena"), tournament_stats: z.lazy(() => TournamentStats$inboundSchema), win_rate: z.number(), }).transform((v) => { @@ -116,12 +121,12 @@ export const BenchmarksDAItem$inboundSchema: z.ZodType< }); }); -export function benchmarksDAItemFromJSON( +export function unifiedBenchmarksDAItemFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => BenchmarksDAItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BenchmarksDAItem' from JSON`, + (x) => UnifiedBenchmarksDAItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarksDAItem' from JSON`, ); } diff --git a/src/models/unifiedbenchmarksmeta.ts b/src/models/unifiedbenchmarksmeta.ts new file mode 100644 index 000000000..53b032904 --- /dev/null +++ b/src/models/unifiedbenchmarksmeta.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d146ee8b8956 + */ + +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 { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * The source filter applied, or null when all sources are returned. + */ +export const SourceEnum = { + ArtificialAnalysis: "artificial-analysis", + DesignArena: "design-arena", +} as const; +/** + * The source filter applied, or null when all sources are returned. + */ +export type SourceEnum = OpenEnum; + +/** + * Dataset version. + */ +export const UnifiedBenchmarksMetaVersion = { + V1: "v1", +} as const; +/** + * Dataset version. + */ +export type UnifiedBenchmarksMetaVersion = ClosedEnum< + typeof UnifiedBenchmarksMetaVersion +>; + +export type UnifiedBenchmarksMeta = { + /** + * ISO-8601 timestamp of when this data was last updated. + */ + asOf: string; + /** + * Required attribution when republishing this data, or null when results span multiple sources (attribute each item individually by its `source` discriminator). + */ + citation: string | null; + /** + * Number of unique models in the response. + */ + modelCount: number; + /** + * The source filter applied, or null when all sources are returned. + */ + source: SourceEnum | null; + /** + * URL of the upstream data source, or null when results span multiple sources. + */ + sourceUrl: string | null; + /** + * The task_type filter applied, or null if showing all. + */ + taskType: string | null; + /** + * Dataset version. + */ + version: UnifiedBenchmarksMetaVersion; +}; + +/** @internal */ +export const SourceEnum$inboundSchema: z.ZodType = + openEnums.inboundSchema(SourceEnum); + +/** @internal */ +export const UnifiedBenchmarksMetaVersion$inboundSchema: z.ZodEnum< + typeof UnifiedBenchmarksMetaVersion +> = z.enum(UnifiedBenchmarksMetaVersion); + +/** @internal */ +export const UnifiedBenchmarksMeta$inboundSchema: z.ZodType< + UnifiedBenchmarksMeta, + unknown +> = z.object({ + as_of: z.string(), + citation: z.nullable(z.string()), + model_count: z.int(), + source: z.nullable(SourceEnum$inboundSchema), + source_url: z.nullable(z.string()), + task_type: z.nullable(z.string()), + version: UnifiedBenchmarksMetaVersion$inboundSchema, +}).transform((v) => { + return remap$(v, { + "as_of": "asOf", + "model_count": "modelCount", + "source_url": "sourceUrl", + "task_type": "taskType", + }); +}); + +export function unifiedBenchmarksMetaFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UnifiedBenchmarksMeta$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarksMeta' from JSON`, + ); +} diff --git a/src/models/unifiedbenchmarksresponse.ts b/src/models/unifiedbenchmarksresponse.ts new file mode 100644 index 000000000..6c8181e31 --- /dev/null +++ b/src/models/unifiedbenchmarksresponse.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b3f08556727b + */ + +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 { + UnifiedBenchmarksAAItem, + UnifiedBenchmarksAAItem$inboundSchema, +} from "./unifiedbenchmarksaaitem.js"; +import { + UnifiedBenchmarksDAItem, + UnifiedBenchmarksDAItem$inboundSchema, +} from "./unifiedbenchmarksdaitem.js"; +import { + UnifiedBenchmarksMeta, + UnifiedBenchmarksMeta$inboundSchema, +} from "./unifiedbenchmarksmeta.js"; + +export type UnifiedBenchmarksResponseData = + | UnifiedBenchmarksAAItem + | UnifiedBenchmarksDAItem + | discriminatedUnionTypes.Unknown<"source">; + +export type UnifiedBenchmarksResponse = { + data: Array< + | UnifiedBenchmarksAAItem + | UnifiedBenchmarksDAItem + | discriminatedUnionTypes.Unknown<"source"> + >; + meta: UnifiedBenchmarksMeta; +}; + +/** @internal */ +export const UnifiedBenchmarksResponseData$inboundSchema: z.ZodType< + UnifiedBenchmarksResponseData, + unknown +> = discriminatedUnion("source", { + ["artificial-analysis"]: UnifiedBenchmarksAAItem$inboundSchema, + ["design-arena"]: UnifiedBenchmarksDAItem$inboundSchema, +}); + +export function unifiedBenchmarksResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UnifiedBenchmarksResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarksResponseData' from JSON`, + ); +} + +/** @internal */ +export const UnifiedBenchmarksResponse$inboundSchema: z.ZodType< + UnifiedBenchmarksResponse, + unknown +> = z.object({ + data: z.array( + discriminatedUnion("source", { + ["artificial-analysis"]: UnifiedBenchmarksAAItem$inboundSchema, + ["design-arena"]: UnifiedBenchmarksDAItem$inboundSchema, + }), + ), + meta: UnifiedBenchmarksMeta$inboundSchema, +}); + +export function unifiedBenchmarksResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UnifiedBenchmarksResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnifiedBenchmarksResponse' from JSON`, + ); +} diff --git a/src/models/videogenerationrequest.ts b/src/models/videogenerationrequest.ts index bb47ecb3b..6be62ffed 100644 --- a/src/models/videogenerationrequest.ts +++ b/src/models/videogenerationrequest.ts @@ -21,7 +21,7 @@ import { /** * Aspect ratio of the generated video */ -export const AspectRatio = { +export const VideoGenerationRequestAspectRatio = { OneHundredAndSixtyNine: "16:9", NineHundredAndSixteen: "9:16", Eleven: "1:1", @@ -35,12 +35,14 @@ export const AspectRatio = { /** * Aspect ratio of the generated video */ -export type AspectRatio = OpenEnum; +export type VideoGenerationRequestAspectRatio = OpenEnum< + typeof VideoGenerationRequestAspectRatio +>; /** * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. */ -export type Options = { +export type VideoGenerationRequestOptions = { oneai?: { [k: string]: any | null } | undefined; ai21?: { [k: string]: any | null } | undefined; aionLabs?: { [k: string]: any | null } | undefined; @@ -146,6 +148,7 @@ export type Options = { streamlake?: { [k: string]: any | null } | undefined; switchpoint?: { [k: string]: any | null } | undefined; targon?: { [k: string]: any | null } | undefined; + tenstorrent?: { [k: string]: any | null } | undefined; together?: { [k: string]: any | null } | undefined; togetherLite?: { [k: string]: any | null } | undefined; ubicloud?: { [k: string]: any | null } | undefined; @@ -162,13 +165,13 @@ export type Options = { * Provider-specific passthrough configuration */ export type VideoGenerationRequestProvider = { - options?: Options | undefined; + options?: VideoGenerationRequestOptions | undefined; }; /** * Resolution of the generated video */ -export const Resolution = { +export const VideoGenerationRequestResolution = { FourHundredAndEightyp: "480p", SevenHundredAndTwentyp: "720p", OneThousandAndEightyp: "1080p", @@ -179,13 +182,15 @@ export const Resolution = { /** * Resolution of the generated video */ -export type Resolution = OpenEnum; +export type VideoGenerationRequestResolution = OpenEnum< + typeof VideoGenerationRequestResolution +>; export type VideoGenerationRequest = { /** * Aspect ratio of the generated video */ - aspectRatio?: AspectRatio | undefined; + aspectRatio?: VideoGenerationRequestAspectRatio | undefined; /** * URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. */ @@ -215,7 +220,7 @@ export type VideoGenerationRequest = { /** * Resolution of the generated video */ - resolution?: Resolution | undefined; + resolution?: VideoGenerationRequestResolution | 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. */ @@ -227,11 +232,13 @@ export type VideoGenerationRequest = { }; /** @internal */ -export const AspectRatio$outboundSchema: z.ZodType = - openEnums.outboundSchema(AspectRatio); +export const VideoGenerationRequestAspectRatio$outboundSchema: z.ZodType< + string, + VideoGenerationRequestAspectRatio +> = openEnums.outboundSchema(VideoGenerationRequestAspectRatio); /** @internal */ -export type Options$Outbound = { +export type VideoGenerationRequestOptions$Outbound = { "01ai"?: { [k: string]: any | null } | undefined; ai21?: { [k: string]: any | null } | undefined; "aion-labs"?: { [k: string]: any | null } | undefined; @@ -337,6 +344,7 @@ export type Options$Outbound = { streamlake?: { [k: string]: any | null } | undefined; switchpoint?: { [k: string]: any | null } | undefined; targon?: { [k: string]: any | null } | undefined; + tenstorrent?: { [k: string]: any | null } | undefined; together?: { [k: string]: any | null } | undefined; "together-lite"?: { [k: string]: any | null } | undefined; ubicloud?: { [k: string]: any | null } | undefined; @@ -350,156 +358,165 @@ export type Options$Outbound = { }; /** @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(), - baidu: 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(), - crucible: z.record(z.string(), z.nullable(z.any())).optional(), - crusoe: z.record(z.string(), z.nullable(z.any())).optional(), - darkbloom: z.record(z.string(), z.nullable(z.any())).optional(), - decart: 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(), - dekallm: z.record(z.string(), z.nullable(z.any())).optional(), - digitalocean: 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(), - nexAgi: 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(), - perceptron: 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(), - poolside: z.record(z.string(), z.nullable(z.any())).optional(), - recraft: 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(), - wafer: 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", - nexAgi: "nex-agi", - openInference: "open-inference", - sambanovaCloaked: "sambanova-cloaked", - sfCompute: "sf-compute", - togetherLite: "together-lite", - zAi: "z-ai", - }); +export const VideoGenerationRequestOptions$outboundSchema: z.ZodType< + VideoGenerationRequestOptions$Outbound, + VideoGenerationRequestOptions +> = 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(), + baidu: 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(), + crucible: z.record(z.string(), z.nullable(z.any())).optional(), + crusoe: z.record(z.string(), z.nullable(z.any())).optional(), + darkbloom: z.record(z.string(), z.nullable(z.any())).optional(), + decart: 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(), + dekallm: z.record(z.string(), z.nullable(z.any())).optional(), + digitalocean: 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(), + nexAgi: 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(), + perceptron: 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(), + poolside: z.record(z.string(), z.nullable(z.any())).optional(), + recraft: 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(), + tenstorrent: 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(), + wafer: 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", + nexAgi: "nex-agi", + 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)); +export function videoGenerationRequestOptionsToJSON( + videoGenerationRequestOptions: VideoGenerationRequestOptions, +): string { + return JSON.stringify( + VideoGenerationRequestOptions$outboundSchema.parse( + videoGenerationRequestOptions, + ), + ); } /** @internal */ export type VideoGenerationRequestProvider$Outbound = { - options?: Options$Outbound | undefined; + options?: VideoGenerationRequestOptions$Outbound | undefined; }; /** @internal */ @@ -507,7 +524,8 @@ export const VideoGenerationRequestProvider$outboundSchema: z.ZodType< VideoGenerationRequestProvider$Outbound, VideoGenerationRequestProvider > = z.object({ - options: z.lazy(() => Options$outboundSchema).optional(), + options: z.lazy(() => VideoGenerationRequestOptions$outboundSchema) + .optional(), }); export function videoGenerationRequestProviderToJSON( @@ -521,8 +539,10 @@ export function videoGenerationRequestProviderToJSON( } /** @internal */ -export const Resolution$outboundSchema: z.ZodType = - openEnums.outboundSchema(Resolution); +export const VideoGenerationRequestResolution$outboundSchema: z.ZodType< + string, + VideoGenerationRequestResolution +> = openEnums.outboundSchema(VideoGenerationRequestResolution); /** @internal */ export type VideoGenerationRequest$Outbound = { @@ -545,7 +565,7 @@ export const VideoGenerationRequest$outboundSchema: z.ZodType< VideoGenerationRequest$Outbound, VideoGenerationRequest > = z.object({ - aspectRatio: AspectRatio$outboundSchema.optional(), + aspectRatio: VideoGenerationRequestAspectRatio$outboundSchema.optional(), callbackUrl: z.string().optional(), duration: z.int().optional(), frameImages: z.array(FrameImage$outboundSchema).optional(), @@ -555,7 +575,7 @@ export const VideoGenerationRequest$outboundSchema: z.ZodType< prompt: z.string(), provider: z.lazy(() => VideoGenerationRequestProvider$outboundSchema) .optional(), - resolution: Resolution$outboundSchema.optional(), + resolution: VideoGenerationRequestResolution$outboundSchema.optional(), seed: z.int().optional(), size: z.string().optional(), }).transform((v) => { diff --git a/src/sdk/benchmarks.ts b/src/sdk/benchmarks.ts new file mode 100644 index 000000000..53446d145 --- /dev/null +++ b/src/sdk/benchmarks.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 72ce7b70fba8 + */ + +import { benchmarksGetBenchmarks } from "../funcs/benchmarksGetBenchmarks.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 Benchmarks extends ClientSDK { + /** + * List Benchmarks + * + * @remarks + * Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. + */ + async getBenchmarks( + request?: operations.GetBenchmarksRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(benchmarksGetBenchmarks( + this, + request, + options, + )); + } +} diff --git a/src/sdk/classifications.ts b/src/sdk/classifications.ts new file mode 100644 index 000000000..191de2eaa --- /dev/null +++ b/src/sdk/classifications.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2a28d7ad1729 + */ + +import { classificationsGetTaskClassifications } from "../funcs/classificationsGetTaskClassifications.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 Classifications extends ClientSDK { + /** + * Task classification market share + * + * @remarks + * Returns the market-share breakdown of OpenRouter traffic by task classification + * (e.g. code generation, web search, summarization) over a trailing time window. + * + * Each classification reports its share of classified sampled requests (`usage_share`) + * and classified sampled token volume (`token_share`) as fractions between 0 and 1. + * The unclassified `other` bucket is excluded. Absolute volumes are not exposed + * because the underlying data is sampled. + * + * Each classification also includes a `models` array listing the top models by + * request volume within that classification, with their within-tag usage and token shares. + * + * Classifications are grouped into macro-categories (Code, Data, Agent, General) + * with aggregate shares provided for each. + * + * Authenticate with any valid OpenRouter API key (same key used for inference). + * Rate-limited to 30 requests/minute per key and 500 requests/day per account. + * + * When republishing or quoting this data, cite as: + * "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}." + */ + async getTaskClassifications( + request?: operations.GetTaskClassificationsRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(classificationsGetTaskClassifications( + this, + request, + options, + )); + } +} diff --git a/src/sdk/datasets.ts b/src/sdk/datasets.ts index a3f51a67e..487dc1477 100644 --- a/src/sdk/datasets.ts +++ b/src/sdk/datasets.ts @@ -4,8 +4,6 @@ */ import { datasetsGetAppRankings } from "../funcs/datasetsGetAppRankings.js"; -import { datasetsGetBenchmarksArtificialAnalysis } from "../funcs/datasetsGetBenchmarksArtificialAnalysis.js"; -import { datasetsGetBenchmarksDesignArena } from "../funcs/datasetsGetBenchmarksDesignArena.js"; import { datasetsGetRankingsDaily } from "../funcs/datasetsGetRankingsDaily.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; @@ -55,40 +53,6 @@ export class Datasets extends ClientSDK { )); } - /** - * Artificial Analysis Benchmark Indices - * - * @remarks - * Returns composite index scores (Intelligence, Coding, Agentic) from Artificial Analysis for LLM models. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. - */ - async getBenchmarksArtificialAnalysis( - request?: operations.GetBenchmarksArtificialAnalysisRequest | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(datasetsGetBenchmarksArtificialAnalysis( - this, - request, - options, - )); - } - - /** - * Design Arena Benchmark Rankings - * - * @remarks - * Returns ELO ratings from head-to-head arena battles on Design Arena. Filterable by arena (models/builders/agents) and category. Includes OpenRouter pricing per model. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account. - */ - async getBenchmarksDesignArena( - request?: operations.GetBenchmarksDesignArenaRequest | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(datasetsGetBenchmarksDesignArena( - this, - request, - options, - )); - } - /** * Daily token totals for top 50 models * diff --git a/src/sdk/images.ts b/src/sdk/images.ts new file mode 100644 index 000000000..870d064eb --- /dev/null +++ b/src/sdk/images.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5b5822276576 + */ + +import { imagesGenerate } from "../funcs/imagesGenerate.js"; +import { imagesListModelEndpoints } from "../funcs/imagesListModelEndpoints.js"; +import { imagesListModels } from "../funcs/imagesListModels.js"; +import { EventStream } from "../lib/event-streams.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 Images extends ClientSDK { + /** + * Generate an image + * + * @remarks + * Generates an image from a text prompt via the image generation router + */ + async generate( + request: operations.CreateImagesRequest & { + imageGenerationRequest: { stream?: false | undefined }; + }, + options?: RequestOptions, + ): Promise; + async generate( + request: operations.CreateImagesRequest & { + imageGenerationRequest: { stream: true }; + }, + options?: RequestOptions, + ): Promise>; + async generate( + request: operations.CreateImagesRequest, + options?: RequestOptions, + ): Promise; + async generate( + request: operations.CreateImagesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imagesGenerate( + this, + request, + options, + )); + } + + /** + * List image generation models + * + * @remarks + * Lists every image generation model with its top-level supported-parameter superset and a URL to its full per-endpoint records. + */ + async listModels( + request?: operations.ListImageModelsRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imagesListModels( + this, + request, + options, + )); + } + + /** + * List endpoints for an image model + * + * @remarks + * Returns the full per-endpoint records for an image model: each endpoint's definitive supported parameters, pricing, and passthrough allowlist. + */ + async listModelEndpoints( + request: operations.ListImageModelEndpointsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imagesListModelEndpoints( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 9bbf1d64d..25257e81b 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -6,9 +6,11 @@ import { ClientSDK } from "../lib/sdks.js"; import { Analytics } from "./analytics.js"; import { APIKeys } from "./apikeys.js"; +import { Benchmarks } from "./benchmarks.js"; import { Beta } from "./beta.js"; import { Byok } from "./byok.js"; import { Chat } from "./chat.js"; +import { Classifications } from "./classifications.js"; import { Credits } from "./credits.js"; import { Datasets } from "./datasets.js"; import { Embeddings } from "./embeddings.js"; @@ -16,6 +18,7 @@ import { Endpoints } from "./endpoints.js"; import { Files } from "./files.js"; import { Generations } from "./generations.js"; import { Guardrails } from "./guardrails.js"; +import { Images } from "./images.js"; import { Models } from "./models.js"; import { OAuth } from "./oauth.js"; import { Observability } from "./observability.js"; @@ -66,6 +69,11 @@ export class OpenRouter extends ClientSDK { return (this._oAuth ??= new OAuth(this._options)); } + private _benchmarks?: Benchmarks; + get benchmarks(): Benchmarks { + return (this._benchmarks ??= new Benchmarks(this._options)); + } + private _byok?: Byok; get byok(): Byok { return (this._byok ??= new Byok(this._options)); @@ -76,6 +84,11 @@ export class OpenRouter extends ClientSDK { return (this._chat ??= new Chat(this._options)); } + private _classifications?: Classifications; + get classifications(): Classifications { + return (this._classifications ??= new Classifications(this._options)); + } + private _credits?: Credits; get credits(): Credits { return (this._credits ??= new Credits(this._options)); @@ -111,6 +124,11 @@ export class OpenRouter extends ClientSDK { return (this._guardrails ??= new Guardrails(this._options)); } + private _images?: Images; + get images(): Images { + return (this._images ??= new Images(this._options)); + } + private _apiKeys?: APIKeys; get apiKeys(): APIKeys { return (this._apiKeys ??= new APIKeys(this._options)); From 685b1cd101d4580b2a74cdcae9bd834040e99936 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 00:56:53 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow