@openrouter/sdk 0.0.0-beta.0
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/.devcontainer/README.md +30 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +89 -0
- package/REACT_QUERY.md +302 -0
- package/README.md +502 -0
- package/RUNTIMES.md +48 -0
- package/dist/commonjs/core.d.ts +10 -0
- package/dist/commonjs/core.d.ts.map +1 -0
- package/dist/commonjs/core.js +17 -0
- package/dist/commonjs/core.js.map +1 -0
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts +17 -0
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts.map +1 -0
- package/dist/commonjs/funcs/analyticsGetActivity.js +116 -0
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +115 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts +17 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +103 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts +17 -0
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKey.js +103 -0
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.js +114 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +115 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +116 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.js +112 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -0
- package/dist/commonjs/funcs/chatSend.d.ts +25 -0
- package/dist/commonjs/funcs/chatSend.d.ts.map +1 -0
- package/dist/commonjs/funcs/chatSend.js +127 -0
- package/dist/commonjs/funcs/chatSend.js.map +1 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts +17 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js +115 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts +14 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +100 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +14 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +120 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts +14 -0
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts.map +1 -0
- package/dist/commonjs/funcs/generationsGetGeneration.js +113 -0
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -0
- package/dist/commonjs/funcs/getCredits.d.ts +14 -0
- package/dist/commonjs/funcs/getCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/getCredits.js +100 -0
- package/dist/commonjs/funcs/getCredits.js.map +1 -0
- package/dist/commonjs/funcs/getProviders.d.ts +12 -0
- package/dist/commonjs/funcs/getProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/getProviders.js +101 -0
- package/dist/commonjs/funcs/getProviders.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts +20 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.js +125 -0
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts +14 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.js +100 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +14 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.js +100 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts +14 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js +123 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts +14 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.js +112 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts +25 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
- package/dist/commonjs/hooks/hooks.js +86 -0
- package/dist/commonjs/hooks/hooks.js.map +1 -0
- package/dist/commonjs/hooks/index.d.ts +3 -0
- package/dist/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts +3 -0
- package/dist/commonjs/hooks/registration.d.ts.map +1 -0
- package/dist/commonjs/hooks/registration.js +15 -0
- package/dist/commonjs/hooks/registration.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +76 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -0
- package/dist/commonjs/hooks/types.js +6 -0
- package/dist/commonjs/hooks/types.js.map +1 -0
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +48 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/base64.d.ts +10 -0
- package/dist/commonjs/lib/base64.d.ts.map +1 -0
- package/dist/commonjs/lib/base64.js +71 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +48 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +36 -0
- package/dist/commonjs/lib/config.js.map +1 -0
- package/dist/commonjs/lib/dlv.d.ts +14 -0
- package/dist/commonjs/lib/dlv.d.ts.map +1 -0
- package/dist/commonjs/lib/dlv.js +49 -0
- package/dist/commonjs/lib/dlv.js.map +1 -0
- package/dist/commonjs/lib/encodings.d.ts +52 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +368 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +16 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +66 -0
- package/dist/commonjs/lib/env.js.map +1 -0
- package/dist/commonjs/lib/event-streams.d.ts +11 -0
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
- package/dist/commonjs/lib/event-streams.js +129 -0
- package/dist/commonjs/lib/event-streams.js.map +1 -0
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -0
- package/dist/commonjs/lib/files.js +77 -0
- package/dist/commonjs/lib/files.js.map +1 -0
- package/dist/commonjs/lib/http.d.ts +67 -0
- package/dist/commonjs/lib/http.d.ts.map +1 -0
- package/dist/commonjs/lib/http.js +217 -0
- package/dist/commonjs/lib/http.js.map +1 -0
- package/dist/commonjs/lib/is-plain-object.d.ts +2 -0
- package/dist/commonjs/lib/is-plain-object.d.ts.map +1 -0
- package/dist/commonjs/lib/is-plain-object.js +41 -0
- package/dist/commonjs/lib/is-plain-object.js.map +1 -0
- package/dist/commonjs/lib/logger.d.ts +6 -0
- package/dist/commonjs/lib/logger.d.ts.map +1 -0
- package/dist/commonjs/lib/logger.js +6 -0
- package/dist/commonjs/lib/logger.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts +59 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -0
- package/dist/commonjs/lib/matchers.js +222 -0
- package/dist/commonjs/lib/matchers.js.map +1 -0
- package/dist/commonjs/lib/primitives.d.ts +26 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -0
- package/dist/commonjs/lib/primitives.js +111 -0
- package/dist/commonjs/lib/primitives.js.map +1 -0
- package/dist/commonjs/lib/retries.d.ts +38 -0
- package/dist/commonjs/lib/retries.d.ts.map +1 -0
- package/dist/commonjs/lib/retries.js +153 -0
- package/dist/commonjs/lib/retries.js.map +1 -0
- package/dist/commonjs/lib/schemas.d.ts +19 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +62 -0
- package/dist/commonjs/lib/schemas.js.map +1 -0
- package/dist/commonjs/lib/sdks.d.ts +63 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -0
- package/dist/commonjs/lib/sdks.js +273 -0
- package/dist/commonjs/lib/sdks.js.map +1 -0
- package/dist/commonjs/lib/security.d.ts +83 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +150 -0
- package/dist/commonjs/lib/security.js.map +1 -0
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -0
- package/dist/commonjs/lib/url.js +25 -0
- package/dist/commonjs/lib/url.js.map +1 -0
- package/dist/commonjs/models/activityitem.d.ts +82 -0
- package/dist/commonjs/models/activityitem.d.ts.map +1 -0
- package/dist/commonjs/models/activityitem.js +110 -0
- package/dist/commonjs/models/activityitem.js.map +1 -0
- package/dist/commonjs/models/assistantmessage.d.ts +62 -0
- package/dist/commonjs/models/assistantmessage.d.ts.map +1 -0
- package/dist/commonjs/models/assistantmessage.js +113 -0
- package/dist/commonjs/models/assistantmessage.js.map +1 -0
- package/dist/commonjs/models/chaterror.d.ts +35 -0
- package/dist/commonjs/models/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/chaterror.js +75 -0
- package/dist/commonjs/models/chaterror.js.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts +403 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.js +492 -0
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -0
- package/dist/commonjs/models/chatgenerationtokenusage.d.ts +95 -0
- package/dist/commonjs/models/chatgenerationtokenusage.d.ts.map +1 -0
- package/dist/commonjs/models/chatgenerationtokenusage.js +184 -0
- package/dist/commonjs/models/chatgenerationtokenusage.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitem.d.ts +40 -0
- package/dist/commonjs/models/chatmessagecontentitem.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitem.js +84 -0
- package/dist/commonjs/models/chatmessagecontentitem.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts +99 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.js +134 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts +87 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.js +130 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.d.ts +31 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.js +71 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.js.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.d.ts +64 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.js +115 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.js.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.js +72 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.js.map +1 -0
- package/dist/commonjs/models/chatmessagetoolcall.d.ts +60 -0
- package/dist/commonjs/models/chatmessagetoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetoolcall.js +102 -0
- package/dist/commonjs/models/chatmessagetoolcall.js.map +1 -0
- package/dist/commonjs/models/chatresponse.d.ts +43 -0
- package/dist/commonjs/models/chatresponse.d.ts.map +1 -0
- package/dist/commonjs/models/chatresponse.js +92 -0
- package/dist/commonjs/models/chatresponse.js.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts +72 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.js +108 -0
- package/dist/commonjs/models/chatresponsechoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts +72 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingchoice.js +108 -0
- package/dist/commonjs/models/chatstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.js +105 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js +106 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js +164 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/chatstreamoptions.d.ts +29 -0
- package/dist/commonjs/models/chatstreamoptions.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamoptions.js +78 -0
- package/dist/commonjs/models/chatstreamoptions.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +297 -0
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errorresponse.js +198 -0
- package/dist/commonjs/models/errorresponse.js.map +1 -0
- package/dist/commonjs/models/errors/chaterror.d.ts +37 -0
- package/dist/commonjs/models/errors/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/chaterror.js +85 -0
- package/dist/commonjs/models/errors/chaterror.js.map +1 -0
- package/dist/commonjs/models/errors/getproviders.d.ts +49 -0
- package/dist/commonjs/models/errors/getproviders.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getproviders.js +88 -0
- package/dist/commonjs/models/errors/getproviders.js.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.js +78 -0
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +8 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +27 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.js +34 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.js.map +1 -0
- package/dist/commonjs/models/errors/openroutererror.d.ts +19 -0
- package/dist/commonjs/models/errors/openroutererror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/openroutererror.js +20 -0
- package/dist/commonjs/models/errors/openroutererror.js.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js +66 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js +129 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +28 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +47 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/message.d.ts +80 -0
- package/dist/commonjs/models/message.d.ts.map +1 -0
- package/dist/commonjs/models/message.js +142 -0
- package/dist/commonjs/models/message.js.map +1 -0
- package/dist/commonjs/models/namedtoolchoice.d.ts +56 -0
- package/dist/commonjs/models/namedtoolchoice.d.ts.map +1 -0
- package/dist/commonjs/models/namedtoolchoice.js +98 -0
- package/dist/commonjs/models/namedtoolchoice.js.map +1 -0
- package/dist/commonjs/models/operations/deletekeyshash.d.ts +82 -0
- package/dist/commonjs/models/operations/deletekeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletekeyshash.js +126 -0
- package/dist/commonjs/models/operations/deletekeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/getactivity.d.ts +82 -0
- package/dist/commonjs/models/operations/getactivity.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getactivity.js +126 -0
- package/dist/commonjs/models/operations/getactivity.js.map +1 -0
- package/dist/commonjs/models/operations/getauthkey.d.ts +163 -0
- package/dist/commonjs/models/operations/getauthkey.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getauthkey.js +184 -0
- package/dist/commonjs/models/operations/getauthkey.js.map +1 -0
- package/dist/commonjs/models/operations/getcredits.d.ts +81 -0
- package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getcredits.js +139 -0
- package/dist/commonjs/models/operations/getcredits.js.map +1 -0
- package/dist/commonjs/models/operations/getendpointszdr.d.ts +815 -0
- package/dist/commonjs/models/operations/getendpointszdr.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getendpointszdr.js +681 -0
- package/dist/commonjs/models/operations/getendpointszdr.js.map +1 -0
- package/dist/commonjs/models/operations/getgeneration.d.ts +295 -0
- package/dist/commonjs/models/operations/getgeneration.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getgeneration.js +291 -0
- package/dist/commonjs/models/operations/getgeneration.js.map +1 -0
- package/dist/commonjs/models/operations/getkey.d.ts +163 -0
- package/dist/commonjs/models/operations/getkey.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkey.js +184 -0
- package/dist/commonjs/models/operations/getkey.js.map +1 -0
- package/dist/commonjs/models/operations/getkeys.d.ts +147 -0
- package/dist/commonjs/models/operations/getkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkeys.js +188 -0
- package/dist/commonjs/models/operations/getkeys.js.map +1 -0
- package/dist/commonjs/models/operations/getkeyshash.d.ts +148 -0
- package/dist/commonjs/models/operations/getkeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkeyshash.js +178 -0
- package/dist/commonjs/models/operations/getkeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/getmodels.d.ts +901 -0
- package/dist/commonjs/models/operations/getmodels.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodels.js +826 -0
- package/dist/commonjs/models/operations/getmodels.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts +1178 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js +922 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelscount.d.ts +88 -0
- package/dist/commonjs/models/operations/getmodelscount.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelscount.js +126 -0
- package/dist/commonjs/models/operations/getmodelscount.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +870 -0
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelsuser.js +779 -0
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +419 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.js +289 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -0
- package/dist/commonjs/models/operations/getproviders.d.ts +116 -0
- package/dist/commonjs/models/operations/getproviders.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getproviders.js +147 -0
- package/dist/commonjs/models/operations/getproviders.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +21 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -0
- package/dist/commonjs/models/operations/index.js +40 -0
- package/dist/commonjs/models/operations/index.js.map +1 -0
- package/dist/commonjs/models/operations/patchkeyshash.d.ts +193 -0
- package/dist/commonjs/models/operations/patchkeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/patchkeyshash.js +229 -0
- package/dist/commonjs/models/operations/patchkeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts +27 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.js +80 -0
- package/dist/commonjs/models/operations/postchatcompletions.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +267 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.js +377 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -0
- package/dist/commonjs/models/operations/postembeddings.d.ts +1497 -0
- package/dist/commonjs/models/operations/postembeddings.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postembeddings.js +1064 -0
- package/dist/commonjs/models/operations/postembeddings.js.map +1 -0
- package/dist/commonjs/models/operations/postkeys.d.ts +166 -0
- package/dist/commonjs/models/operations/postkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postkeys.js +192 -0
- package/dist/commonjs/models/operations/postkeys.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +31 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +71 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/models/systemmessage.d.ts +55 -0
- package/dist/commonjs/models/systemmessage.d.ts.map +1 -0
- package/dist/commonjs/models/systemmessage.js +103 -0
- package/dist/commonjs/models/systemmessage.js.map +1 -0
- package/dist/commonjs/models/tool.d.ts +66 -0
- package/dist/commonjs/models/tool.d.ts.map +1 -0
- package/dist/commonjs/models/tool.js +105 -0
- package/dist/commonjs/models/tool.js.map +1 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts +55 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/commonjs/models/toolresponsemessage.js +109 -0
- package/dist/commonjs/models/toolresponsemessage.js.map +1 -0
- package/dist/commonjs/models/usermessage.d.ts +55 -0
- package/dist/commonjs/models/usermessage.d.ts.map +1 -0
- package/dist/commonjs/models/usermessage.js +100 -0
- package/dist/commonjs/models/usermessage.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/react-query/_context.d.ts +8 -0
- package/dist/commonjs/react-query/_context.d.ts.map +1 -0
- package/dist/commonjs/react-query/_context.js +21 -0
- package/dist/commonjs/react-query/_context.js.map +1 -0
- package/dist/commonjs/react-query/_types.d.ts +27 -0
- package/dist/commonjs/react-query/_types.d.ts.map +1 -0
- package/dist/commonjs/react-query/_types.js +6 -0
- package/dist/commonjs/react-query/_types.js.map +1 -0
- package/dist/commonjs/react-query/analyticsGetActivity.d.ts +36 -0
- package/dist/commonjs/react-query/analyticsGetActivity.d.ts.map +1 -0
- package/dist/commonjs/react-query/analyticsGetActivity.js +82 -0
- package/dist/commonjs/react-query/analyticsGetActivity.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.js +44 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.d.ts +29 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.js +75 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKey.d.ts +29 -0
- package/dist/commonjs/react-query/apiKeysGetKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKey.js +75 -0
- package/dist/commonjs/react-query/apiKeysGetKey.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.d.ts +37 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.js +79 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.d.ts +24 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.js +76 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.js +44 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.js +44 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.js.map +1 -0
- package/dist/commonjs/react-query/chatSend.d.ts +28 -0
- package/dist/commonjs/react-query/chatSend.d.ts.map +1 -0
- package/dist/commonjs/react-query/chatSend.js +50 -0
- package/dist/commonjs/react-query/chatSend.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js +47 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.d.ts +23 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.js +69 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts +24 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.js +87 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/commonjs/react-query/generationsGetGeneration.d.ts +30 -0
- package/dist/commonjs/react-query/generationsGetGeneration.d.ts.map +1 -0
- package/dist/commonjs/react-query/generationsGetGeneration.js +81 -0
- package/dist/commonjs/react-query/generationsGetGeneration.js.map +1 -0
- package/dist/commonjs/react-query/getCredits.d.ts +23 -0
- package/dist/commonjs/react-query/getCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/getCredits.js +69 -0
- package/dist/commonjs/react-query/getCredits.js.map +1 -0
- package/dist/commonjs/react-query/getProviders.d.ts +17 -0
- package/dist/commonjs/react-query/getProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/getProviders.js +63 -0
- package/dist/commonjs/react-query/getProviders.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +23 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -0
- package/dist/commonjs/react-query/index.js +45 -0
- package/dist/commonjs/react-query/index.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModels.d.ts +47 -0
- package/dist/commonjs/react-query/modelsGetModels.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModels.js +84 -0
- package/dist/commonjs/react-query/modelsGetModels.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.d.ts +23 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.js +69 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +23 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.js +69 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +20 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/sdk/analytics.d.ts +12 -0
- package/dist/commonjs/sdk/analytics.d.ts.map +1 -0
- package/dist/commonjs/sdk/analytics.js +22 -0
- package/dist/commonjs/sdk/analytics.js.map +1 -0
- package/dist/commonjs/sdk/apikeys.d.ts +39 -0
- package/dist/commonjs/sdk/apikeys.d.ts.map +1 -0
- package/dist/commonjs/sdk/apikeys.js +67 -0
- package/dist/commonjs/sdk/apikeys.js.map +1 -0
- package/dist/commonjs/sdk/chat.d.ts +17 -0
- package/dist/commonjs/sdk/chat.d.ts.map +1 -0
- package/dist/commonjs/sdk/chat.js +24 -0
- package/dist/commonjs/sdk/chat.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +12 -0
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -0
- package/dist/commonjs/sdk/embeddings.js +22 -0
- package/dist/commonjs/sdk/embeddings.js.map +1 -0
- package/dist/commonjs/sdk/endpoints.d.ts +13 -0
- package/dist/commonjs/sdk/endpoints.d.ts.map +1 -0
- package/dist/commonjs/sdk/endpoints.js +26 -0
- package/dist/commonjs/sdk/endpoints.js.map +1 -0
- package/dist/commonjs/sdk/generations.d.ts +9 -0
- package/dist/commonjs/sdk/generations.d.ts.map +1 -0
- package/dist/commonjs/sdk/generations.js +19 -0
- package/dist/commonjs/sdk/generations.js.map +1 -0
- package/dist/commonjs/sdk/index.d.ts +2 -0
- package/dist/commonjs/sdk/index.d.ts.map +1 -0
- package/dist/commonjs/sdk/index.js +21 -0
- package/dist/commonjs/sdk/index.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +21 -0
- package/dist/commonjs/sdk/models.d.ts.map +1 -0
- package/dist/commonjs/sdk/models.js +35 -0
- package/dist/commonjs/sdk/models.js.map +1 -0
- package/dist/commonjs/sdk/parameters.d.ts +9 -0
- package/dist/commonjs/sdk/parameters.d.ts.map +1 -0
- package/dist/commonjs/sdk/parameters.js +19 -0
- package/dist/commonjs/sdk/parameters.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +38 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +62 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -0
- package/dist/commonjs/types/async.d.ts +23 -0
- package/dist/commonjs/types/async.d.ts.map +1 -0
- package/dist/commonjs/types/async.js +44 -0
- package/dist/commonjs/types/async.js.map +1 -0
- package/dist/commonjs/types/blobs.d.ts +4 -0
- package/dist/commonjs/types/blobs.d.ts.map +1 -0
- package/dist/commonjs/types/blobs.js +62 -0
- package/dist/commonjs/types/blobs.js.map +1 -0
- package/dist/commonjs/types/constdatetime.d.ts +3 -0
- package/dist/commonjs/types/constdatetime.d.ts.map +1 -0
- package/dist/commonjs/types/constdatetime.js +46 -0
- package/dist/commonjs/types/constdatetime.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +12 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +10 -0
- package/dist/commonjs/types/enums.js.map +1 -0
- package/dist/commonjs/types/fp.d.ts +31 -0
- package/dist/commonjs/types/fp.d.ts.map +1 -0
- package/dist/commonjs/types/fp.js +37 -0
- package/dist/commonjs/types/fp.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +8 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/types/operations.d.ts +27 -0
- package/dist/commonjs/types/operations.d.ts.map +1 -0
- package/dist/commonjs/types/operations.js +83 -0
- package/dist/commonjs/types/operations.js.map +1 -0
- package/dist/commonjs/types/rfcdate.d.ts +21 -0
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
- package/dist/commonjs/types/rfcdate.js +46 -0
- package/dist/commonjs/types/rfcdate.js.map +1 -0
- package/dist/commonjs/types/streams.d.ts +2 -0
- package/dist/commonjs/types/streams.d.ts.map +1 -0
- package/dist/commonjs/types/streams.js +18 -0
- package/dist/commonjs/types/streams.js.map +1 -0
- package/dist/esm/core.d.ts +10 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +13 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/funcs/analyticsGetActivity.d.ts +17 -0
- package/dist/esm/funcs/analyticsGetActivity.d.ts.map +1 -0
- package/dist/esm/funcs/analyticsGetActivity.js +80 -0
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +79 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts +17 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.js +67 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKey.d.ts +17 -0
- package/dist/esm/funcs/apiKeysGetKey.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKey.js +67 -0
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeys.d.ts +14 -0
- package/dist/esm/funcs/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeys.js +78 -0
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.js +79 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +80 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysPostKeys.d.ts +14 -0
- package/dist/esm/funcs/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysPostKeys.js +76 -0
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -0
- package/dist/esm/funcs/chatSend.d.ts +25 -0
- package/dist/esm/funcs/chatSend.d.ts.map +1 -0
- package/dist/esm/funcs/chatSend.js +90 -0
- package/dist/esm/funcs/chatSend.js.map +1 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts +17 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.js +79 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts +14 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +64 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +14 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +84 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/esm/funcs/generationsGetGeneration.d.ts +14 -0
- package/dist/esm/funcs/generationsGetGeneration.d.ts.map +1 -0
- package/dist/esm/funcs/generationsGetGeneration.js +77 -0
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -0
- package/dist/esm/funcs/getCredits.d.ts +14 -0
- package/dist/esm/funcs/getCredits.d.ts.map +1 -0
- package/dist/esm/funcs/getCredits.js +64 -0
- package/dist/esm/funcs/getCredits.js.map +1 -0
- package/dist/esm/funcs/getProviders.d.ts +12 -0
- package/dist/esm/funcs/getProviders.d.ts.map +1 -0
- package/dist/esm/funcs/getProviders.js +65 -0
- package/dist/esm/funcs/getProviders.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.d.ts +20 -0
- package/dist/esm/funcs/modelsGetModels.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModels.js +88 -0
- package/dist/esm/funcs/modelsGetModels.js.map +1 -0
- package/dist/esm/funcs/modelsGetModelsCount.d.ts +14 -0
- package/dist/esm/funcs/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModelsCount.js +64 -0
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -0
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +14 -0
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModelsUser.js +64 -0
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts +14 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js +87 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/postCreditsCoinbase.d.ts +14 -0
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/postCreditsCoinbase.js +76 -0
- package/dist/esm/funcs/postCreditsCoinbase.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts +25 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -0
- package/dist/esm/hooks/hooks.js +82 -0
- package/dist/esm/hooks/hooks.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts +3 -0
- package/dist/esm/hooks/registration.d.ts.map +1 -0
- package/dist/esm/hooks/registration.js +12 -0
- package/dist/esm/hooks/registration.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +76 -0
- package/dist/esm/hooks/types.d.ts.map +1 -0
- package/dist/esm/hooks/types.js +5 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/base64.d.ts +10 -0
- package/dist/esm/lib/base64.d.ts.map +1 -0
- package/dist/esm/lib/base64.js +29 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +48 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +32 -0
- package/dist/esm/lib/config.js.map +1 -0
- package/dist/esm/lib/dlv.d.ts +14 -0
- package/dist/esm/lib/dlv.d.ts.map +1 -0
- package/dist/esm/lib/dlv.js +46 -0
- package/dist/esm/lib/dlv.js.map +1 -0
- package/dist/esm/lib/encodings.d.ts +52 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +354 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +16 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +28 -0
- package/dist/esm/lib/env.js.map +1 -0
- package/dist/esm/lib/event-streams.d.ts +11 -0
- package/dist/esm/lib/event-streams.d.ts.map +1 -0
- package/dist/esm/lib/event-streams.js +125 -0
- package/dist/esm/lib/event-streams.js.map +1 -0
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -0
- package/dist/esm/lib/files.js +73 -0
- package/dist/esm/lib/files.js.map +1 -0
- package/dist/esm/lib/http.d.ts +67 -0
- package/dist/esm/lib/http.d.ts.map +1 -0
- package/dist/esm/lib/http.js +207 -0
- package/dist/esm/lib/http.js.map +1 -0
- package/dist/esm/lib/is-plain-object.d.ts +2 -0
- package/dist/esm/lib/is-plain-object.d.ts.map +1 -0
- package/dist/esm/lib/is-plain-object.js +38 -0
- package/dist/esm/lib/is-plain-object.js.map +1 -0
- package/dist/esm/lib/logger.d.ts +6 -0
- package/dist/esm/lib/logger.d.ts.map +1 -0
- package/dist/esm/lib/logger.js +5 -0
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts +59 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -0
- package/dist/esm/lib/matchers.js +203 -0
- package/dist/esm/lib/matchers.js.map +1 -0
- package/dist/esm/lib/primitives.d.ts +26 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -0
- package/dist/esm/lib/primitives.js +103 -0
- package/dist/esm/lib/primitives.js.map +1 -0
- package/dist/esm/lib/retries.d.ts +38 -0
- package/dist/esm/lib/retries.d.ts.map +1 -0
- package/dist/esm/lib/retries.js +147 -0
- package/dist/esm/lib/retries.js.map +1 -0
- package/dist/esm/lib/schemas.d.ts +19 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -0
- package/dist/esm/lib/schemas.js +57 -0
- package/dist/esm/lib/schemas.js.map +1 -0
- package/dist/esm/lib/sdks.d.ts +63 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -0
- package/dist/esm/lib/sdks.js +269 -0
- package/dist/esm/lib/sdks.js.map +1 -0
- package/dist/esm/lib/security.d.ts +83 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +143 -0
- package/dist/esm/lib/security.js.map +1 -0
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -0
- package/dist/esm/lib/url.js +22 -0
- package/dist/esm/lib/url.js.map +1 -0
- package/dist/esm/models/activityitem.d.ts +82 -0
- package/dist/esm/models/activityitem.d.ts.map +1 -0
- package/dist/esm/models/activityitem.js +72 -0
- package/dist/esm/models/activityitem.js.map +1 -0
- package/dist/esm/models/assistantmessage.d.ts +62 -0
- package/dist/esm/models/assistantmessage.d.ts.map +1 -0
- package/dist/esm/models/assistantmessage.js +73 -0
- package/dist/esm/models/assistantmessage.js.map +1 -0
- package/dist/esm/models/chaterror.d.ts +35 -0
- package/dist/esm/models/chaterror.d.ts.map +1 -0
- package/dist/esm/models/chaterror.js +37 -0
- package/dist/esm/models/chaterror.js.map +1 -0
- package/dist/esm/models/chatgenerationparams.d.ts +403 -0
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -0
- package/dist/esm/models/chatgenerationparams.js +436 -0
- package/dist/esm/models/chatgenerationparams.js.map +1 -0
- package/dist/esm/models/chatgenerationtokenusage.d.ts +95 -0
- package/dist/esm/models/chatgenerationtokenusage.d.ts.map +1 -0
- package/dist/esm/models/chatgenerationtokenusage.js +142 -0
- package/dist/esm/models/chatgenerationtokenusage.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitem.d.ts +40 -0
- package/dist/esm/models/chatmessagecontentitem.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitem.js +46 -0
- package/dist/esm/models/chatmessagecontentitem.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts +99 -0
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemaudio.js +94 -0
- package/dist/esm/models/chatmessagecontentitemaudio.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemimage.d.ts +87 -0
- package/dist/esm/models/chatmessagecontentitemimage.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemimage.js +90 -0
- package/dist/esm/models/chatmessagecontentitemimage.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemtext.d.ts +31 -0
- package/dist/esm/models/chatmessagecontentitemtext.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemtext.js +33 -0
- package/dist/esm/models/chatmessagecontentitemtext.js.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprob.d.ts +64 -0
- package/dist/esm/models/chatmessagetokenlogprob.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprob.js +75 -0
- package/dist/esm/models/chatmessagetokenlogprob.js.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/dist/esm/models/chatmessagetokenlogprobs.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprobs.js +34 -0
- package/dist/esm/models/chatmessagetokenlogprobs.js.map +1 -0
- package/dist/esm/models/chatmessagetoolcall.d.ts +60 -0
- package/dist/esm/models/chatmessagetoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetoolcall.js +62 -0
- package/dist/esm/models/chatmessagetoolcall.js.map +1 -0
- package/dist/esm/models/chatresponse.d.ts +43 -0
- package/dist/esm/models/chatresponse.d.ts.map +1 -0
- package/dist/esm/models/chatresponse.js +54 -0
- package/dist/esm/models/chatresponse.js.map +1 -0
- package/dist/esm/models/chatresponsechoice.d.ts +72 -0
- package/dist/esm/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/esm/models/chatresponsechoice.js +70 -0
- package/dist/esm/models/chatresponsechoice.js.map +1 -0
- package/dist/esm/models/chatstreamingchoice.d.ts +72 -0
- package/dist/esm/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingchoice.js +70 -0
- package/dist/esm/models/chatstreamingchoice.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingmessagechunk.js +67 -0
- package/dist/esm/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js +66 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.js +122 -0
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/chatstreamoptions.d.ts +29 -0
- package/dist/esm/models/chatstreamoptions.d.ts.map +1 -0
- package/dist/esm/models/chatstreamoptions.js +40 -0
- package/dist/esm/models/chatstreamoptions.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +297 -0
- package/dist/esm/models/errorresponse.d.ts.map +1 -0
- package/dist/esm/models/errorresponse.js +158 -0
- package/dist/esm/models/errorresponse.js.map +1 -0
- package/dist/esm/models/errors/chaterror.d.ts +37 -0
- package/dist/esm/models/errors/chaterror.d.ts.map +1 -0
- package/dist/esm/models/errors/chaterror.js +48 -0
- package/dist/esm/models/errors/chaterror.js.map +1 -0
- package/dist/esm/models/errors/getproviders.d.ts +49 -0
- package/dist/esm/models/errors/getproviders.d.ts.map +1 -0
- package/dist/esm/models/errors/getproviders.js +51 -0
- package/dist/esm/models/errors/getproviders.js.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.js +69 -0
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +8 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +11 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/dist/esm/models/errors/openrouterdefaulterror.d.ts.map +1 -0
- package/dist/esm/models/errors/openrouterdefaulterror.js +30 -0
- package/dist/esm/models/errors/openrouterdefaulterror.js.map +1 -0
- package/dist/esm/models/errors/openroutererror.d.ts +19 -0
- package/dist/esm/models/errors/openroutererror.d.ts.map +1 -0
- package/dist/esm/models/errors/openroutererror.js +16 -0
- package/dist/esm/models/errors/openroutererror.js.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.js +29 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.js +91 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/esm/models/index.d.ts +28 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +31 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/message.d.ts +80 -0
- package/dist/esm/models/message.d.ts.map +1 -0
- package/dist/esm/models/message.js +100 -0
- package/dist/esm/models/message.js.map +1 -0
- package/dist/esm/models/namedtoolchoice.d.ts +56 -0
- package/dist/esm/models/namedtoolchoice.d.ts.map +1 -0
- package/dist/esm/models/namedtoolchoice.js +58 -0
- package/dist/esm/models/namedtoolchoice.js.map +1 -0
- package/dist/esm/models/operations/deletekeyshash.d.ts +82 -0
- package/dist/esm/models/operations/deletekeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/deletekeyshash.js +84 -0
- package/dist/esm/models/operations/deletekeyshash.js.map +1 -0
- package/dist/esm/models/operations/getactivity.d.ts +82 -0
- package/dist/esm/models/operations/getactivity.d.ts.map +1 -0
- package/dist/esm/models/operations/getactivity.js +84 -0
- package/dist/esm/models/operations/getactivity.js.map +1 -0
- package/dist/esm/models/operations/getauthkey.d.ts +163 -0
- package/dist/esm/models/operations/getauthkey.d.ts.map +1 -0
- package/dist/esm/models/operations/getauthkey.js +140 -0
- package/dist/esm/models/operations/getauthkey.js.map +1 -0
- package/dist/esm/models/operations/getcredits.d.ts +81 -0
- package/dist/esm/models/operations/getcredits.d.ts.map +1 -0
- package/dist/esm/models/operations/getcredits.js +97 -0
- package/dist/esm/models/operations/getcredits.js.map +1 -0
- package/dist/esm/models/operations/getendpointszdr.d.ts +815 -0
- package/dist/esm/models/operations/getendpointszdr.d.ts.map +1 -0
- package/dist/esm/models/operations/getendpointszdr.js +614 -0
- package/dist/esm/models/operations/getendpointszdr.js.map +1 -0
- package/dist/esm/models/operations/getgeneration.d.ts +295 -0
- package/dist/esm/models/operations/getgeneration.d.ts.map +1 -0
- package/dist/esm/models/operations/getgeneration.js +247 -0
- package/dist/esm/models/operations/getgeneration.js.map +1 -0
- package/dist/esm/models/operations/getkey.d.ts +163 -0
- package/dist/esm/models/operations/getkey.d.ts.map +1 -0
- package/dist/esm/models/operations/getkey.js +140 -0
- package/dist/esm/models/operations/getkey.js.map +1 -0
- package/dist/esm/models/operations/getkeys.d.ts +147 -0
- package/dist/esm/models/operations/getkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/getkeys.js +144 -0
- package/dist/esm/models/operations/getkeys.js.map +1 -0
- package/dist/esm/models/operations/getkeyshash.d.ts +148 -0
- package/dist/esm/models/operations/getkeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/getkeyshash.js +134 -0
- package/dist/esm/models/operations/getkeyshash.js.map +1 -0
- package/dist/esm/models/operations/getmodels.d.ts +901 -0
- package/dist/esm/models/operations/getmodels.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodels.js +751 -0
- package/dist/esm/models/operations/getmodels.js.map +1 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts +1178 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js +849 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js.map +1 -0
- package/dist/esm/models/operations/getmodelscount.d.ts +88 -0
- package/dist/esm/models/operations/getmodelscount.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelscount.js +84 -0
- package/dist/esm/models/operations/getmodelscount.js.map +1 -0
- package/dist/esm/models/operations/getmodelsuser.d.ts +870 -0
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelsuser.js +706 -0
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -0
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +419 -0
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -0
- package/dist/esm/models/operations/getparametersauthorslug.js +245 -0
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -0
- package/dist/esm/models/operations/getproviders.d.ts +116 -0
- package/dist/esm/models/operations/getproviders.d.ts.map +1 -0
- package/dist/esm/models/operations/getproviders.js +105 -0
- package/dist/esm/models/operations/getproviders.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +21 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -0
- package/dist/esm/models/operations/index.js +24 -0
- package/dist/esm/models/operations/index.js.map +1 -0
- package/dist/esm/models/operations/patchkeyshash.d.ts +193 -0
- package/dist/esm/models/operations/patchkeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/patchkeyshash.js +183 -0
- package/dist/esm/models/operations/patchkeyshash.js.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts +27 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.js +42 -0
- package/dist/esm/models/operations/postchatcompletions.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +267 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.js +325 -0
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -0
- package/dist/esm/models/operations/postembeddings.d.ts +1497 -0
- package/dist/esm/models/operations/postembeddings.d.ts.map +1 -0
- package/dist/esm/models/operations/postembeddings.js +991 -0
- package/dist/esm/models/operations/postembeddings.js.map +1 -0
- package/dist/esm/models/operations/postkeys.d.ts +166 -0
- package/dist/esm/models/operations/postkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postkeys.js +148 -0
- package/dist/esm/models/operations/postkeys.js.map +1 -0
- package/dist/esm/models/security.d.ts +31 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +33 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/models/systemmessage.d.ts +55 -0
- package/dist/esm/models/systemmessage.d.ts.map +1 -0
- package/dist/esm/models/systemmessage.js +63 -0
- package/dist/esm/models/systemmessage.js.map +1 -0
- package/dist/esm/models/tool.d.ts +66 -0
- package/dist/esm/models/tool.d.ts.map +1 -0
- package/dist/esm/models/tool.js +65 -0
- package/dist/esm/models/tool.js.map +1 -0
- package/dist/esm/models/toolresponsemessage.d.ts +55 -0
- package/dist/esm/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/esm/models/toolresponsemessage.js +69 -0
- package/dist/esm/models/toolresponsemessage.js.map +1 -0
- package/dist/esm/models/usermessage.d.ts +55 -0
- package/dist/esm/models/usermessage.d.ts.map +1 -0
- package/dist/esm/models/usermessage.js +60 -0
- package/dist/esm/models/usermessage.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/react-query/_context.d.ts +8 -0
- package/dist/esm/react-query/_context.d.ts.map +1 -0
- package/dist/esm/react-query/_context.js +14 -0
- package/dist/esm/react-query/_context.js.map +1 -0
- package/dist/esm/react-query/_types.d.ts +27 -0
- package/dist/esm/react-query/_types.d.ts.map +1 -0
- package/dist/esm/react-query/_types.js +5 -0
- package/dist/esm/react-query/_types.js.map +1 -0
- package/dist/esm/react-query/analyticsGetActivity.d.ts +36 -0
- package/dist/esm/react-query/analyticsGetActivity.d.ts.map +1 -0
- package/dist/esm/react-query/analyticsGetActivity.js +72 -0
- package/dist/esm/react-query/analyticsGetActivity.js.map +1 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.d.ts +20 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.js +39 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.d.ts +29 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.js +66 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKey.d.ts +29 -0
- package/dist/esm/react-query/apiKeysGetKey.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKey.js +66 -0
- package/dist/esm/react-query/apiKeysGetKey.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeys.d.ts +37 -0
- package/dist/esm/react-query/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeys.js +69 -0
- package/dist/esm/react-query/apiKeysGetKeys.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.d.ts +24 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.js +66 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.d.ts +20 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.js +39 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysPostKeys.d.ts +20 -0
- package/dist/esm/react-query/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysPostKeys.js +39 -0
- package/dist/esm/react-query/apiKeysPostKeys.js.map +1 -0
- package/dist/esm/react-query/chatSend.d.ts +28 -0
- package/dist/esm/react-query/chatSend.d.ts.map +1 -0
- package/dist/esm/react-query/chatSend.js +43 -0
- package/dist/esm/react-query/chatSend.js.map +1 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +23 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.js +42 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.d.ts +23 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.js +60 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts +24 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.js +77 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/esm/react-query/generationsGetGeneration.d.ts +30 -0
- package/dist/esm/react-query/generationsGetGeneration.d.ts.map +1 -0
- package/dist/esm/react-query/generationsGetGeneration.js +71 -0
- package/dist/esm/react-query/generationsGetGeneration.js.map +1 -0
- package/dist/esm/react-query/getCredits.d.ts +23 -0
- package/dist/esm/react-query/getCredits.d.ts.map +1 -0
- package/dist/esm/react-query/getCredits.js +60 -0
- package/dist/esm/react-query/getCredits.js.map +1 -0
- package/dist/esm/react-query/getProviders.d.ts +17 -0
- package/dist/esm/react-query/getProviders.d.ts.map +1 -0
- package/dist/esm/react-query/getProviders.js +54 -0
- package/dist/esm/react-query/getProviders.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +23 -0
- package/dist/esm/react-query/index.d.ts.map +1 -0
- package/dist/esm/react-query/index.js +26 -0
- package/dist/esm/react-query/index.js.map +1 -0
- package/dist/esm/react-query/modelsGetModels.d.ts +47 -0
- package/dist/esm/react-query/modelsGetModels.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModels.js +72 -0
- package/dist/esm/react-query/modelsGetModels.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsCount.d.ts +23 -0
- package/dist/esm/react-query/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModelsCount.js +60 -0
- package/dist/esm/react-query/modelsGetModelsCount.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +23 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.js +60 -0
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +20 -0
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/postCreditsCoinbase.js +39 -0
- package/dist/esm/react-query/postCreditsCoinbase.js.map +1 -0
- package/dist/esm/sdk/analytics.d.ts +12 -0
- package/dist/esm/sdk/analytics.d.ts.map +1 -0
- package/dist/esm/sdk/analytics.js +18 -0
- package/dist/esm/sdk/analytics.js.map +1 -0
- package/dist/esm/sdk/apikeys.d.ts +39 -0
- package/dist/esm/sdk/apikeys.d.ts.map +1 -0
- package/dist/esm/sdk/apikeys.js +63 -0
- package/dist/esm/sdk/apikeys.js.map +1 -0
- package/dist/esm/sdk/chat.d.ts +17 -0
- package/dist/esm/sdk/chat.d.ts.map +1 -0
- package/dist/esm/sdk/chat.js +19 -0
- package/dist/esm/sdk/chat.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +12 -0
- package/dist/esm/sdk/embeddings.d.ts.map +1 -0
- package/dist/esm/sdk/embeddings.js +18 -0
- package/dist/esm/sdk/embeddings.js.map +1 -0
- package/dist/esm/sdk/endpoints.d.ts +13 -0
- package/dist/esm/sdk/endpoints.d.ts.map +1 -0
- package/dist/esm/sdk/endpoints.js +22 -0
- package/dist/esm/sdk/endpoints.js.map +1 -0
- package/dist/esm/sdk/generations.d.ts +9 -0
- package/dist/esm/sdk/generations.d.ts.map +1 -0
- package/dist/esm/sdk/generations.js +15 -0
- package/dist/esm/sdk/generations.js.map +1 -0
- package/dist/esm/sdk/index.d.ts +2 -0
- package/dist/esm/sdk/index.d.ts.map +1 -0
- package/dist/esm/sdk/index.js +5 -0
- package/dist/esm/sdk/index.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +21 -0
- package/dist/esm/sdk/models.d.ts.map +1 -0
- package/dist/esm/sdk/models.js +30 -0
- package/dist/esm/sdk/models.js.map +1 -0
- package/dist/esm/sdk/parameters.d.ts +9 -0
- package/dist/esm/sdk/parameters.d.ts.map +1 -0
- package/dist/esm/sdk/parameters.js +15 -0
- package/dist/esm/sdk/parameters.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +38 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +58 -0
- package/dist/esm/sdk/sdk.js.map +1 -0
- package/dist/esm/types/async.d.ts +23 -0
- package/dist/esm/types/async.d.ts.map +1 -0
- package/dist/esm/types/async.js +40 -0
- package/dist/esm/types/async.js.map +1 -0
- package/dist/esm/types/blobs.d.ts +4 -0
- package/dist/esm/types/blobs.d.ts.map +1 -0
- package/dist/esm/types/blobs.js +25 -0
- package/dist/esm/types/blobs.js.map +1 -0
- package/dist/esm/types/constdatetime.d.ts +3 -0
- package/dist/esm/types/constdatetime.d.ts.map +1 -0
- package/dist/esm/types/constdatetime.js +10 -0
- package/dist/esm/types/constdatetime.js.map +1 -0
- package/dist/esm/types/enums.d.ts +12 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/fp.d.ts +31 -0
- package/dist/esm/types/fp.d.ts.map +1 -0
- package/dist/esm/types/fp.js +31 -0
- package/dist/esm/types/fp.js.map +1 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +8 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/operations.d.ts +27 -0
- package/dist/esm/types/operations.d.ts.map +1 -0
- package/dist/esm/types/operations.js +77 -0
- package/dist/esm/types/operations.js.map +1 -0
- package/dist/esm/types/rfcdate.d.ts +21 -0
- package/dist/esm/types/rfcdate.d.ts.map +1 -0
- package/dist/esm/types/rfcdate.js +42 -0
- package/dist/esm/types/rfcdate.js.map +1 -0
- package/dist/esm/types/streams.d.ts +2 -0
- package/dist/esm/types/streams.d.ts.map +1 -0
- package/dist/esm/types/streams.js +15 -0
- package/dist/esm/types/streams.js.map +1 -0
- package/docs/sdks/analytics/README.md +113 -0
- package/docs/sdks/apikeys/README.md +716 -0
- package/docs/sdks/chat/README.md +100 -0
- package/docs/sdks/embeddings/README.md +108 -0
- package/docs/sdks/endpoints/README.md +215 -0
- package/docs/sdks/generations/README.md +113 -0
- package/docs/sdks/models/README.md +309 -0
- package/docs/sdks/openrouter/README.md +301 -0
- package/docs/sdks/parameters/README.md +115 -0
- package/examples/README.md +31 -0
- package/examples/chatCompletion.example.ts +19 -0
- package/examples/chatCompletionStream.example.ts +30 -0
- package/examples/getCredits.example.ts +28 -0
- package/examples/package.json +18 -0
- package/examples/unauthorized.example.ts +19 -0
- package/jsr.json +28 -0
- package/package.json +151 -0
- package/src/core.ts +13 -0
- package/src/funcs/analyticsGetActivity.ts +165 -0
- package/src/funcs/apiKeysDeleteKeysHash.ts +163 -0
- package/src/funcs/apiKeysGetAuthKey.ts +142 -0
- package/src/funcs/apiKeysGetKey.ts +142 -0
- package/src/funcs/apiKeysGetKeys.ts +162 -0
- package/src/funcs/apiKeysGetKeysHash.ts +163 -0
- package/src/funcs/apiKeysPatchKeysHash.ts +164 -0
- package/src/funcs/apiKeysPostKeys.ts +160 -0
- package/src/funcs/chatSend.ts +180 -0
- package/src/funcs/embeddingsPostEmbeddings.ts +163 -0
- package/src/funcs/endpointsGetEndpointsZdr.ts +139 -0
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +172 -0
- package/src/funcs/generationsGetGeneration.ts +161 -0
- package/src/funcs/getCredits.ts +139 -0
- package/src/funcs/getProviders.ts +144 -0
- package/src/funcs/modelsGetModels.ts +174 -0
- package/src/funcs/modelsGetModelsCount.ts +139 -0
- package/src/funcs/modelsGetModelsUser.ts +139 -0
- package/src/funcs/parametersGetParametersAuthorSlug.ts +173 -0
- package/src/funcs/postCreditsCoinbase.ts +162 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +70 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +43 -0
- package/src/lib/event-streams.ts +135 -0
- package/src/lib/files.ts +82 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +352 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +271 -0
- package/src/lib/url.ts +33 -0
- package/src/models/activityitem.ts +156 -0
- package/src/models/assistantmessage.ts +163 -0
- package/src/models/chaterror.ts +74 -0
- package/src/models/chatgenerationparams.ts +847 -0
- package/src/models/chatgenerationtokenusage.ts +259 -0
- package/src/models/chatmessagecontentitem.ts +110 -0
- package/src/models/chatmessagecontentitemaudio.ts +170 -0
- package/src/models/chatmessagecontentitemimage.ts +166 -0
- package/src/models/chatmessagecontentitemtext.ts +70 -0
- package/src/models/chatmessagetokenlogprob.ts +149 -0
- package/src/models/chatmessagetokenlogprobs.ts +76 -0
- package/src/models/chatmessagetoolcall.ts +138 -0
- package/src/models/chatresponse.ts +107 -0
- package/src/models/chatresponsechoice.ts +132 -0
- package/src/models/chatstreamingchoice.ts +132 -0
- package/src/models/chatstreamingmessagechunk.ts +123 -0
- package/src/models/chatstreamingmessagetoolcall.ts +149 -0
- package/src/models/chatstreamingresponsechunk.ts +239 -0
- package/src/models/chatstreamoptions.ts +75 -0
- package/src/models/errorresponse.ts +239 -0
- package/src/models/errors/chaterror.ts +79 -0
- package/src/models/errors/getproviders.ts +91 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +11 -0
- package/src/models/errors/openrouterdefaulterror.ts +40 -0
- package/src/models/errors/openroutererror.ts +35 -0
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +109 -0
- package/src/models/index.ts +31 -0
- package/src/models/message.ts +223 -0
- package/src/models/namedtoolchoice.ts +126 -0
- package/src/models/operations/deletekeyshash.ts +191 -0
- package/src/models/operations/getactivity.ts +191 -0
- package/src/models/operations/getauthkey.ts +330 -0
- package/src/models/operations/getcredits.ts +197 -0
- package/src/models/operations/getendpointszdr.ts +1172 -0
- package/src/models/operations/getgeneration.ts +552 -0
- package/src/models/operations/getkey.ts +324 -0
- package/src/models/operations/getkeys.ts +312 -0
- package/src/models/operations/getkeyshash.ts +313 -0
- package/src/models/operations/getmodels.ts +1527 -0
- package/src/models/operations/getmodelsauthorslugendpoints.ts +1791 -0
- package/src/models/operations/getmodelscount.ts +197 -0
- package/src/models/operations/getmodelsuser.ts +1469 -0
- package/src/models/operations/getparametersauthorslug.ts +437 -0
- package/src/models/operations/getproviders.ts +235 -0
- package/src/models/operations/index.ts +24 -0
- package/src/models/operations/patchkeyshash.ts +417 -0
- package/src/models/operations/postchatcompletions.ts +80 -0
- package/src/models/operations/postcreditscoinbase.ts +622 -0
- package/src/models/operations/postembeddings.ts +1672 -0
- package/src/models/operations/postkeys.ts +339 -0
- package/src/models/security.ts +66 -0
- package/src/models/systemmessage.ts +134 -0
- package/src/models/tool.ts +126 -0
- package/src/models/toolresponsemessage.ts +144 -0
- package/src/models/usermessage.ts +131 -0
- package/src/react-query/_types.ts +162 -0
- package/src/react-query/analyticsGetActivity.ts +150 -0
- package/src/react-query/apiKeysDeleteKeysHash.ts +86 -0
- package/src/react-query/apiKeysGetAuthKey.ts +124 -0
- package/src/react-query/apiKeysGetKey.ts +122 -0
- package/src/react-query/apiKeysGetKeys.ts +158 -0
- package/src/react-query/apiKeysGetKeysHash.ts +142 -0
- package/src/react-query/apiKeysPatchKeysHash.ts +85 -0
- package/src/react-query/apiKeysPostKeys.ts +85 -0
- package/src/react-query/chatSend.ts +87 -0
- package/src/react-query/embeddingsPostEmbeddings.ts +89 -0
- package/src/react-query/endpointsGetEndpointsZdr.ts +119 -0
- package/src/react-query/endpointsGetModelsAuthorSlugEndpoints.ts +168 -0
- package/src/react-query/generationsGetGeneration.ts +150 -0
- package/src/react-query/getCredits.ts +116 -0
- package/src/react-query/getProviders.ts +110 -0
- package/src/react-query/index.ts +27 -0
- package/src/react-query/modelsGetModels.ts +171 -0
- package/src/react-query/modelsGetModelsCount.ts +118 -0
- package/src/react-query/modelsGetModelsUser.ts +118 -0
- package/src/react-query/parametersGetParametersAuthorSlug.ts +184 -0
- package/src/react-query/postCreditsCoinbase.ts +86 -0
- package/src/sdk/analytics.ts +27 -0
- package/src/sdk/apikeys.ts +116 -0
- package/src/sdk/chat.ts +30 -0
- package/src/sdk/embeddings.ts +27 -0
- package/src/sdk/endpoints.ts +37 -0
- package/src/sdk/generations.ts +24 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/models.ts +55 -0
- package/src/sdk/parameters.ts +24 -0
- package/src/sdk/sdk.ts +95 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+
# APIKeys
|
|
2
|
+
(*apiKeys*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [getKeys](#getkeys) - List API keys
|
|
9
|
+
* [postKeys](#postkeys) - Create a new API key
|
|
10
|
+
* [patchKeysHash](#patchkeyshash) - Update an API key
|
|
11
|
+
* [deleteKeysHash](#deletekeyshash) - Delete an API key
|
|
12
|
+
* [getKeysHash](#getkeyshash) - Get a single API key
|
|
13
|
+
* [getKey](#getkey) - Get current API key
|
|
14
|
+
* [getAuthKey](#getauthkey) - Get current API key
|
|
15
|
+
|
|
16
|
+
## getKeys
|
|
17
|
+
|
|
18
|
+
List API keys
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
<!-- UsageSnippet language="typescript" operationID="get_/keys" method="get" path="/keys" -->
|
|
23
|
+
```typescript
|
|
24
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
25
|
+
|
|
26
|
+
const openRouter = new OpenRouter({
|
|
27
|
+
security: {
|
|
28
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
async function run() {
|
|
33
|
+
const result = await openRouter.apiKeys.getKeys();
|
|
34
|
+
|
|
35
|
+
console.log(result);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
run();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Standalone function
|
|
42
|
+
|
|
43
|
+
The standalone function version of this method:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
47
|
+
import { apiKeysGetKeys } from "@openrouter/sdk/funcs/apiKeysGetKeys.js";
|
|
48
|
+
|
|
49
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
50
|
+
// You can create one instance of it to use across an application.
|
|
51
|
+
const openRouter = new OpenRouterCore({
|
|
52
|
+
security: {
|
|
53
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
async function run() {
|
|
58
|
+
const res = await apiKeysGetKeys(openRouter);
|
|
59
|
+
if (res.ok) {
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
console.log(result);
|
|
62
|
+
} else {
|
|
63
|
+
console.log("apiKeysGetKeys failed:", res.error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
run();
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### React hooks and utilities
|
|
71
|
+
|
|
72
|
+
This method can be used in React components through the following hooks and
|
|
73
|
+
associated utilities.
|
|
74
|
+
|
|
75
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
76
|
+
> below and how to get started using React hooks.
|
|
77
|
+
|
|
78
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import {
|
|
82
|
+
// Query hooks for fetching data.
|
|
83
|
+
useApiKeysGetKeys,
|
|
84
|
+
useApiKeysGetKeysSuspense,
|
|
85
|
+
|
|
86
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
87
|
+
// Server Components that will be immediately available to client components
|
|
88
|
+
// using the hooks.
|
|
89
|
+
prefetchApiKeysGetKeys,
|
|
90
|
+
|
|
91
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
92
|
+
// mutations and other user actions.
|
|
93
|
+
invalidateApiKeysGetKeys,
|
|
94
|
+
invalidateAllApiKeysGetKeys,
|
|
95
|
+
} from "@openrouter/sdk/react-query/apiKeysGetKeys.js";
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Parameters
|
|
99
|
+
|
|
100
|
+
| Parameter | Type | Required | Description |
|
|
101
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
102
|
+
| `request` | [operations.GetKeysRequest](../../models/operations/getkeysrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
103
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
104
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
105
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
106
|
+
|
|
107
|
+
### Response
|
|
108
|
+
|
|
109
|
+
**Promise\<[operations.GetKeysResponse](../../models/operations/getkeysresponse.md)\>**
|
|
110
|
+
|
|
111
|
+
### Errors
|
|
112
|
+
|
|
113
|
+
| Error Type | Status Code | Content Type |
|
|
114
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
115
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
116
|
+
|
|
117
|
+
## postKeys
|
|
118
|
+
|
|
119
|
+
Create a new API key
|
|
120
|
+
|
|
121
|
+
### Example Usage
|
|
122
|
+
|
|
123
|
+
<!-- UsageSnippet language="typescript" operationID="post_/keys" method="post" path="/keys" -->
|
|
124
|
+
```typescript
|
|
125
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
126
|
+
|
|
127
|
+
const openRouter = new OpenRouter({
|
|
128
|
+
security: {
|
|
129
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
async function run() {
|
|
134
|
+
const result = await openRouter.apiKeys.postKeys({
|
|
135
|
+
name: "My New API Key",
|
|
136
|
+
limit: 50,
|
|
137
|
+
includeByokInLimit: true,
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
console.log(result);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
run();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Standalone function
|
|
147
|
+
|
|
148
|
+
The standalone function version of this method:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
152
|
+
import { apiKeysPostKeys } from "@openrouter/sdk/funcs/apiKeysPostKeys.js";
|
|
153
|
+
|
|
154
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
155
|
+
// You can create one instance of it to use across an application.
|
|
156
|
+
const openRouter = new OpenRouterCore({
|
|
157
|
+
security: {
|
|
158
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
async function run() {
|
|
163
|
+
const res = await apiKeysPostKeys(openRouter, {
|
|
164
|
+
name: "My New API Key",
|
|
165
|
+
limit: 50,
|
|
166
|
+
includeByokInLimit: true,
|
|
167
|
+
});
|
|
168
|
+
if (res.ok) {
|
|
169
|
+
const { value: result } = res;
|
|
170
|
+
console.log(result);
|
|
171
|
+
} else {
|
|
172
|
+
console.log("apiKeysPostKeys failed:", res.error);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
run();
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### React hooks and utilities
|
|
180
|
+
|
|
181
|
+
This method can be used in React components through the following hooks and
|
|
182
|
+
associated utilities.
|
|
183
|
+
|
|
184
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
185
|
+
> below and how to get started using React hooks.
|
|
186
|
+
|
|
187
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
188
|
+
|
|
189
|
+
```tsx
|
|
190
|
+
import {
|
|
191
|
+
// Mutation hook for triggering the API call.
|
|
192
|
+
useApiKeysPostKeysMutation
|
|
193
|
+
} from "@openrouter/sdk/react-query/apiKeysPostKeys.js";
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Parameters
|
|
197
|
+
|
|
198
|
+
| Parameter | Type | Required | Description |
|
|
199
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
200
|
+
| `request` | [operations.PostKeysRequest](../../models/operations/postkeysrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
201
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
202
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
203
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
204
|
+
|
|
205
|
+
### Response
|
|
206
|
+
|
|
207
|
+
**Promise\<[operations.PostKeysResponse](../../models/operations/postkeysresponse.md)\>**
|
|
208
|
+
|
|
209
|
+
### Errors
|
|
210
|
+
|
|
211
|
+
| Error Type | Status Code | Content Type |
|
|
212
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
213
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
214
|
+
|
|
215
|
+
## patchKeysHash
|
|
216
|
+
|
|
217
|
+
Update an API key
|
|
218
|
+
|
|
219
|
+
### Example Usage
|
|
220
|
+
|
|
221
|
+
<!-- UsageSnippet language="typescript" operationID="patch_/keys/{hash}" method="patch" path="/keys/{hash}" -->
|
|
222
|
+
```typescript
|
|
223
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
224
|
+
|
|
225
|
+
const openRouter = new OpenRouter({
|
|
226
|
+
security: {
|
|
227
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
async function run() {
|
|
232
|
+
const result = await openRouter.apiKeys.patchKeysHash({
|
|
233
|
+
hash: "sk-or-v1-abc123def456",
|
|
234
|
+
requestBody: {
|
|
235
|
+
name: "Updated API Key Name",
|
|
236
|
+
disabled: false,
|
|
237
|
+
limit: 75,
|
|
238
|
+
includeByokInLimit: true,
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
console.log(result);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
run();
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Standalone function
|
|
249
|
+
|
|
250
|
+
The standalone function version of this method:
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
254
|
+
import { apiKeysPatchKeysHash } from "@openrouter/sdk/funcs/apiKeysPatchKeysHash.js";
|
|
255
|
+
|
|
256
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
257
|
+
// You can create one instance of it to use across an application.
|
|
258
|
+
const openRouter = new OpenRouterCore({
|
|
259
|
+
security: {
|
|
260
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
261
|
+
},
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
async function run() {
|
|
265
|
+
const res = await apiKeysPatchKeysHash(openRouter, {
|
|
266
|
+
hash: "sk-or-v1-abc123def456",
|
|
267
|
+
requestBody: {
|
|
268
|
+
name: "Updated API Key Name",
|
|
269
|
+
disabled: false,
|
|
270
|
+
limit: 75,
|
|
271
|
+
includeByokInLimit: true,
|
|
272
|
+
},
|
|
273
|
+
});
|
|
274
|
+
if (res.ok) {
|
|
275
|
+
const { value: result } = res;
|
|
276
|
+
console.log(result);
|
|
277
|
+
} else {
|
|
278
|
+
console.log("apiKeysPatchKeysHash failed:", res.error);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
run();
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### React hooks and utilities
|
|
286
|
+
|
|
287
|
+
This method can be used in React components through the following hooks and
|
|
288
|
+
associated utilities.
|
|
289
|
+
|
|
290
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
291
|
+
> below and how to get started using React hooks.
|
|
292
|
+
|
|
293
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
294
|
+
|
|
295
|
+
```tsx
|
|
296
|
+
import {
|
|
297
|
+
// Mutation hook for triggering the API call.
|
|
298
|
+
useApiKeysPatchKeysHashMutation
|
|
299
|
+
} from "@openrouter/sdk/react-query/apiKeysPatchKeysHash.js";
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Parameters
|
|
303
|
+
|
|
304
|
+
| Parameter | Type | Required | Description |
|
|
305
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
306
|
+
| `request` | [operations.PatchKeysHashRequest](../../models/operations/patchkeyshashrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
307
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
308
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
309
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
310
|
+
|
|
311
|
+
### Response
|
|
312
|
+
|
|
313
|
+
**Promise\<[operations.PatchKeysHashResponse](../../models/operations/patchkeyshashresponse.md)\>**
|
|
314
|
+
|
|
315
|
+
### Errors
|
|
316
|
+
|
|
317
|
+
| Error Type | Status Code | Content Type |
|
|
318
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
319
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
320
|
+
|
|
321
|
+
## deleteKeysHash
|
|
322
|
+
|
|
323
|
+
Delete an API key
|
|
324
|
+
|
|
325
|
+
### Example Usage
|
|
326
|
+
|
|
327
|
+
<!-- UsageSnippet language="typescript" operationID="delete_/keys/{hash}" method="delete" path="/keys/{hash}" -->
|
|
328
|
+
```typescript
|
|
329
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
330
|
+
|
|
331
|
+
const openRouter = new OpenRouter({
|
|
332
|
+
security: {
|
|
333
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
async function run() {
|
|
338
|
+
const result = await openRouter.apiKeys.deleteKeysHash({
|
|
339
|
+
hash: "sk-or-v1-abc123def456",
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
console.log(result);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
run();
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Standalone function
|
|
349
|
+
|
|
350
|
+
The standalone function version of this method:
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
354
|
+
import { apiKeysDeleteKeysHash } from "@openrouter/sdk/funcs/apiKeysDeleteKeysHash.js";
|
|
355
|
+
|
|
356
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
357
|
+
// You can create one instance of it to use across an application.
|
|
358
|
+
const openRouter = new OpenRouterCore({
|
|
359
|
+
security: {
|
|
360
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
async function run() {
|
|
365
|
+
const res = await apiKeysDeleteKeysHash(openRouter, {
|
|
366
|
+
hash: "sk-or-v1-abc123def456",
|
|
367
|
+
});
|
|
368
|
+
if (res.ok) {
|
|
369
|
+
const { value: result } = res;
|
|
370
|
+
console.log(result);
|
|
371
|
+
} else {
|
|
372
|
+
console.log("apiKeysDeleteKeysHash failed:", res.error);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
run();
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### React hooks and utilities
|
|
380
|
+
|
|
381
|
+
This method can be used in React components through the following hooks and
|
|
382
|
+
associated utilities.
|
|
383
|
+
|
|
384
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
385
|
+
> below and how to get started using React hooks.
|
|
386
|
+
|
|
387
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
388
|
+
|
|
389
|
+
```tsx
|
|
390
|
+
import {
|
|
391
|
+
// Mutation hook for triggering the API call.
|
|
392
|
+
useApiKeysDeleteKeysHashMutation
|
|
393
|
+
} from "@openrouter/sdk/react-query/apiKeysDeleteKeysHash.js";
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### Parameters
|
|
397
|
+
|
|
398
|
+
| Parameter | Type | Required | Description |
|
|
399
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
400
|
+
| `request` | [operations.DeleteKeysHashRequest](../../models/operations/deletekeyshashrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
401
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
402
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
403
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
404
|
+
|
|
405
|
+
### Response
|
|
406
|
+
|
|
407
|
+
**Promise\<[operations.DeleteKeysHashResponse](../../models/operations/deletekeyshashresponse.md)\>**
|
|
408
|
+
|
|
409
|
+
### Errors
|
|
410
|
+
|
|
411
|
+
| Error Type | Status Code | Content Type |
|
|
412
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
413
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
414
|
+
|
|
415
|
+
## getKeysHash
|
|
416
|
+
|
|
417
|
+
Get a single API key
|
|
418
|
+
|
|
419
|
+
### Example Usage
|
|
420
|
+
|
|
421
|
+
<!-- UsageSnippet language="typescript" operationID="get_/keys/{hash}" method="get" path="/keys/{hash}" -->
|
|
422
|
+
```typescript
|
|
423
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
424
|
+
|
|
425
|
+
const openRouter = new OpenRouter({
|
|
426
|
+
security: {
|
|
427
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
async function run() {
|
|
432
|
+
const result = await openRouter.apiKeys.getKeysHash({
|
|
433
|
+
hash: "sk-or-v1-abc123def456",
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
console.log(result);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
run();
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Standalone function
|
|
443
|
+
|
|
444
|
+
The standalone function version of this method:
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
448
|
+
import { apiKeysGetKeysHash } from "@openrouter/sdk/funcs/apiKeysGetKeysHash.js";
|
|
449
|
+
|
|
450
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
451
|
+
// You can create one instance of it to use across an application.
|
|
452
|
+
const openRouter = new OpenRouterCore({
|
|
453
|
+
security: {
|
|
454
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
455
|
+
},
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
async function run() {
|
|
459
|
+
const res = await apiKeysGetKeysHash(openRouter, {
|
|
460
|
+
hash: "sk-or-v1-abc123def456",
|
|
461
|
+
});
|
|
462
|
+
if (res.ok) {
|
|
463
|
+
const { value: result } = res;
|
|
464
|
+
console.log(result);
|
|
465
|
+
} else {
|
|
466
|
+
console.log("apiKeysGetKeysHash failed:", res.error);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
run();
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### React hooks and utilities
|
|
474
|
+
|
|
475
|
+
This method can be used in React components through the following hooks and
|
|
476
|
+
associated utilities.
|
|
477
|
+
|
|
478
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
479
|
+
> below and how to get started using React hooks.
|
|
480
|
+
|
|
481
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
482
|
+
|
|
483
|
+
```tsx
|
|
484
|
+
import {
|
|
485
|
+
// Query hooks for fetching data.
|
|
486
|
+
useApiKeysGetKeysHash,
|
|
487
|
+
useApiKeysGetKeysHashSuspense,
|
|
488
|
+
|
|
489
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
490
|
+
// Server Components that will be immediately available to client components
|
|
491
|
+
// using the hooks.
|
|
492
|
+
prefetchApiKeysGetKeysHash,
|
|
493
|
+
|
|
494
|
+
// Utilities to invalidate the query cache for this query in response to
|
|
495
|
+
// mutations and other user actions.
|
|
496
|
+
invalidateApiKeysGetKeysHash,
|
|
497
|
+
invalidateAllApiKeysGetKeysHash,
|
|
498
|
+
} from "@openrouter/sdk/react-query/apiKeysGetKeysHash.js";
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Parameters
|
|
502
|
+
|
|
503
|
+
| Parameter | Type | Required | Description |
|
|
504
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
505
|
+
| `request` | [operations.GetKeysHashRequest](../../models/operations/getkeyshashrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
506
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
507
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
508
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
509
|
+
|
|
510
|
+
### Response
|
|
511
|
+
|
|
512
|
+
**Promise\<[operations.GetKeysHashResponse](../../models/operations/getkeyshashresponse.md)\>**
|
|
513
|
+
|
|
514
|
+
### Errors
|
|
515
|
+
|
|
516
|
+
| Error Type | Status Code | Content Type |
|
|
517
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
518
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
519
|
+
|
|
520
|
+
## getKey
|
|
521
|
+
|
|
522
|
+
Get information on the API key associated with the current authentication session
|
|
523
|
+
|
|
524
|
+
### Example Usage
|
|
525
|
+
|
|
526
|
+
<!-- UsageSnippet language="typescript" operationID="get_/key" method="get" path="/key" -->
|
|
527
|
+
```typescript
|
|
528
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
529
|
+
|
|
530
|
+
const openRouter = new OpenRouter({
|
|
531
|
+
security: {
|
|
532
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
async function run() {
|
|
537
|
+
const result = await openRouter.apiKeys.getKey();
|
|
538
|
+
|
|
539
|
+
console.log(result);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
run();
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Standalone function
|
|
546
|
+
|
|
547
|
+
The standalone function version of this method:
|
|
548
|
+
|
|
549
|
+
```typescript
|
|
550
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
551
|
+
import { apiKeysGetKey } from "@openrouter/sdk/funcs/apiKeysGetKey.js";
|
|
552
|
+
|
|
553
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
554
|
+
// You can create one instance of it to use across an application.
|
|
555
|
+
const openRouter = new OpenRouterCore({
|
|
556
|
+
security: {
|
|
557
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
558
|
+
},
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
async function run() {
|
|
562
|
+
const res = await apiKeysGetKey(openRouter);
|
|
563
|
+
if (res.ok) {
|
|
564
|
+
const { value: result } = res;
|
|
565
|
+
console.log(result);
|
|
566
|
+
} else {
|
|
567
|
+
console.log("apiKeysGetKey failed:", res.error);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
run();
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### React hooks and utilities
|
|
575
|
+
|
|
576
|
+
This method can be used in React components through the following hooks and
|
|
577
|
+
associated utilities.
|
|
578
|
+
|
|
579
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
580
|
+
> below and how to get started using React hooks.
|
|
581
|
+
|
|
582
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
583
|
+
|
|
584
|
+
```tsx
|
|
585
|
+
import {
|
|
586
|
+
// Query hooks for fetching data.
|
|
587
|
+
useApiKeysGetKey,
|
|
588
|
+
useApiKeysGetKeySuspense,
|
|
589
|
+
|
|
590
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
591
|
+
// Server Components that will be immediately available to client components
|
|
592
|
+
// using the hooks.
|
|
593
|
+
prefetchApiKeysGetKey,
|
|
594
|
+
|
|
595
|
+
// Utility to invalidate the query cache for this query in response to
|
|
596
|
+
// mutations and other user actions.
|
|
597
|
+
invalidateAllApiKeysGetKey,
|
|
598
|
+
} from "@openrouter/sdk/react-query/apiKeysGetKey.js";
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Parameters
|
|
602
|
+
|
|
603
|
+
| Parameter | Type | Required | Description |
|
|
604
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
605
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
606
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
607
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
608
|
+
|
|
609
|
+
### Response
|
|
610
|
+
|
|
611
|
+
**Promise\<[operations.GetKeyResponse](../../models/operations/getkeyresponse.md)\>**
|
|
612
|
+
|
|
613
|
+
### Errors
|
|
614
|
+
|
|
615
|
+
| Error Type | Status Code | Content Type |
|
|
616
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
617
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
618
|
+
|
|
619
|
+
## getAuthKey
|
|
620
|
+
|
|
621
|
+
Get information on the API key associated with the current authentication session
|
|
622
|
+
|
|
623
|
+
### Example Usage
|
|
624
|
+
|
|
625
|
+
<!-- UsageSnippet language="typescript" operationID="get_/auth/key" method="get" path="/auth/key" -->
|
|
626
|
+
```typescript
|
|
627
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
628
|
+
|
|
629
|
+
const openRouter = new OpenRouter({
|
|
630
|
+
security: {
|
|
631
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
632
|
+
},
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
async function run() {
|
|
636
|
+
const result = await openRouter.apiKeys.getAuthKey();
|
|
637
|
+
|
|
638
|
+
console.log(result);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
run();
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Standalone function
|
|
645
|
+
|
|
646
|
+
The standalone function version of this method:
|
|
647
|
+
|
|
648
|
+
```typescript
|
|
649
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
650
|
+
import { apiKeysGetAuthKey } from "@openrouter/sdk/funcs/apiKeysGetAuthKey.js";
|
|
651
|
+
|
|
652
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
653
|
+
// You can create one instance of it to use across an application.
|
|
654
|
+
const openRouter = new OpenRouterCore({
|
|
655
|
+
security: {
|
|
656
|
+
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
657
|
+
},
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
async function run() {
|
|
661
|
+
const res = await apiKeysGetAuthKey(openRouter);
|
|
662
|
+
if (res.ok) {
|
|
663
|
+
const { value: result } = res;
|
|
664
|
+
console.log(result);
|
|
665
|
+
} else {
|
|
666
|
+
console.log("apiKeysGetAuthKey failed:", res.error);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
run();
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### React hooks and utilities
|
|
674
|
+
|
|
675
|
+
This method can be used in React components through the following hooks and
|
|
676
|
+
associated utilities.
|
|
677
|
+
|
|
678
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
679
|
+
> below and how to get started using React hooks.
|
|
680
|
+
|
|
681
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
682
|
+
|
|
683
|
+
```tsx
|
|
684
|
+
import {
|
|
685
|
+
// Query hooks for fetching data.
|
|
686
|
+
useApiKeysGetAuthKey,
|
|
687
|
+
useApiKeysGetAuthKeySuspense,
|
|
688
|
+
|
|
689
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
690
|
+
// Server Components that will be immediately available to client components
|
|
691
|
+
// using the hooks.
|
|
692
|
+
prefetchApiKeysGetAuthKey,
|
|
693
|
+
|
|
694
|
+
// Utility to invalidate the query cache for this query in response to
|
|
695
|
+
// mutations and other user actions.
|
|
696
|
+
invalidateAllApiKeysGetAuthKey,
|
|
697
|
+
} from "@openrouter/sdk/react-query/apiKeysGetAuthKey.js";
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### Parameters
|
|
701
|
+
|
|
702
|
+
| Parameter | Type | Required | Description |
|
|
703
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
704
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
705
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
706
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
707
|
+
|
|
708
|
+
### Response
|
|
709
|
+
|
|
710
|
+
**Promise\<[operations.GetAuthKeyResponse](../../models/operations/getauthkeyresponse.md)\>**
|
|
711
|
+
|
|
712
|
+
### Errors
|
|
713
|
+
|
|
714
|
+
| Error Type | Status Code | Content Type |
|
|
715
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
716
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|