@openrouter/sdk 0.12.79 → 0.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -9
- package/esm/funcs/benchmarksGetBenchmarks.d.ts +19 -0
- package/esm/funcs/benchmarksGetBenchmarks.js +105 -0
- package/esm/funcs/betaAnalyticsGetAnalyticsMeta.d.ts +18 -0
- package/esm/funcs/betaAnalyticsGetAnalyticsMeta.js +96 -0
- package/esm/funcs/betaAnalyticsQueryAnalytics.d.ts +18 -0
- package/esm/funcs/betaAnalyticsQueryAnalytics.js +97 -0
- package/esm/funcs/betaResponsesSend.js +1 -1
- package/esm/funcs/chatSend.js +1 -1
- package/esm/funcs/classificationsGetTaskClassifications.d.ts +37 -0
- package/esm/funcs/classificationsGetTaskClassifications.js +119 -0
- package/esm/funcs/datasetsGetAppRankings.d.ts +43 -0
- package/esm/funcs/datasetsGetAppRankings.js +161 -0
- package/esm/funcs/filesDelete.d.ts +19 -0
- package/esm/funcs/filesDelete.js +107 -0
- package/esm/funcs/filesDownload.d.ts +18 -0
- package/esm/funcs/filesDownload.js +107 -0
- package/esm/funcs/filesList.d.ts +21 -0
- package/esm/funcs/filesList.js +131 -0
- package/esm/funcs/filesRetrieve.d.ts +19 -0
- package/esm/funcs/filesRetrieve.js +107 -0
- package/esm/funcs/filesUpload.d.ts +19 -0
- package/esm/funcs/filesUpload.js +121 -0
- package/esm/funcs/imagesGenerate.d.ts +30 -0
- package/esm/funcs/imagesGenerate.js +95 -0
- package/esm/funcs/imagesListModelEndpoints.d.ts +19 -0
- package/esm/funcs/imagesListModelEndpoints.js +107 -0
- package/esm/funcs/imagesListModels.d.ts +19 -0
- package/esm/funcs/imagesListModels.js +97 -0
- package/esm/funcs/modelsGet.d.ts +19 -0
- package/esm/funcs/modelsGet.js +107 -0
- package/esm/funcs/modelsList.js +12 -0
- package/esm/funcs/oAuthCreateAuthCode.d.ts +1 -1
- package/esm/funcs/oAuthCreateAuthCode.js +1 -1
- package/esm/funcs/presetsGet.d.ts +21 -0
- package/esm/funcs/presetsGet.js +105 -0
- package/esm/funcs/presetsGetVersion.d.ts +21 -0
- package/esm/funcs/presetsGetVersion.js +109 -0
- package/esm/funcs/presetsList.d.ts +23 -0
- package/esm/funcs/presetsList.js +136 -0
- package/esm/funcs/presetsListVersions.d.ts +23 -0
- package/esm/funcs/presetsListVersions.js +142 -0
- package/esm/funcs/workspacesDeleteBudget.d.ts +19 -0
- package/esm/funcs/workspacesDeleteBudget.js +107 -0
- package/esm/funcs/workspacesListBudgets.d.ts +19 -0
- package/esm/funcs/workspacesListBudgets.js +103 -0
- package/esm/funcs/workspacesSetBudget.d.ts +19 -0
- package/esm/funcs/workspacesSetBudget.js +110 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/aabenchmarkentry.d.ts +24 -0
- package/esm/models/aabenchmarkentry.js +23 -0
- package/esm/models/advisornestedtool.d.ts +25 -0
- package/esm/models/advisornestedtool.js +23 -0
- package/esm/models/advisorreasoning.d.ts +42 -0
- package/esm/models/advisorreasoning.js +34 -0
- package/esm/models/advisorservertoolconfig.d.ts +65 -0
- package/esm/models/advisorservertoolconfig.js +31 -0
- package/esm/models/advisorservertoolopenrouter.d.ts +28 -0
- package/esm/models/advisorservertoolopenrouter.js +20 -0
- package/esm/models/anthropicadvisormessageusageiteration.d.ts +24 -0
- package/esm/models/anthropicadvisormessageusageiteration.js +36 -0
- package/esm/models/anthropiccompactionusageiteration.d.ts +23 -0
- package/esm/models/anthropiccompactionusageiteration.js +35 -0
- package/esm/models/anthropicdocumentblockparam.d.ts +5 -4
- package/esm/models/anthropicdocumentblockparam.js +3 -0
- package/esm/models/anthropicfiledocumentsource.d.ts +14 -0
- package/esm/models/anthropicfiledocumentsource.js +19 -0
- package/esm/models/anthropiciterationcachecreation.d.ts +11 -0
- package/esm/models/anthropiciterationcachecreation.js +21 -0
- package/esm/models/anthropicmessageusageiteration.d.ts +24 -0
- package/esm/models/anthropicmessageusageiteration.js +36 -0
- package/esm/models/anthropicspeed.d.ts +10 -0
- package/esm/models/anthropicspeed.js +12 -0
- package/esm/models/anthropicunknownusageiteration.d.ts +16 -0
- package/esm/models/anthropicunknownusageiteration.js +30 -0
- package/esm/models/anthropicusageiteration.d.ts +12 -0
- package/esm/models/anthropicusageiteration.js +21 -0
- package/esm/models/apierrortype.d.ts +41 -0
- package/esm/models/apierrortype.js +40 -0
- package/esm/models/apprankingsitem.d.ts +29 -0
- package/esm/models/apprankingsitem.js +26 -0
- package/esm/models/apprankingsresponse.d.ts +16 -0
- package/esm/models/apprankingsresponse.js +17 -0
- package/esm/models/bashservertool.d.ts +28 -0
- package/esm/models/bashservertool.js +20 -0
- package/esm/models/bashservertoolconfig.d.ts +30 -0
- package/esm/models/bashservertoolconfig.js +22 -0
- package/esm/models/bashservertoolengine.d.ts +17 -0
- package/esm/models/bashservertoolengine.js +16 -0
- package/esm/models/bashservertoolenvironment.d.ts +13 -0
- package/esm/models/bashservertoolenvironment.js +16 -0
- package/esm/models/booleancapability.d.ts +13 -0
- package/esm/models/booleancapability.js +14 -0
- package/esm/models/byokproviderslug.d.ts +5 -1
- package/esm/models/byokproviderslug.js +5 -1
- package/esm/models/capabilitydescriptor.d.ts +15 -0
- package/esm/models/capabilitydescriptor.js +19 -0
- package/esm/models/chatfunctiontool.d.ts +5 -2
- package/esm/models/chatfunctiontool.js +6 -0
- package/esm/models/chatrequest.d.ts +44 -0
- package/esm/models/chatrequest.js +26 -0
- package/esm/models/chatstreamchunk.d.ts +25 -4
- package/esm/models/chatstreamchunk.js +19 -4
- package/esm/models/chatusage.d.ts +32 -8
- package/esm/models/chatusage.js +25 -8
- package/esm/models/chatwebsearchshorthand.d.ts +10 -5
- package/esm/models/chatwebsearchshorthand.js +2 -0
- package/esm/models/containerautoenvironment.d.ts +15 -0
- package/esm/models/containerautoenvironment.js +13 -0
- package/esm/models/containerreferenceenvironment.d.ts +20 -0
- package/esm/models/containerreferenceenvironment.js +19 -0
- package/esm/models/contentfilterbuiltinentry.d.ts +5 -0
- package/esm/models/contentfilterbuiltinentry.js +7 -0
- package/esm/models/contentfilterbuiltinentryinput.d.ts +6 -0
- package/esm/models/contentfilterbuiltinentryinput.js +7 -0
- package/esm/models/contentpartaudio.d.ts +24 -0
- package/esm/models/contentpartaudio.js +27 -0
- package/esm/models/contentpartvideo.d.ts +24 -0
- package/esm/models/contentpartvideo.js +27 -0
- package/esm/models/createobservabilitydestinationrequest.d.ts +1 -1
- package/esm/models/dabenchmarkentry.d.ts +32 -0
- package/esm/models/dabenchmarkentry.js +23 -0
- package/esm/models/debugevent.d.ts +42 -0
- package/esm/models/debugevent.js +58 -0
- package/esm/models/deleteworkspacebudgetresponse.d.ts +13 -0
- package/esm/models/deleteworkspacebudgetresponse.js +14 -0
- package/esm/models/enumcapability.d.ts +14 -0
- package/esm/models/enumcapability.js +15 -0
- package/esm/models/filedeleteresponse.d.ts +21 -0
- package/esm/models/filedeleteresponse.js +20 -0
- package/esm/models/filelistresponse.d.ts +21 -0
- package/esm/models/filelistresponse.js +26 -0
- package/esm/models/filemetadata.d.ts +26 -0
- package/esm/models/filemetadata.js +33 -0
- package/esm/models/fusionanalysisresult.d.ts +88 -0
- package/esm/models/fusionanalysisresult.js +109 -0
- package/esm/models/fusioncallanalysiscompletedevent.d.ts +21 -0
- package/esm/models/fusioncallanalysiscompletedevent.js +26 -0
- package/esm/models/fusioncallanalysisinprogressevent.d.ts +17 -0
- package/esm/models/fusioncallanalysisinprogressevent.js +26 -0
- package/esm/models/fusioncallcompletedevent.d.ts +16 -0
- package/esm/models/fusioncallcompletedevent.js +24 -0
- package/esm/models/fusioncallinprogressevent.d.ts +16 -0
- package/esm/models/fusioncallinprogressevent.js +24 -0
- package/esm/models/fusioncallpaneladdedevent.d.ts +17 -0
- package/esm/models/fusioncallpaneladdedevent.js +25 -0
- package/esm/models/fusioncallpanelcompletedevent.d.ts +18 -0
- package/esm/models/fusioncallpanelcompletedevent.js +26 -0
- package/esm/models/fusioncallpaneldeltaevent.d.ts +18 -0
- package/esm/models/fusioncallpaneldeltaevent.js +26 -0
- package/esm/models/fusioncallpanelfailedevent.d.ts +19 -0
- package/esm/models/fusioncallpanelfailedevent.js +28 -0
- package/esm/models/fusioncallpanelreasoningdeltaevent.d.ts +18 -0
- package/esm/models/fusioncallpanelreasoningdeltaevent.js +26 -0
- package/esm/models/fusionplugin.d.ts +47 -0
- package/esm/models/fusionplugin.js +21 -0
- package/esm/models/fusionservertoolconfig.d.ts +35 -1
- package/esm/models/fusionservertoolconfig.js +14 -0
- package/esm/models/generationresponse.d.ts +22 -0
- package/esm/models/generationresponse.js +14 -0
- package/esm/models/getpresetresponse.d.ts +17 -0
- package/esm/models/getpresetresponse.js +15 -0
- package/esm/models/getpresetversionresponse.d.ts +17 -0
- package/esm/models/getpresetversionresponse.js +15 -0
- package/esm/models/imageendpoint.d.ts +41 -0
- package/esm/models/imageendpoint.js +33 -0
- package/esm/models/imagegencompletedevent.d.ts +29 -0
- package/esm/models/imagegencompletedevent.js +23 -0
- package/esm/models/imagegenerationrequest.d.ts +908 -0
- package/esm/models/imagegenerationrequest.js +266 -0
- package/esm/models/imagegenerationresponse.d.ts +34 -0
- package/esm/models/imagegenerationresponse.js +29 -0
- package/esm/models/imagegenerationservertool.d.ts +15 -15
- package/esm/models/imagegenerationservertool.js +15 -17
- package/esm/models/imagegenerationusage.d.ts +119 -0
- package/esm/models/imagegenerationusage.js +93 -0
- package/esm/models/imagegenpartialimageevent.d.ts +24 -0
- package/esm/models/imagegenpartialimageevent.js +22 -0
- package/esm/models/imagegenstreamerrorevent.d.ts +44 -0
- package/esm/models/imagegenstreamerrorevent.js +25 -0
- package/esm/models/imagemodelarchitecture.d.ts +19 -0
- package/esm/models/imagemodelarchitecture.js +23 -0
- package/esm/models/imagemodelendpointsresponse.d.ts +18 -0
- package/esm/models/imagemodelendpointsresponse.js +16 -0
- package/esm/models/imagemodellistitem.d.ts +42 -0
- package/esm/models/imagemodellistitem.js +29 -0
- package/esm/models/imagemodelslistresponse.d.ts +14 -0
- package/esm/models/imagemodelslistresponse.js +15 -0
- package/esm/models/imageoutputmodality.d.ts +16 -0
- package/esm/models/imageoutputmodality.js +18 -0
- package/esm/models/imagepricingentry.d.ts +35 -0
- package/esm/models/imagepricingentry.js +41 -0
- package/esm/models/imagestreamingresponse.d.ts +18 -0
- package/esm/models/imagestreamingresponse.js +43 -0
- package/esm/models/index.d.ts +97 -0
- package/esm/models/index.js +97 -0
- package/esm/models/inputreference.d.ts +18 -0
- package/esm/models/inputreference.js +18 -0
- package/esm/models/inputsunion.d.ts +7 -4
- package/esm/models/inputsunion.js +11 -2
- package/esm/models/legacywebsearchservertool.d.ts +2 -2
- package/esm/models/listpresetsresponse.d.ts +15 -0
- package/esm/models/listpresetsresponse.js +21 -0
- package/esm/models/listpresetversionsresponse.d.ts +15 -0
- package/esm/models/listpresetversionsresponse.js +21 -0
- package/esm/models/listworkspacebudgetsresponse.d.ts +14 -0
- package/esm/models/listworkspacebudgetsresponse.js +15 -0
- package/esm/models/messagesfallbackparam.d.ts +19 -0
- package/esm/models/messagesfallbackparam.js +22 -0
- package/esm/models/messagesrequest.d.ts +17 -10
- package/esm/models/messagesrequest.js +10 -5
- package/esm/models/model.d.ts +10 -0
- package/esm/models/model.js +4 -0
- package/esm/models/modelbenchmarks.d.ts +22 -0
- package/esm/models/modelbenchmarks.js +23 -0
- package/esm/models/modelreasoning.d.ts +49 -0
- package/esm/models/modelreasoning.js +42 -0
- package/esm/models/modelresponse.d.ts +17 -0
- package/esm/models/modelresponse.js +16 -0
- package/esm/models/observabilityarizedestination.d.ts +4 -1
- package/esm/models/observabilitybraintrustdestination.d.ts +1 -1
- package/esm/models/observabilityclickhousedestination.d.ts +1 -1
- package/esm/models/observabilitydatadogdestination.d.ts +1 -1
- package/esm/models/observabilitygrafanadestination.d.ts +1 -1
- package/esm/models/observabilitylangfusedestination.d.ts +1 -1
- package/esm/models/observabilitylangsmithdestination.d.ts +1 -1
- package/esm/models/observabilitynewrelicdestination.d.ts +1 -1
- package/esm/models/observabilityopikdestination.d.ts +1 -1
- package/esm/models/observabilityotelcollectordestination.d.ts +1 -1
- package/esm/models/observabilityposthogdestination.d.ts +1 -1
- package/esm/models/observabilityrampdestination.d.ts +1 -1
- package/esm/models/observabilitys3destination.d.ts +1 -1
- package/esm/models/observabilitysentrydestination.d.ts +1 -1
- package/esm/models/observabilitysnowflakedestination.d.ts +1 -1
- package/esm/models/observabilityweavedestination.d.ts +1 -1
- package/esm/models/observabilitywebhookdestination.d.ts +1 -1
- package/esm/models/openresponsesresult.d.ts +5 -0
- package/esm/models/openresponsesresult.js +3 -0
- package/esm/models/operations/createauthkeyscode.d.ts +6 -1
- package/esm/models/operations/createauthkeyscode.js +2 -0
- package/esm/models/operations/createembeddings.d.ts +19 -0
- package/esm/models/operations/createembeddings.js +20 -0
- package/esm/models/operations/createimages.d.ts +63 -0
- package/esm/models/operations/createimages.js +44 -0
- package/esm/models/operations/creatererank.d.ts +44 -10
- package/esm/models/operations/creatererank.js +21 -6
- package/esm/models/operations/createresponses.d.ts +3 -3
- package/esm/models/operations/createresponses.js +2 -3
- package/esm/models/operations/deletefile.d.ts +60 -0
- package/esm/models/operations/deletefile.js +24 -0
- package/esm/models/operations/deleteworkspacebudget.d.ts +64 -0
- package/esm/models/operations/deleteworkspacebudget.js +23 -0
- package/esm/models/operations/downloadfilecontent.d.ts +60 -0
- package/esm/models/operations/downloadfilecontent.js +24 -0
- package/esm/models/operations/getanalyticsmeta.d.ts +198 -0
- package/esm/models/operations/getanalyticsmeta.js +141 -0
- package/esm/models/operations/getapprankings.d.ts +152 -0
- package/esm/models/operations/getapprankings.js +85 -0
- package/esm/models/operations/getbenchmarks.d.ts +120 -0
- package/esm/models/operations/getbenchmarks.js +60 -0
- package/esm/models/operations/getfilemetadata.d.ts +60 -0
- package/esm/models/operations/getfilemetadata.js +24 -0
- package/esm/models/operations/getmodel.d.ts +63 -0
- package/esm/models/operations/getmodel.js +22 -0
- package/esm/models/operations/getmodels.d.ts +123 -5
- package/esm/models/operations/getmodels.js +61 -4
- package/esm/models/operations/getpreset.d.ts +58 -0
- package/esm/models/operations/getpreset.js +21 -0
- package/esm/models/operations/getpresetversion.d.ts +63 -0
- package/esm/models/operations/getpresetversion.js +22 -0
- package/esm/models/operations/gettaskclassifications.d.ts +71 -0
- package/esm/models/operations/gettaskclassifications.js +29 -0
- package/esm/models/operations/index.d.ts +21 -0
- package/esm/models/operations/index.js +21 -0
- package/esm/models/operations/listbyokkeys.d.ts +5 -1
- package/esm/models/operations/listbyokkeys.js +5 -1
- package/esm/models/operations/listfiles.d.ts +77 -0
- package/esm/models/operations/listfiles.js +37 -0
- package/esm/models/operations/listimagemodelendpoints.d.ts +63 -0
- package/esm/models/operations/listimagemodelendpoints.js +22 -0
- package/esm/models/operations/listimagemodels.d.ts +53 -0
- package/esm/models/operations/listimagemodels.js +20 -0
- package/esm/models/operations/listpresets.d.ts +72 -0
- package/esm/models/operations/listpresets.js +35 -0
- package/esm/models/operations/listpresetversions.d.ts +77 -0
- package/esm/models/operations/listpresetversions.js +36 -0
- package/esm/models/operations/listworkspacebudgets.d.ts +58 -0
- package/esm/models/operations/listworkspacebudgets.js +21 -0
- package/esm/models/operations/queryanalytics.d.ts +199 -0
- package/esm/models/operations/queryanalytics.js +130 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +3 -3
- package/esm/models/operations/sendchatcompletionrequest.js +2 -3
- package/esm/models/operations/uploadfile.d.ts +82 -0
- package/esm/models/operations/uploadfile.js +45 -0
- package/esm/models/operations/upsertworkspacebudget.d.ts +66 -0
- package/esm/models/operations/upsertworkspacebudget.js +25 -0
- package/esm/models/outputadvisorservertoolitem.d.ts +59 -0
- package/esm/models/outputadvisorservertoolitem.js +52 -0
- package/esm/models/outputfusionservertoolitem.d.ts +44 -43
- package/esm/models/outputfusionservertoolitem.js +49 -51
- package/esm/models/outputitems.d.ts +13 -3
- package/esm/models/outputitems.js +9 -1
- package/esm/models/outputshellcallitem.d.ts +29 -0
- package/esm/models/outputshellcallitem.js +38 -0
- package/esm/models/outputshellcalloutputitem.d.ts +48 -0
- package/esm/models/outputshellcalloutputitem.js +67 -0
- package/esm/models/outputsubagentservertoolitem.d.ts +59 -0
- package/esm/models/outputsubagentservertoolitem.js +54 -0
- package/esm/models/outputwebsearchcallitem.d.ts +2 -2
- package/esm/models/outputwebsearchcallitem.js +2 -2
- package/esm/models/preset.d.ts +27 -0
- package/esm/models/preset.js +35 -0
- package/esm/models/presetstatus.d.ts +17 -0
- package/esm/models/presetstatus.js +16 -0
- package/esm/models/presetwithdesignatedversion.d.ts +9 -14
- package/esm/models/presetwithdesignatedversion.js +4 -11
- package/esm/models/preview20250311websearchservertool.d.ts +2 -2
- package/esm/models/previewwebsearchservertool.d.ts +2 -2
- package/esm/models/promptinjectionscanscope.d.ts +18 -0
- package/esm/models/promptinjectionscanscope.js +17 -0
- package/esm/models/providername.d.ts +5 -1
- package/esm/models/providername.js +5 -1
- package/esm/models/provideroptions.d.ts +31 -1
- package/esm/models/provideroptions.js +7 -0
- package/esm/models/providerresponse.d.ts +6 -1
- package/esm/models/providerresponse.js +7 -2
- package/esm/models/rangecapability.d.ts +15 -0
- package/esm/models/rangecapability.js +16 -0
- package/esm/models/rankingsdailymeta.d.ts +4 -4
- package/esm/models/rankingsdailymeta.js +3 -3
- package/esm/models/reasoningeffort.d.ts +1 -0
- package/esm/models/reasoningeffort.js +1 -0
- package/esm/models/responsesrequest.d.ts +42 -8
- package/esm/models/responsesrequest.js +14 -0
- package/esm/models/searchqualitylevel.d.ts +2 -2
- package/esm/models/searchqualitylevel.js +1 -1
- package/esm/models/shellcallstatus.d.ts +17 -0
- package/esm/models/shellcallstatus.js +16 -0
- package/esm/models/shellservertoolconfig.d.ts +30 -0
- package/esm/models/shellservertoolconfig.js +22 -0
- package/esm/models/shellservertoolengine.d.ts +16 -0
- package/esm/models/shellservertoolengine.js +15 -0
- package/esm/models/shellservertoolenvironment.d.ts +13 -0
- package/esm/models/shellservertoolenvironment.js +16 -0
- package/esm/models/shellservertoolopenrouter.d.ts +21 -0
- package/esm/models/shellservertoolopenrouter.js +15 -0
- package/esm/models/speechrequest.d.ts +1 -1
- package/esm/models/streamevents.d.ts +11 -1
- package/esm/models/streamevents.js +20 -0
- package/esm/models/sttrequest.d.ts +1 -1
- package/esm/models/subagentnestedtool.d.ts +25 -0
- package/esm/models/subagentnestedtool.js +23 -0
- package/esm/models/subagentreasoning.d.ts +42 -0
- package/esm/models/subagentreasoning.js +34 -0
- package/esm/models/subagentservertoolconfig.d.ts +50 -0
- package/esm/models/subagentservertoolconfig.js +27 -0
- package/esm/models/subagentservertoolopenrouter.d.ts +28 -0
- package/esm/models/subagentservertoolopenrouter.js +20 -0
- package/esm/models/taskclassificationitem.d.ts +42 -0
- package/esm/models/taskclassificationitem.js +32 -0
- package/esm/models/taskclassificationmacrocategory.d.ts +25 -0
- package/esm/models/taskclassificationmacrocategory.js +23 -0
- package/esm/models/taskclassificationmodel.d.ts +21 -0
- package/esm/models/taskclassificationmodel.js +22 -0
- package/esm/models/taskclassificationresponse.d.ts +33 -0
- package/esm/models/taskclassificationresponse.js +33 -0
- package/esm/models/unifiedbenchmarkpricing.d.ts +20 -0
- package/esm/models/unifiedbenchmarkpricing.js +15 -0
- package/esm/models/unifiedbenchmarksaaitem.d.ts +38 -0
- package/esm/models/unifiedbenchmarksaaitem.js +30 -0
- package/esm/models/unifiedbenchmarksdaitem.d.ts +63 -0
- package/esm/models/unifiedbenchmarksdaitem.js +51 -0
- package/esm/models/unifiedbenchmarksmeta.d.ts +63 -0
- package/esm/models/unifiedbenchmarksmeta.js +46 -0
- package/esm/models/unifiedbenchmarksresponse.d.ts +19 -0
- package/esm/models/unifiedbenchmarksresponse.js +30 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +1 -1
- package/esm/models/upsertworkspacebudgetrequest.d.ts +15 -0
- package/esm/models/upsertworkspacebudgetrequest.js +18 -0
- package/esm/models/upsertworkspacebudgetresponse.d.ts +11 -0
- package/esm/models/upsertworkspacebudgetresponse.js +15 -0
- package/esm/models/urlcitation.d.ts +2 -0
- package/esm/models/urlcitation.js +2 -0
- package/esm/models/videogenerationrequest.d.ts +49 -19
- package/esm/models/videogenerationrequest.js +20 -13
- package/esm/models/websearchconfig.d.ts +10 -5
- package/esm/models/websearchconfig.js +2 -0
- package/esm/models/websearchengine.d.ts +1 -0
- package/esm/models/websearchengine.js +1 -0
- package/esm/models/websearchengineenum.d.ts +4 -3
- package/esm/models/websearchengineenum.js +3 -2
- package/esm/models/websearchservertool.d.ts +2 -2
- package/esm/models/websearchservertoolconfig.d.ts +10 -5
- package/esm/models/websearchservertoolconfig.js +2 -0
- package/esm/models/workspacebudget.d.ts +48 -0
- package/esm/models/workspacebudget.js +39 -0
- package/esm/models/workspacebudgetinterval.d.ts +18 -0
- package/esm/models/workspacebudgetinterval.js +17 -0
- package/esm/sdk/benchmarks.d.ts +13 -0
- package/esm/sdk/benchmarks.js +19 -0
- package/esm/sdk/beta.d.ts +3 -0
- package/esm/sdk/beta.js +4 -0
- package/esm/sdk/betaanalytics.d.ts +19 -0
- package/esm/sdk/betaanalytics.js +29 -0
- package/esm/sdk/classifications.d.ts +31 -0
- package/esm/sdk/classifications.js +37 -0
- package/esm/sdk/datasets.d.ts +32 -0
- package/esm/sdk/datasets.js +33 -0
- package/esm/sdk/files.d.ts +44 -0
- package/esm/sdk/files.js +60 -0
- package/esm/sdk/images.d.ts +38 -0
- package/esm/sdk/images.js +33 -0
- package/esm/sdk/models.d.ts +7 -0
- package/esm/sdk/models.js +10 -0
- package/esm/sdk/presets.d.ts +33 -0
- package/esm/sdk/presets.js +41 -0
- package/esm/sdk/sdk.d.ts +14 -2
- package/esm/sdk/sdk.js +19 -3
- package/esm/sdk/workspaces.d.ts +21 -0
- package/esm/sdk/workspaces.js +30 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4f128ace6b39
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { AnthropicSpeed$inboundSchema, } from "./anthropicspeed.js";
|
|
9
|
+
import { AnthropicUsageIteration$inboundSchema, } from "./anthropicusageiteration.js";
|
|
10
|
+
import { CostDetails$inboundSchema } from "./costdetails.js";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ImageGenerationUsageCompletionTokensDetails$inboundSchema = z.object({
|
|
13
|
+
audio_tokens: z.nullable(z.int()).optional(),
|
|
14
|
+
image_tokens: z.nullable(z.int()).optional(),
|
|
15
|
+
reasoning_tokens: z.nullable(z.int()).optional(),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
"audio_tokens": "audioTokens",
|
|
19
|
+
"image_tokens": "imageTokens",
|
|
20
|
+
"reasoning_tokens": "reasoningTokens",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function imageGenerationUsageCompletionTokensDetailsFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => ImageGenerationUsageCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationUsageCompletionTokensDetails' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ImageGenerationUsagePromptTokensDetails$inboundSchema = z.object({
|
|
28
|
+
audio_tokens: z.nullable(z.int()).optional(),
|
|
29
|
+
cache_write_tokens: z.nullable(z.int()).optional(),
|
|
30
|
+
cached_tokens: z.nullable(z.int()).optional(),
|
|
31
|
+
file_tokens: z.nullable(z.int()).optional(),
|
|
32
|
+
video_tokens: z.nullable(z.int()).optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"audio_tokens": "audioTokens",
|
|
36
|
+
"cache_write_tokens": "cacheWriteTokens",
|
|
37
|
+
"cached_tokens": "cachedTokens",
|
|
38
|
+
"file_tokens": "fileTokens",
|
|
39
|
+
"video_tokens": "videoTokens",
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
export function imageGenerationUsagePromptTokensDetailsFromJSON(jsonString) {
|
|
43
|
+
return safeParse(jsonString, (x) => ImageGenerationUsagePromptTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationUsagePromptTokensDetails' from JSON`);
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ServerToolUse$inboundSchema = z
|
|
47
|
+
.object({
|
|
48
|
+
tool_calls_executed: z.nullable(z.int()).optional(),
|
|
49
|
+
tool_calls_requested: z.nullable(z.int()).optional(),
|
|
50
|
+
web_search_requests: z.nullable(z.int()).optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"tool_calls_executed": "toolCallsExecuted",
|
|
54
|
+
"tool_calls_requested": "toolCallsRequested",
|
|
55
|
+
"web_search_requests": "webSearchRequests",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
export function serverToolUseFromJSON(jsonString) {
|
|
59
|
+
return safeParse(jsonString, (x) => ServerToolUse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServerToolUse' from JSON`);
|
|
60
|
+
}
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const ImageGenerationUsage$inboundSchema = z.object({
|
|
63
|
+
completion_tokens: z.int(),
|
|
64
|
+
completion_tokens_details: z.nullable(z.lazy(() => ImageGenerationUsageCompletionTokensDetails$inboundSchema)).optional(),
|
|
65
|
+
cost: z.nullable(z.number()).optional(),
|
|
66
|
+
cost_details: z.nullable(CostDetails$inboundSchema).optional(),
|
|
67
|
+
is_byok: z.boolean().optional(),
|
|
68
|
+
iterations: z.nullable(z.array(AnthropicUsageIteration$inboundSchema))
|
|
69
|
+
.optional(),
|
|
70
|
+
prompt_tokens: z.int(),
|
|
71
|
+
prompt_tokens_details: z.nullable(z.lazy(() => ImageGenerationUsagePromptTokensDetails$inboundSchema)).optional(),
|
|
72
|
+
server_tool_use: z.nullable(z.lazy(() => ServerToolUse$inboundSchema))
|
|
73
|
+
.optional(),
|
|
74
|
+
service_tier: z.nullable(z.string()).optional(),
|
|
75
|
+
speed: z.nullable(AnthropicSpeed$inboundSchema).optional(),
|
|
76
|
+
total_tokens: z.int(),
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
"completion_tokens": "completionTokens",
|
|
80
|
+
"completion_tokens_details": "completionTokensDetails",
|
|
81
|
+
"cost_details": "costDetails",
|
|
82
|
+
"is_byok": "isByok",
|
|
83
|
+
"prompt_tokens": "promptTokens",
|
|
84
|
+
"prompt_tokens_details": "promptTokensDetails",
|
|
85
|
+
"server_tool_use": "serverToolUse",
|
|
86
|
+
"service_tier": "serviceTier",
|
|
87
|
+
"total_tokens": "totalTokens",
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
export function imageGenerationUsageFromJSON(jsonString) {
|
|
91
|
+
return safeParse(jsonString, (x) => ImageGenerationUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationUsage' from JSON`);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=imagegenerationusage.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when a partial image becomes available during streaming generation
|
|
6
|
+
*/
|
|
7
|
+
export type ImageGenPartialImageEvent = {
|
|
8
|
+
/**
|
|
9
|
+
* Base64-encoded partial image data
|
|
10
|
+
*/
|
|
11
|
+
b64Json: string;
|
|
12
|
+
/**
|
|
13
|
+
* 0-based index indicating which partial image this is in the sequence
|
|
14
|
+
*/
|
|
15
|
+
partialImageIndex: number;
|
|
16
|
+
/**
|
|
17
|
+
* The event type
|
|
18
|
+
*/
|
|
19
|
+
type: "image_generation.partial_image";
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ImageGenPartialImageEvent$inboundSchema: z.ZodType<ImageGenPartialImageEvent, unknown>;
|
|
23
|
+
export declare function imageGenPartialImageEventFromJSON(jsonString: string): SafeParseResult<ImageGenPartialImageEvent, SDKValidationError>;
|
|
24
|
+
//# sourceMappingURL=imagegenpartialimageevent.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ee4283390600
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ImageGenPartialImageEvent$inboundSchema = z.object({
|
|
10
|
+
b64_json: z.string(),
|
|
11
|
+
partial_image_index: z.int(),
|
|
12
|
+
type: z.literal("image_generation.partial_image"),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
"b64_json": "b64Json",
|
|
16
|
+
"partial_image_index": "partialImageIndex",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function imageGenPartialImageEventFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => ImageGenPartialImageEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenPartialImageEvent' from JSON`);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=imagegenpartialimageevent.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Provider error details
|
|
6
|
+
*/
|
|
7
|
+
export type ImageGenStreamErrorEventError = {
|
|
8
|
+
/**
|
|
9
|
+
* Provider error code, when supplied
|
|
10
|
+
*/
|
|
11
|
+
code?: string | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Provider error message
|
|
14
|
+
*/
|
|
15
|
+
message: string;
|
|
16
|
+
/**
|
|
17
|
+
* Request parameter associated with the error, when supplied
|
|
18
|
+
*/
|
|
19
|
+
param?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Provider error type, when supplied
|
|
22
|
+
*/
|
|
23
|
+
type?: string | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Emitted when streaming generation fails after the SSE response starts
|
|
27
|
+
*/
|
|
28
|
+
export type ImageGenStreamErrorEvent = {
|
|
29
|
+
/**
|
|
30
|
+
* Provider error details
|
|
31
|
+
*/
|
|
32
|
+
error: ImageGenStreamErrorEventError;
|
|
33
|
+
/**
|
|
34
|
+
* The event type
|
|
35
|
+
*/
|
|
36
|
+
type: "error";
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const ImageGenStreamErrorEventError$inboundSchema: z.ZodType<ImageGenStreamErrorEventError, unknown>;
|
|
40
|
+
export declare function imageGenStreamErrorEventErrorFromJSON(jsonString: string): SafeParseResult<ImageGenStreamErrorEventError, SDKValidationError>;
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const ImageGenStreamErrorEvent$inboundSchema: z.ZodType<ImageGenStreamErrorEvent, unknown>;
|
|
43
|
+
export declare function imageGenStreamErrorEventFromJSON(jsonString: string): SafeParseResult<ImageGenStreamErrorEvent, SDKValidationError>;
|
|
44
|
+
//# sourceMappingURL=imagegenstreamerrorevent.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3ba1d6d94b96
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ImageGenStreamErrorEventError$inboundSchema = z.object({
|
|
9
|
+
code: z.nullable(z.string()).optional(),
|
|
10
|
+
message: z.string(),
|
|
11
|
+
param: z.nullable(z.string()).optional(),
|
|
12
|
+
type: z.nullable(z.string()).optional(),
|
|
13
|
+
});
|
|
14
|
+
export function imageGenStreamErrorEventErrorFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => ImageGenStreamErrorEventError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenStreamErrorEventError' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ImageGenStreamErrorEvent$inboundSchema = z.object({
|
|
19
|
+
error: z.lazy(() => ImageGenStreamErrorEventError$inboundSchema),
|
|
20
|
+
type: z.literal("error"),
|
|
21
|
+
});
|
|
22
|
+
export function imageGenStreamErrorEventFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => ImageGenStreamErrorEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenStreamErrorEvent' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=imagegenstreamerrorevent.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ImageOutputModality } from "./imageoutputmodality.js";
|
|
5
|
+
import { InputModality } from "./inputmodality.js";
|
|
6
|
+
export type ImageModelArchitecture = {
|
|
7
|
+
/**
|
|
8
|
+
* Supported input modalities
|
|
9
|
+
*/
|
|
10
|
+
inputModalities: Array<InputModality>;
|
|
11
|
+
/**
|
|
12
|
+
* Supported output modalities
|
|
13
|
+
*/
|
|
14
|
+
outputModalities: Array<ImageOutputModality>;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const ImageModelArchitecture$inboundSchema: z.ZodType<ImageModelArchitecture, unknown>;
|
|
18
|
+
export declare function imageModelArchitectureFromJSON(jsonString: string): SafeParseResult<ImageModelArchitecture, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=imagemodelarchitecture.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b316f2890f6c
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ImageOutputModality$inboundSchema, } from "./imageoutputmodality.js";
|
|
9
|
+
import { InputModality$inboundSchema } from "./inputmodality.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ImageModelArchitecture$inboundSchema = z.object({
|
|
12
|
+
input_modalities: z.array(InputModality$inboundSchema),
|
|
13
|
+
output_modalities: z.array(ImageOutputModality$inboundSchema),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"input_modalities": "inputModalities",
|
|
17
|
+
"output_modalities": "outputModalities",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function imageModelArchitectureFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => ImageModelArchitecture$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageModelArchitecture' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=imagemodelarchitecture.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ImageEndpoint } from "./imageendpoint.js";
|
|
5
|
+
/**
|
|
6
|
+
* The full per-endpoint records for an image model.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageModelEndpointsResponse = {
|
|
9
|
+
endpoints: Array<ImageEndpoint>;
|
|
10
|
+
/**
|
|
11
|
+
* Model slug
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ImageModelEndpointsResponse$inboundSchema: z.ZodType<ImageModelEndpointsResponse, unknown>;
|
|
17
|
+
export declare function imageModelEndpointsResponseFromJSON(jsonString: string): SafeParseResult<ImageModelEndpointsResponse, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=imagemodelendpointsresponse.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 77af9d23f8cb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ImageEndpoint$inboundSchema } from "./imageendpoint.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ImageModelEndpointsResponse$inboundSchema = z.object({
|
|
10
|
+
endpoints: z.array(ImageEndpoint$inboundSchema),
|
|
11
|
+
id: z.string(),
|
|
12
|
+
});
|
|
13
|
+
export function imageModelEndpointsResponseFromJSON(jsonString) {
|
|
14
|
+
return safeParse(jsonString, (x) => ImageModelEndpointsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageModelEndpointsResponse' from JSON`);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=imagemodelendpointsresponse.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { CapabilityDescriptor } from "./capabilitydescriptor.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { ImageModelArchitecture } from "./imagemodelarchitecture.js";
|
|
6
|
+
/**
|
|
7
|
+
* A single image model in the discovery listing.
|
|
8
|
+
*/
|
|
9
|
+
export type ImageModelListItem = {
|
|
10
|
+
architecture: ImageModelArchitecture;
|
|
11
|
+
/**
|
|
12
|
+
* Unix timestamp (seconds) of when the model was created
|
|
13
|
+
*/
|
|
14
|
+
created: number;
|
|
15
|
+
description: string;
|
|
16
|
+
/**
|
|
17
|
+
* Relative URL to the full per-endpoint records for this model
|
|
18
|
+
*/
|
|
19
|
+
endpoints: string;
|
|
20
|
+
/**
|
|
21
|
+
* Model slug
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Display name
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Union of supported parameters across every endpoint of this model. Coarse discovery aid; the definitive per-endpoint set is behind the endpoints URL.
|
|
30
|
+
*/
|
|
31
|
+
supportedParameters: {
|
|
32
|
+
[k: string]: CapabilityDescriptor;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*/
|
|
37
|
+
supportsStreaming: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const ImageModelListItem$inboundSchema: z.ZodType<ImageModelListItem, unknown>;
|
|
41
|
+
export declare function imageModelListItemFromJSON(jsonString: string): SafeParseResult<ImageModelListItem, SDKValidationError>;
|
|
42
|
+
//# sourceMappingURL=imagemodellistitem.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 12f1f7100366
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { CapabilityDescriptor$inboundSchema, } from "./capabilitydescriptor.js";
|
|
9
|
+
import { ImageModelArchitecture$inboundSchema, } from "./imagemodelarchitecture.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ImageModelListItem$inboundSchema = z.object({
|
|
12
|
+
architecture: ImageModelArchitecture$inboundSchema,
|
|
13
|
+
created: z.int(),
|
|
14
|
+
description: z.string(),
|
|
15
|
+
endpoints: z.string(),
|
|
16
|
+
id: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
supported_parameters: z.record(z.string(), CapabilityDescriptor$inboundSchema),
|
|
19
|
+
supports_streaming: z.boolean(),
|
|
20
|
+
}).transform((v) => {
|
|
21
|
+
return remap$(v, {
|
|
22
|
+
"supported_parameters": "supportedParameters",
|
|
23
|
+
"supports_streaming": "supportsStreaming",
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export function imageModelListItemFromJSON(jsonString) {
|
|
27
|
+
return safeParse(jsonString, (x) => ImageModelListItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageModelListItem' from JSON`);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=imagemodellistitem.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ImageModelListItem } from "./imagemodellistitem.js";
|
|
5
|
+
/**
|
|
6
|
+
* List of image generation models.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageModelsListResponse = {
|
|
9
|
+
data: Array<ImageModelListItem>;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const ImageModelsListResponse$inboundSchema: z.ZodType<ImageModelsListResponse, unknown>;
|
|
13
|
+
export declare function imageModelsListResponseFromJSON(jsonString: string): SafeParseResult<ImageModelsListResponse, SDKValidationError>;
|
|
14
|
+
//# sourceMappingURL=imagemodelslistresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 635379f06ace
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ImageModelListItem$inboundSchema, } from "./imagemodellistitem.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ImageModelsListResponse$inboundSchema = z.object({
|
|
10
|
+
data: z.array(ImageModelListItem$inboundSchema),
|
|
11
|
+
});
|
|
12
|
+
export function imageModelsListResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => ImageModelsListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageModelsListResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=imagemodelslistresponse.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const ImageOutputModality: {
|
|
4
|
+
readonly Text: "text";
|
|
5
|
+
readonly Image: "image";
|
|
6
|
+
readonly Embeddings: "embeddings";
|
|
7
|
+
readonly Audio: "audio";
|
|
8
|
+
readonly Video: "video";
|
|
9
|
+
readonly Rerank: "rerank";
|
|
10
|
+
readonly Speech: "speech";
|
|
11
|
+
readonly Transcription: "transcription";
|
|
12
|
+
};
|
|
13
|
+
export type ImageOutputModality = OpenEnum<typeof ImageOutputModality>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ImageOutputModality$inboundSchema: z.ZodType<ImageOutputModality, unknown>;
|
|
16
|
+
//# sourceMappingURL=imageoutputmodality.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7af79a028664
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
export const ImageOutputModality = {
|
|
7
|
+
Text: "text",
|
|
8
|
+
Image: "image",
|
|
9
|
+
Embeddings: "embeddings",
|
|
10
|
+
Audio: "audio",
|
|
11
|
+
Video: "video",
|
|
12
|
+
Rerank: "rerank",
|
|
13
|
+
Speech: "speech",
|
|
14
|
+
Transcription: "transcription",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ImageOutputModality$inboundSchema = openEnums.inboundSchema(ImageOutputModality);
|
|
18
|
+
//# sourceMappingURL=imageoutputmodality.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const Billable: {
|
|
6
|
+
readonly OutputImage: "output_image";
|
|
7
|
+
readonly InputImage: "input_image";
|
|
8
|
+
readonly InputFont: "input_font";
|
|
9
|
+
readonly InputReference: "input_reference";
|
|
10
|
+
readonly InputText: "input_text";
|
|
11
|
+
};
|
|
12
|
+
export type Billable = OpenEnum<typeof Billable>;
|
|
13
|
+
export declare const Unit: {
|
|
14
|
+
readonly Image: "image";
|
|
15
|
+
readonly Megapixel: "megapixel";
|
|
16
|
+
readonly Token: "token";
|
|
17
|
+
};
|
|
18
|
+
export type Unit = OpenEnum<typeof Unit>;
|
|
19
|
+
/**
|
|
20
|
+
* One billable pricing line for an image provider.
|
|
21
|
+
*/
|
|
22
|
+
export type ImagePricingEntry = {
|
|
23
|
+
billable: Billable;
|
|
24
|
+
costUsd: number;
|
|
25
|
+
unit: Unit;
|
|
26
|
+
variant?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const Billable$inboundSchema: z.ZodType<Billable, unknown>;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const Unit$inboundSchema: z.ZodType<Unit, unknown>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ImagePricingEntry$inboundSchema: z.ZodType<ImagePricingEntry, unknown>;
|
|
34
|
+
export declare function imagePricingEntryFromJSON(jsonString: string): SafeParseResult<ImagePricingEntry, SDKValidationError>;
|
|
35
|
+
//# sourceMappingURL=imagepricingentry.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7a0d3f05b12c
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const Billable = {
|
|
10
|
+
OutputImage: "output_image",
|
|
11
|
+
InputImage: "input_image",
|
|
12
|
+
InputFont: "input_font",
|
|
13
|
+
InputReference: "input_reference",
|
|
14
|
+
InputText: "input_text",
|
|
15
|
+
};
|
|
16
|
+
export const Unit = {
|
|
17
|
+
Image: "image",
|
|
18
|
+
Megapixel: "megapixel",
|
|
19
|
+
Token: "token",
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const Billable$inboundSchema = openEnums
|
|
23
|
+
.inboundSchema(Billable);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const Unit$inboundSchema = openEnums
|
|
26
|
+
.inboundSchema(Unit);
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ImagePricingEntry$inboundSchema = z.object({
|
|
29
|
+
billable: Billable$inboundSchema,
|
|
30
|
+
cost_usd: z.number(),
|
|
31
|
+
unit: Unit$inboundSchema,
|
|
32
|
+
variant: z.string().optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"cost_usd": "costUsd",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
export function imagePricingEntryFromJSON(jsonString) {
|
|
39
|
+
return safeParse(jsonString, (x) => ImagePricingEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImagePricingEntry' from JSON`);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=imagepricingentry.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { ImageGenCompletedEvent } from "./imagegencompletedevent.js";
|
|
6
|
+
import { ImageGenPartialImageEvent } from "./imagegenpartialimageevent.js";
|
|
7
|
+
import { ImageGenStreamErrorEvent } from "./imagegenstreamerrorevent.js";
|
|
8
|
+
export type ImageStreamingResponseData = ImageGenPartialImageEvent | ImageGenCompletedEvent | ImageGenStreamErrorEvent | discriminatedUnionTypes.Unknown<"type">;
|
|
9
|
+
export type ImageStreamingResponse = {
|
|
10
|
+
data: ImageGenPartialImageEvent | ImageGenCompletedEvent | ImageGenStreamErrorEvent | discriminatedUnionTypes.Unknown<"type">;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ImageStreamingResponseData$inboundSchema: z.ZodType<ImageStreamingResponseData, unknown>;
|
|
14
|
+
export declare function imageStreamingResponseDataFromJSON(jsonString: string): SafeParseResult<ImageStreamingResponseData, SDKValidationError>;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ImageStreamingResponse$inboundSchema: z.ZodType<ImageStreamingResponse, unknown>;
|
|
17
|
+
export declare function imageStreamingResponseFromJSON(jsonString: string): SafeParseResult<ImageStreamingResponse, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=imagestreamingresponse.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 845661ccae1f
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
|
+
import { ImageGenCompletedEvent$inboundSchema, } from "./imagegencompletedevent.js";
|
|
9
|
+
import { ImageGenPartialImageEvent$inboundSchema, } from "./imagegenpartialimageevent.js";
|
|
10
|
+
import { ImageGenStreamErrorEvent$inboundSchema, } from "./imagegenstreamerrorevent.js";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ImageStreamingResponseData$inboundSchema = discriminatedUnion("type", {
|
|
13
|
+
["image_generation.partial_image"]: ImageGenPartialImageEvent$inboundSchema,
|
|
14
|
+
["image_generation.completed"]: ImageGenCompletedEvent$inboundSchema,
|
|
15
|
+
error: ImageGenStreamErrorEvent$inboundSchema,
|
|
16
|
+
});
|
|
17
|
+
export function imageStreamingResponseDataFromJSON(jsonString) {
|
|
18
|
+
return safeParse(jsonString, (x) => ImageStreamingResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageStreamingResponseData' from JSON`);
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ImageStreamingResponse$inboundSchema = z.object({
|
|
22
|
+
data: z.string().transform((v, ctx) => {
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(v);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
ctx.addIssue({
|
|
28
|
+
input: v,
|
|
29
|
+
code: "custom",
|
|
30
|
+
message: `malformed json: ${err}`,
|
|
31
|
+
});
|
|
32
|
+
return z.NEVER;
|
|
33
|
+
}
|
|
34
|
+
}).pipe(discriminatedUnion("type", {
|
|
35
|
+
["image_generation.partial_image"]: ImageGenPartialImageEvent$inboundSchema,
|
|
36
|
+
["image_generation.completed"]: ImageGenCompletedEvent$inboundSchema,
|
|
37
|
+
error: ImageGenStreamErrorEvent$inboundSchema,
|
|
38
|
+
})),
|
|
39
|
+
});
|
|
40
|
+
export function imageStreamingResponseFromJSON(jsonString) {
|
|
41
|
+
return safeParse(jsonString, (x) => ImageStreamingResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageStreamingResponse' from JSON`);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=imagestreamingresponse.js.map
|