@openrouter/sdk 0.0.0-beta.7 → 0.0.0-beta.8
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/FUNCTIONS.md +6 -6
- package/REACT_QUERY.md +30 -25
- package/README.md +95 -56
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsGetActivity.js +8 -3
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/commonjs/funcs/{chatGenerateResponse.d.ts → chatSend.d.ts} +6 -6
- package/dist/commonjs/funcs/chatSend.d.ts.map +1 -0
- package/dist/commonjs/funcs/{chatGenerateResponse.js → chatSend.js} +14 -13
- package/dist/commonjs/funcs/chatSend.js.map +1 -0
- package/dist/commonjs/funcs/completionsCreate.d.ts +25 -0
- package/dist/commonjs/funcs/completionsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/completionsCreate.js +128 -0
- package/dist/commonjs/funcs/completionsCreate.js.map +1 -0
- package/dist/{esm/funcs/getCredits.d.ts → commonjs/funcs/creditsGetCredits.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getCredits.js → creditsGetCredits.js} +11 -6
- package/dist/commonjs/funcs/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/{esm/funcs/embeddingsPostEmbeddings.d.ts → commonjs/funcs/embeddingsGenerate.d.ts} +3 -2
- package/dist/commonjs/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +11 -6
- package/dist/commonjs/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.js +8 -3
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.d.ts → modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModels.js +8 -3
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.js +8 -3
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.js +17 -8
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{esm/funcs/getProviders.d.ts → commonjs/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/commonjs/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getProviders.js → providersGetProviders.js} +9 -5
- package/dist/commonjs/funcs/providersGetProviders.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -7
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/env.d.ts +1 -2
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +1 -2
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +1 -7
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/chaterror.d.ts +56 -0
- package/dist/commonjs/models/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/chaterror.js +98 -0
- package/dist/commonjs/models/chaterror.js.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts +108 -108
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.js +143 -144
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
- package/dist/commonjs/models/chatresponse.d.ts +43 -0
- package/dist/commonjs/models/chatresponse.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletion.js → chatresponse.js} +22 -22
- 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/{chatcompletionchoice.js → chatstreamingchoice.js} +32 -32
- 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/{chatcompletionchunkchoicedelta.js → chatstreamingmessagechunk.js} +20 -22
- 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 +162 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/completionchoice.d.ts +37 -0
- package/dist/commonjs/models/completionchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionchoice.js +86 -0
- package/dist/commonjs/models/completionchoice.js.map +1 -0
- package/dist/commonjs/models/completioncreateparams.d.ts +327 -0
- package/dist/commonjs/models/completioncreateparams.d.ts.map +1 -0
- package/dist/commonjs/models/completioncreateparams.js +461 -0
- package/dist/commonjs/models/completioncreateparams.js.map +1 -0
- package/dist/commonjs/models/completionerror.d.ts +56 -0
- package/dist/commonjs/models/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/completionerror.js +98 -0
- package/dist/commonjs/models/completionerror.js.map +1 -0
- package/dist/commonjs/models/completionfinishreason.d.ts +31 -0
- package/dist/commonjs/models/completionfinishreason.d.ts.map +1 -0
- package/dist/commonjs/models/completionfinishreason.js +61 -0
- package/dist/commonjs/models/completionfinishreason.js.map +1 -0
- package/dist/commonjs/models/completionlogprobs.d.ts +39 -0
- package/dist/commonjs/models/completionlogprobs.d.ts.map +1 -0
- package/dist/commonjs/models/completionlogprobs.js +88 -0
- package/dist/commonjs/models/completionlogprobs.js.map +1 -0
- package/dist/commonjs/models/completionresponse.d.ts +43 -0
- package/dist/commonjs/models/completionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/completionresponse.js +92 -0
- package/dist/commonjs/models/completionresponse.js.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts +37 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.js +86 -0
- package/dist/commonjs/models/completionstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js +130 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/completionusage.d.ts +33 -0
- package/dist/commonjs/models/completionusage.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletionerror.js → completionusage.js} +36 -25
- package/dist/commonjs/models/completionusage.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +8 -38
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +14 -51
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- 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/{chatcompletionerror.js → chaterror.js} +17 -17
- package/dist/commonjs/models/errors/chaterror.js.map +1 -0
- package/dist/commonjs/models/errors/completionerror.d.ts +37 -0
- package/dist/commonjs/models/errors/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/completionerror.js +85 -0
- package/dist/commonjs/models/errors/completionerror.js.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts +46 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.js +100 -0
- package/dist/commonjs/models/errors/errorresponse.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +3 -1
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +3 -1
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +17 -9
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +17 -9
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/message.d.ts +54 -19
- package/dist/commonjs/models/message.d.ts.map +1 -1
- package/dist/commonjs/models/message.js +73 -22
- package/dist/commonjs/models/message.js.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.js +3 -33
- package/dist/commonjs/models/operations/deletekeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getactivity.d.ts +3 -24
- package/dist/commonjs/models/operations/getactivity.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getactivity.js +3 -32
- package/dist/commonjs/models/operations/getactivity.js.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.js +3 -33
- package/dist/commonjs/models/operations/getauthkey.js.map +1 -1
- package/dist/commonjs/models/operations/getcredits.d.ts +3 -25
- package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcredits.js +3 -33
- package/dist/commonjs/models/operations/getcredits.js.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/commonjs/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.js +3 -33
- package/dist/commonjs/models/operations/getendpointszdr.js.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.d.ts +3 -25
- package/dist/commonjs/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.js +3 -33
- package/dist/commonjs/models/operations/getgeneration.js.map +1 -1
- package/dist/commonjs/models/operations/getkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkey.js +3 -33
- package/dist/commonjs/models/operations/getkey.js.map +1 -1
- package/dist/commonjs/models/operations/getkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeys.js +3 -33
- package/dist/commonjs/models/operations/getkeys.js.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.js +3 -33
- package/dist/commonjs/models/operations/getkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getmodels.d.ts +2 -3
- package/dist/commonjs/models/operations/getmodels.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodels.js +2 -11
- package/dist/commonjs/models/operations/getmodels.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js +3 -33
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.js +3 -33
- package/dist/commonjs/models/operations/getmodelscount.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.js +31 -34
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js +30 -33
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.js +3 -33
- package/dist/commonjs/models/operations/patchkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/postauthkeys.d.ts +110 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.js +145 -0
- package/dist/commonjs/models/operations/postauthkeys.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js +180 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postchatcompletions.js +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.js.map +1 -1
- package/dist/commonjs/models/operations/postcompletions.d.ts +27 -0
- package/dist/commonjs/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postcompletions.js +80 -0
- package/dist/commonjs/models/operations/postcompletions.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.js +30 -33
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.d.ts +3 -25
- package/dist/commonjs/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.js +3 -33
- package/dist/commonjs/models/operations/postembeddings.js.map +1 -1
- package/dist/commonjs/models/operations/postkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/postkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postkeys.js +3 -33
- package/dist/commonjs/models/operations/postkeys.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +2 -4
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +2 -4
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/models/toolresponsemessage.d.ts +55 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/commonjs/models/{toolmessage.js → toolresponsemessage.js} +32 -32
- package/dist/commonjs/models/toolresponsemessage.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/completionsCreate.d.ts +28 -0
- package/dist/commonjs/react-query/completionsCreate.d.ts.map +1 -0
- package/dist/commonjs/react-query/completionsCreate.js +50 -0
- package/dist/commonjs/react-query/completionsCreate.js.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.js +69 -0
- package/dist/commonjs/react-query/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +13 -13
- package/dist/commonjs/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +9 -6
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +9 -6
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/react-query/modelsGetModelsUser.js +8 -8
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts +23 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.js +69 -0
- package/dist/commonjs/react-query/providersGetProviders.js.map +1 -0
- package/dist/commonjs/sdk/chat.d.ts +5 -5
- package/dist/commonjs/sdk/chat.d.ts.map +1 -1
- package/dist/commonjs/sdk/chat.js +7 -7
- package/dist/commonjs/sdk/chat.js.map +1 -1
- package/dist/commonjs/sdk/completions.d.ts +17 -0
- package/dist/commonjs/sdk/completions.d.ts.map +1 -0
- package/dist/commonjs/sdk/completions.js +24 -0
- package/dist/commonjs/sdk/completions.js.map +1 -0
- package/dist/commonjs/sdk/credits.d.ts +13 -0
- package/dist/commonjs/sdk/credits.d.ts.map +1 -0
- package/dist/commonjs/sdk/credits.js +26 -0
- package/dist/commonjs/sdk/credits.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +1 -1
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -1
- package/dist/commonjs/sdk/embeddings.js +3 -3
- package/dist/commonjs/sdk/embeddings.js.map +1 -1
- package/dist/commonjs/sdk/model.d.ts +9 -0
- package/dist/commonjs/sdk/model.d.ts.map +1 -0
- package/dist/commonjs/sdk/model.js +19 -0
- package/dist/commonjs/sdk/model.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +1 -1
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +2 -2
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/commonjs/sdk/oauth.d.ts +19 -0
- package/dist/commonjs/sdk/oauth.d.ts.map +1 -0
- package/dist/commonjs/sdk/oauth.js +32 -0
- package/dist/commonjs/sdk/oauth.js.map +1 -0
- package/dist/commonjs/sdk/providers.d.ts +9 -0
- package/dist/commonjs/sdk/providers.d.ts.map +1 -0
- package/dist/commonjs/sdk/providers.js +19 -0
- package/dist/commonjs/sdk/providers.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +16 -14
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +18 -21
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/esm/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.js +8 -3
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.js +8 -3
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/esm/funcs/{chatGenerateResponse.d.ts → chatSend.d.ts} +6 -6
- package/dist/esm/funcs/chatSend.d.ts.map +1 -0
- package/dist/esm/funcs/{chatGenerateResponse.js → chatSend.js} +12 -11
- package/dist/esm/funcs/chatSend.js.map +1 -0
- package/dist/esm/funcs/completionsCreate.d.ts +25 -0
- package/dist/esm/funcs/completionsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/completionsCreate.js +91 -0
- package/dist/esm/funcs/completionsCreate.js.map +1 -0
- package/dist/{commonjs/funcs/getCredits.d.ts → esm/funcs/creditsGetCredits.d.ts} +3 -2
- package/dist/esm/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/funcs/{getCredits.js → creditsGetCredits.js} +10 -5
- package/dist/esm/funcs/creditsGetCredits.js.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/esm/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/{commonjs/funcs/embeddingsPostEmbeddings.d.ts → esm/funcs/embeddingsGenerate.d.ts} +3 -2
- package/dist/esm/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -5
- package/dist/esm/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.js +8 -3
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.d.ts → modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/esm/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModels.js +8 -3
- package/dist/esm/funcs/modelsGetModels.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.js +8 -3
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.js +18 -9
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{commonjs/funcs/getProviders.d.ts → esm/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/esm/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/funcs/{getProviders.js → providersGetProviders.js} +8 -4
- package/dist/esm/funcs/providersGetProviders.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -7
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/env.d.ts +1 -2
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +1 -2
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +1 -7
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/chaterror.d.ts +56 -0
- package/dist/esm/models/chaterror.d.ts.map +1 -0
- package/dist/esm/models/chaterror.js +58 -0
- package/dist/esm/models/chaterror.js.map +1 -0
- package/dist/esm/models/chatgenerationparams.d.ts +108 -108
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/esm/models/chatgenerationparams.js +126 -127
- package/dist/esm/models/chatgenerationparams.js.map +1 -1
- 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/{chatcompletionchunkchoicedelta.js → chatstreamingmessagechunk.js} +17 -19
- 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 +120 -0
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/completionchoice.d.ts +37 -0
- package/dist/esm/models/completionchoice.d.ts.map +1 -0
- package/dist/esm/models/completionchoice.js +48 -0
- package/dist/esm/models/completionchoice.js.map +1 -0
- package/dist/esm/models/completioncreateparams.d.ts +327 -0
- package/dist/esm/models/completioncreateparams.d.ts.map +1 -0
- package/dist/esm/models/completioncreateparams.js +403 -0
- package/dist/esm/models/completioncreateparams.js.map +1 -0
- package/dist/esm/models/completionerror.d.ts +56 -0
- package/dist/esm/models/completionerror.d.ts.map +1 -0
- package/dist/esm/models/completionerror.js +58 -0
- package/dist/esm/models/completionerror.js.map +1 -0
- package/dist/esm/models/completionfinishreason.d.ts +31 -0
- package/dist/esm/models/completionfinishreason.d.ts.map +1 -0
- package/dist/esm/models/completionfinishreason.js +25 -0
- package/dist/esm/models/completionfinishreason.js.map +1 -0
- package/dist/esm/models/completionlogprobs.d.ts +39 -0
- package/dist/esm/models/completionlogprobs.d.ts.map +1 -0
- package/dist/esm/models/completionlogprobs.js +50 -0
- package/dist/esm/models/completionlogprobs.js.map +1 -0
- package/dist/esm/models/completionresponse.d.ts +43 -0
- package/dist/esm/models/completionresponse.d.ts.map +1 -0
- package/dist/esm/models/completionresponse.js +54 -0
- package/dist/esm/models/completionresponse.js.map +1 -0
- package/dist/esm/models/completionstreamingchoice.d.ts +37 -0
- package/dist/esm/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingchoice.js +48 -0
- package/dist/esm/models/completionstreamingchoice.js.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.js +90 -0
- package/dist/esm/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/completionusage.d.ts +33 -0
- package/dist/esm/models/completionusage.d.ts.map +1 -0
- package/dist/esm/models/completionusage.js +48 -0
- package/dist/esm/models/completionusage.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +8 -38
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +13 -48
- package/dist/esm/models/errorresponse.js.map +1 -1
- 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/completionerror.d.ts +37 -0
- package/dist/esm/models/errors/completionerror.d.ts.map +1 -0
- package/dist/esm/models/errors/completionerror.js +48 -0
- package/dist/esm/models/errors/completionerror.js.map +1 -0
- package/dist/esm/models/errors/errorresponse.d.ts +46 -0
- package/dist/esm/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/esm/models/errors/errorresponse.js +63 -0
- package/dist/esm/models/errors/errorresponse.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +3 -1
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +3 -1
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +17 -9
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +17 -9
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/message.d.ts +54 -19
- package/dist/esm/models/message.d.ts.map +1 -1
- package/dist/esm/models/message.js +68 -21
- package/dist/esm/models/message.js.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/esm/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.js +2 -30
- package/dist/esm/models/operations/deletekeyshash.js.map +1 -1
- package/dist/esm/models/operations/getactivity.d.ts +3 -24
- package/dist/esm/models/operations/getactivity.d.ts.map +1 -1
- package/dist/esm/models/operations/getactivity.js +2 -29
- package/dist/esm/models/operations/getactivity.js.map +1 -1
- package/dist/esm/models/operations/getauthkey.d.ts +3 -25
- package/dist/esm/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getauthkey.js +2 -30
- package/dist/esm/models/operations/getauthkey.js.map +1 -1
- package/dist/esm/models/operations/getcredits.d.ts +3 -25
- package/dist/esm/models/operations/getcredits.d.ts.map +1 -1
- package/dist/esm/models/operations/getcredits.js +2 -30
- package/dist/esm/models/operations/getcredits.js.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/esm/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.js +2 -30
- package/dist/esm/models/operations/getendpointszdr.js.map +1 -1
- package/dist/esm/models/operations/getgeneration.d.ts +3 -25
- package/dist/esm/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/esm/models/operations/getgeneration.js +2 -30
- package/dist/esm/models/operations/getgeneration.js.map +1 -1
- package/dist/esm/models/operations/getkey.d.ts +3 -25
- package/dist/esm/models/operations/getkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getkey.js +2 -30
- package/dist/esm/models/operations/getkey.js.map +1 -1
- package/dist/esm/models/operations/getkeys.d.ts +3 -25
- package/dist/esm/models/operations/getkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeys.js +2 -30
- package/dist/esm/models/operations/getkeys.js.map +1 -1
- package/dist/esm/models/operations/getkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeyshash.js +2 -30
- package/dist/esm/models/operations/getkeyshash.js.map +1 -1
- package/dist/esm/models/operations/getmodels.d.ts +2 -3
- package/dist/esm/models/operations/getmodels.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodels.js +2 -11
- package/dist/esm/models/operations/getmodels.js.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js +2 -30
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/esm/models/operations/getmodelscount.d.ts +3 -25
- package/dist/esm/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelscount.js +2 -30
- package/dist/esm/models/operations/getmodelscount.js.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.js +27 -30
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.js +27 -30
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.js +2 -30
- package/dist/esm/models/operations/patchkeyshash.js.map +1 -1
- package/dist/esm/models/operations/postauthkeys.d.ts +110 -0
- package/dist/esm/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeys.js +105 -0
- package/dist/esm/models/operations/postauthkeys.js.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.js +138 -0
- package/dist/esm/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/esm/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/esm/models/operations/postchatcompletions.js +3 -3
- package/dist/esm/models/operations/postchatcompletions.js.map +1 -1
- package/dist/esm/models/operations/postcompletions.d.ts +27 -0
- package/dist/esm/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/esm/models/operations/postcompletions.js +42 -0
- package/dist/esm/models/operations/postcompletions.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.js +27 -30
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/esm/models/operations/postembeddings.d.ts +3 -25
- package/dist/esm/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/esm/models/operations/postembeddings.js +2 -30
- package/dist/esm/models/operations/postembeddings.js.map +1 -1
- package/dist/esm/models/operations/postkeys.d.ts +3 -25
- package/dist/esm/models/operations/postkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/postkeys.js +2 -30
- package/dist/esm/models/operations/postkeys.js.map +1 -1
- package/dist/esm/models/security.d.ts +2 -4
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +2 -4
- package/dist/esm/models/security.js.map +1 -1
- 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/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/completionsCreate.d.ts +28 -0
- package/dist/esm/react-query/completionsCreate.d.ts.map +1 -0
- package/dist/esm/react-query/completionsCreate.js +43 -0
- package/dist/esm/react-query/completionsCreate.js.map +1 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/react-query/{getCredits.js → creditsGetCredits.js} +18 -18
- package/dist/esm/react-query/creditsGetCredits.js.map +1 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +10 -10
- package/dist/esm/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -10
- package/dist/esm/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +9 -6
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +9 -6
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/react-query/modelsGetModelsUser.js +8 -8
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/esm/react-query/providersGetProviders.d.ts +23 -0
- package/dist/esm/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/react-query/providersGetProviders.js +60 -0
- package/dist/esm/react-query/providersGetProviders.js.map +1 -0
- package/dist/esm/sdk/chat.d.ts +5 -5
- package/dist/esm/sdk/chat.d.ts.map +1 -1
- package/dist/esm/sdk/chat.js +5 -5
- package/dist/esm/sdk/chat.js.map +1 -1
- package/dist/esm/sdk/completions.d.ts +17 -0
- package/dist/esm/sdk/completions.d.ts.map +1 -0
- package/dist/esm/sdk/completions.js +19 -0
- package/dist/esm/sdk/completions.js.map +1 -0
- package/dist/esm/sdk/credits.d.ts +13 -0
- package/dist/esm/sdk/credits.d.ts.map +1 -0
- package/dist/esm/sdk/credits.js +22 -0
- package/dist/esm/sdk/credits.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +1 -1
- package/dist/esm/sdk/embeddings.d.ts.map +1 -1
- package/dist/esm/sdk/embeddings.js +3 -3
- package/dist/esm/sdk/embeddings.js.map +1 -1
- package/dist/esm/sdk/model.d.ts +9 -0
- package/dist/esm/sdk/model.d.ts.map +1 -0
- package/dist/esm/sdk/model.js +15 -0
- package/dist/esm/sdk/model.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +1 -1
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +2 -2
- package/dist/esm/sdk/models.js.map +1 -1
- package/dist/esm/sdk/oauth.d.ts +19 -0
- package/dist/esm/sdk/oauth.d.ts.map +1 -0
- package/dist/esm/sdk/oauth.js +28 -0
- package/dist/esm/sdk/oauth.js.map +1 -0
- package/dist/esm/sdk/providers.d.ts +9 -0
- package/dist/esm/sdk/providers.d.ts.map +1 -0
- package/dist/esm/sdk/providers.js +15 -0
- package/dist/esm/sdk/providers.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +16 -14
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +18 -21
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/analytics/README.md +6 -9
- package/docs/sdks/apikeys/README.md +42 -63
- package/docs/sdks/chat/README.md +13 -17
- package/docs/sdks/completions/README.md +96 -0
- package/docs/sdks/credits/README.md +193 -0
- package/docs/sdks/embeddings/README.md +14 -17
- package/docs/sdks/endpoints/README.md +12 -18
- package/docs/sdks/generations/README.md +6 -9
- package/docs/sdks/{parameters → model}/README.md +23 -25
- package/docs/sdks/models/README.md +25 -33
- package/docs/sdks/oauth/README.md +201 -0
- package/docs/sdks/openrouter/README.md +1 -292
- package/docs/sdks/providers/README.md +104 -0
- package/examples/{getCredits.example.ts → analyticsGetActivity.example.ts} +5 -5
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsGetActivity.ts +14 -6
- package/src/funcs/apiKeysDeleteKeysHash.ts +14 -6
- package/src/funcs/apiKeysGetAuthKey.ts +14 -6
- package/src/funcs/apiKeysGetKey.ts +14 -6
- package/src/funcs/apiKeysGetKeys.ts +14 -6
- package/src/funcs/apiKeysGetKeysHash.ts +14 -6
- package/src/funcs/apiKeysPatchKeysHash.ts +14 -6
- package/src/funcs/apiKeysPostKeys.ts +14 -6
- package/src/funcs/{chatGenerateResponse.ts → chatSend.ts} +13 -16
- package/src/funcs/completionsCreate.ts +181 -0
- package/src/funcs/{getCredits.ts → creditsGetCredits.ts} +14 -6
- package/src/funcs/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +27 -10
- package/src/funcs/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +15 -7
- package/src/funcs/endpointsGetEndpointsZdr.ts +14 -6
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +14 -9
- package/src/funcs/generationsGetGeneration.ts +14 -6
- package/src/funcs/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +27 -10
- package/src/funcs/modelsGetModels.ts +14 -6
- package/src/funcs/modelsGetModelsCount.ts +14 -6
- package/src/funcs/modelsGetModelsUser.ts +26 -9
- package/src/funcs/oAuthPostAuthKeys.ts +171 -0
- package/src/funcs/oAuthPostAuthKeysCode.ts +171 -0
- package/src/funcs/{getProviders.ts → providersGetProviders.ts} +7 -3
- package/src/lib/config.ts +3 -7
- package/src/lib/env.ts +2 -4
- package/src/lib/security.ts +1 -8
- package/src/models/chaterror.ts +120 -0
- package/src/models/chatgenerationparams.ts +335 -249
- package/src/models/{chatcompletion.ts → chatresponse.ts} +34 -34
- package/src/models/chatresponsechoice.ts +132 -0
- package/src/models/chatstreamingchoice.ts +132 -0
- package/src/models/{chatcompletionchunkchoicedelta.ts → chatstreamingmessagechunk.ts} +30 -36
- package/src/models/chatstreamingmessagetoolcall.ts +149 -0
- package/src/models/chatstreamingresponsechunk.ts +250 -0
- package/src/models/completionchoice.ts +98 -0
- package/src/models/completioncreateparams.ts +912 -0
- package/src/models/completionerror.ts +128 -0
- package/src/models/completionfinishreason.ts +34 -0
- package/src/models/completionlogprobs.ts +91 -0
- package/src/models/completionresponse.ts +111 -0
- package/src/models/completionstreamingchoice.ts +98 -0
- package/src/models/completionstreamingresponsechunk.ts +186 -0
- package/src/models/completionusage.ts +85 -0
- package/src/models/errorresponse.ts +14 -85
- package/src/models/errors/chaterror.ts +79 -0
- package/src/models/errors/completionerror.ts +79 -0
- package/src/models/errors/errorresponse.ts +102 -0
- package/src/models/errors/index.ts +3 -1
- package/src/models/index.ts +17 -9
- package/src/models/message.ts +151 -49
- package/src/models/operations/deletekeyshash.ts +7 -68
- package/src/models/operations/getactivity.ts +7 -67
- package/src/models/operations/getauthkey.ts +7 -66
- package/src/models/operations/getcredits.ts +7 -66
- package/src/models/operations/getendpointszdr.ts +7 -70
- package/src/models/operations/getgeneration.ts +7 -68
- package/src/models/operations/getkey.ts +7 -66
- package/src/models/operations/getkeys.ts +7 -66
- package/src/models/operations/getkeyshash.ts +7 -68
- package/src/models/operations/getmodels.ts +3 -16
- package/src/models/operations/getmodelsauthorslugendpoints.ts +7 -79
- package/src/models/operations/getmodelscount.ts +7 -68
- package/src/models/operations/getmodelsuser.ts +64 -67
- package/src/models/operations/getparametersauthorslug.ts +66 -72
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/patchkeyshash.ts +7 -68
- package/src/models/operations/postauthkeys.ts +211 -0
- package/src/models/operations/postauthkeyscode.ts +289 -0
- package/src/models/operations/postchatcompletions.ts +8 -6
- package/src/models/operations/postcompletions.ts +78 -0
- package/src/models/operations/postcreditscoinbase.ts +66 -69
- package/src/models/operations/postembeddings.ts +7 -68
- package/src/models/operations/postkeys.ts +7 -66
- package/src/models/security.ts +4 -8
- package/src/models/toolresponsemessage.ts +144 -0
- package/src/react-query/{chatGenerateResponse.ts → chatSend.ts} +20 -30
- package/src/react-query/completionsCreate.ts +94 -0
- package/src/react-query/{getCredits.ts → creditsGetCredits.ts} +29 -27
- package/src/react-query/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +21 -18
- package/src/react-query/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +18 -19
- package/src/react-query/index.ts +9 -6
- package/src/react-query/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +37 -34
- package/src/react-query/modelsGetModelsUser.ts +8 -0
- package/src/react-query/oAuthPostAuthKeys.ts +88 -0
- package/src/react-query/oAuthPostAuthKeysCode.ts +89 -0
- package/src/react-query/{getProviders.ts → providersGetProviders.ts} +35 -27
- package/src/sdk/chat.ts +6 -11
- package/src/sdk/completions.ts +33 -0
- package/src/sdk/credits.ts +39 -0
- package/src/sdk/embeddings.ts +3 -3
- package/src/sdk/{parameters.ts → model.ts} +5 -3
- package/src/sdk/models.ts +2 -0
- package/src/sdk/oauth.ts +45 -0
- package/src/sdk/providers.ts +22 -0
- package/src/sdk/sdk.ts +27 -43
- package/dist/commonjs/funcs/chatGenerateResponse.d.ts.map +0 -1
- package/dist/commonjs/funcs/chatGenerateResponse.js.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/funcs/getCredits.d.ts.map +0 -1
- package/dist/commonjs/funcs/getCredits.js.map +0 -1
- package/dist/commonjs/funcs/getProviders.d.ts.map +0 -1
- package/dist/commonjs/funcs/getProviders.js.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/models/chatcompletion.d.ts +0 -43
- package/dist/commonjs/models/chatcompletion.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletion.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchoice.d.ts +0 -72
- package/dist/commonjs/models/chatcompletionchoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchoice.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunk.d.ts +0 -68
- package/dist/commonjs/models/chatcompletionchunk.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunk.js +0 -131
- package/dist/commonjs/models/chatcompletionchunk.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts +0 -72
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoice.js +0 -108
- package/dist/commonjs/models/chatcompletionchunkchoice.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts +0 -61
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts +0 -62
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js +0 -104
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js.map +0 -1
- package/dist/commonjs/models/chatcompletionerror.d.ts +0 -35
- package/dist/commonjs/models/chatcompletionerror.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionerror.js.map +0 -1
- package/dist/commonjs/models/chatcompletionmessage.d.ts +0 -62
- package/dist/commonjs/models/chatcompletionmessage.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionmessage.js +0 -113
- package/dist/commonjs/models/chatcompletionmessage.js.map +0 -1
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts +0 -37
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts.map +0 -1
- package/dist/commonjs/models/errors/chatcompletionerror.js.map +0 -1
- package/dist/commonjs/models/toolmessage.d.ts +0 -55
- package/dist/commonjs/models/toolmessage.d.ts.map +0 -1
- package/dist/commonjs/models/toolmessage.js.map +0 -1
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts +0 -28
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts.map +0 -1
- package/dist/commonjs/react-query/chatGenerateResponse.js +0 -50
- package/dist/commonjs/react-query/chatGenerateResponse.js.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/react-query/getCredits.d.ts +0 -23
- package/dist/commonjs/react-query/getCredits.d.ts.map +0 -1
- package/dist/commonjs/react-query/getCredits.js +0 -69
- package/dist/commonjs/react-query/getCredits.js.map +0 -1
- package/dist/commonjs/react-query/getProviders.d.ts +0 -17
- package/dist/commonjs/react-query/getProviders.d.ts.map +0 -1
- package/dist/commonjs/react-query/getProviders.js +0 -63
- package/dist/commonjs/react-query/getProviders.js.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +0 -88
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.js +0 -44
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/sdk/parameters.d.ts +0 -9
- package/dist/commonjs/sdk/parameters.d.ts.map +0 -1
- package/dist/commonjs/sdk/parameters.js +0 -19
- package/dist/commonjs/sdk/parameters.js.map +0 -1
- package/dist/esm/funcs/chatGenerateResponse.d.ts.map +0 -1
- package/dist/esm/funcs/chatGenerateResponse.js.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/funcs/getCredits.d.ts.map +0 -1
- package/dist/esm/funcs/getCredits.js.map +0 -1
- package/dist/esm/funcs/getProviders.d.ts.map +0 -1
- package/dist/esm/funcs/getProviders.js.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/models/chatcompletion.d.ts +0 -43
- package/dist/esm/models/chatcompletion.d.ts.map +0 -1
- package/dist/esm/models/chatcompletion.js +0 -54
- package/dist/esm/models/chatcompletion.js.map +0 -1
- package/dist/esm/models/chatcompletionchoice.d.ts +0 -72
- package/dist/esm/models/chatcompletionchoice.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchoice.js +0 -70
- package/dist/esm/models/chatcompletionchoice.js.map +0 -1
- package/dist/esm/models/chatcompletionchunk.d.ts +0 -68
- package/dist/esm/models/chatcompletionchunk.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunk.js +0 -91
- package/dist/esm/models/chatcompletionchunk.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoice.d.ts +0 -72
- package/dist/esm/models/chatcompletionchunkchoice.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoice.js +0 -70
- package/dist/esm/models/chatcompletionchunkchoice.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts +0 -61
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedelta.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts +0 -62
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js +0 -64
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js.map +0 -1
- package/dist/esm/models/chatcompletionerror.d.ts +0 -35
- package/dist/esm/models/chatcompletionerror.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionerror.js +0 -37
- package/dist/esm/models/chatcompletionerror.js.map +0 -1
- package/dist/esm/models/chatcompletionmessage.d.ts +0 -62
- package/dist/esm/models/chatcompletionmessage.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionmessage.js +0 -73
- package/dist/esm/models/chatcompletionmessage.js.map +0 -1
- package/dist/esm/models/errors/chatcompletionerror.d.ts +0 -37
- package/dist/esm/models/errors/chatcompletionerror.d.ts.map +0 -1
- package/dist/esm/models/errors/chatcompletionerror.js +0 -48
- package/dist/esm/models/errors/chatcompletionerror.js.map +0 -1
- package/dist/esm/models/toolmessage.d.ts +0 -55
- package/dist/esm/models/toolmessage.d.ts.map +0 -1
- package/dist/esm/models/toolmessage.js +0 -69
- package/dist/esm/models/toolmessage.js.map +0 -1
- package/dist/esm/react-query/chatGenerateResponse.d.ts +0 -28
- package/dist/esm/react-query/chatGenerateResponse.d.ts.map +0 -1
- package/dist/esm/react-query/chatGenerateResponse.js +0 -43
- package/dist/esm/react-query/chatGenerateResponse.js.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/react-query/getCredits.d.ts +0 -23
- package/dist/esm/react-query/getCredits.d.ts.map +0 -1
- package/dist/esm/react-query/getCredits.js.map +0 -1
- package/dist/esm/react-query/getProviders.d.ts +0 -17
- package/dist/esm/react-query/getProviders.d.ts.map +0 -1
- package/dist/esm/react-query/getProviders.js +0 -54
- package/dist/esm/react-query/getProviders.js.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +0 -78
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/sdk/parameters.d.ts +0 -9
- package/dist/esm/sdk/parameters.d.ts.map +0 -1
- package/dist/esm/sdk/parameters.js +0 -15
- package/dist/esm/sdk/parameters.js.map +0 -1
- package/src/models/chatcompletionchoice.ts +0 -132
- package/src/models/chatcompletionchunk.ts +0 -169
- package/src/models/chatcompletionchunkchoice.ts +0 -139
- package/src/models/chatcompletionchunkchoicedeltatoolcall.ts +0 -166
- package/src/models/chatcompletionerror.ts +0 -78
- package/src/models/chatcompletionmessage.ts +0 -167
- package/src/models/errors/chatcompletionerror.ts +0 -79
- package/src/models/toolmessage.ts +0 -140
|
@@ -2,300 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
OpenRouter API: OpenAI-compatible Chat Completions API with additional OpenRouter features
|
|
5
|
+
OpenRouter API: OpenAI-compatible Chat Completions and Completions API with additional OpenRouter features
|
|
6
6
|
|
|
7
7
|
OpenRouter Documentation
|
|
8
8
|
<https://openrouter.ai/docs>
|
|
9
9
|
|
|
10
10
|
### Available Operations
|
|
11
|
-
|
|
12
|
-
* [getCredits](#getcredits) - Get total credits purchased and used for the authenticated user
|
|
13
|
-
* [postCreditsCoinbase](#postcreditscoinbase) - Create a Coinbase charge for crypto payment
|
|
14
|
-
* [getProviders](#getproviders)
|
|
15
|
-
|
|
16
|
-
## getCredits
|
|
17
|
-
|
|
18
|
-
Get total credits purchased and used for the authenticated user
|
|
19
|
-
|
|
20
|
-
### Example Usage
|
|
21
|
-
|
|
22
|
-
<!-- UsageSnippet language="typescript" operationID="get_/credits" method="get" path="/credits" -->
|
|
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.getCredits();
|
|
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 { getCredits } from "@openrouter/sdk/funcs/getCredits.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 getCredits(openRouter);
|
|
59
|
-
if (res.ok) {
|
|
60
|
-
const { value: result } = res;
|
|
61
|
-
console.log(result);
|
|
62
|
-
} else {
|
|
63
|
-
console.log("getCredits 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
|
-
useGetCredits,
|
|
84
|
-
useGetCreditsSuspense,
|
|
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
|
-
prefetchGetCredits,
|
|
90
|
-
|
|
91
|
-
// Utility to invalidate the query cache for this query in response to
|
|
92
|
-
// mutations and other user actions.
|
|
93
|
-
invalidateAllGetCredits,
|
|
94
|
-
} from "@openrouter/sdk/react-query/getCredits.js";
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Parameters
|
|
98
|
-
|
|
99
|
-
| Parameter | Type | Required | Description |
|
|
100
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
101
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
102
|
-
| `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. |
|
|
103
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
104
|
-
|
|
105
|
-
### Response
|
|
106
|
-
|
|
107
|
-
**Promise\<[operations.GetCreditsResponse](../../models/operations/getcreditsresponse.md)\>**
|
|
108
|
-
|
|
109
|
-
### Errors
|
|
110
|
-
|
|
111
|
-
| Error Type | Status Code | Content Type |
|
|
112
|
-
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
113
|
-
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
114
|
-
|
|
115
|
-
## postCreditsCoinbase
|
|
116
|
-
|
|
117
|
-
Create a Coinbase charge for crypto payment
|
|
118
|
-
|
|
119
|
-
### Example Usage
|
|
120
|
-
|
|
121
|
-
<!-- UsageSnippet language="typescript" operationID="post_/credits/coinbase" method="post" path="/credits/coinbase" -->
|
|
122
|
-
```typescript
|
|
123
|
-
import { OpenRouter } from "@openrouter/sdk";
|
|
124
|
-
|
|
125
|
-
const openRouter = new OpenRouter({
|
|
126
|
-
security: {
|
|
127
|
-
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
128
|
-
},
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
async function run() {
|
|
132
|
-
const result = await openRouter.postCreditsCoinbase();
|
|
133
|
-
|
|
134
|
-
console.log(result);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
run();
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Standalone function
|
|
141
|
-
|
|
142
|
-
The standalone function version of this method:
|
|
143
|
-
|
|
144
|
-
```typescript
|
|
145
|
-
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
146
|
-
import { postCreditsCoinbase } from "@openrouter/sdk/funcs/postCreditsCoinbase.js";
|
|
147
|
-
|
|
148
|
-
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
149
|
-
// You can create one instance of it to use across an application.
|
|
150
|
-
const openRouter = new OpenRouterCore({
|
|
151
|
-
security: {
|
|
152
|
-
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
async function run() {
|
|
157
|
-
const res = await postCreditsCoinbase(openRouter);
|
|
158
|
-
if (res.ok) {
|
|
159
|
-
const { value: result } = res;
|
|
160
|
-
console.log(result);
|
|
161
|
-
} else {
|
|
162
|
-
console.log("postCreditsCoinbase failed:", res.error);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
run();
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### React hooks and utilities
|
|
170
|
-
|
|
171
|
-
This method can be used in React components through the following hooks and
|
|
172
|
-
associated utilities.
|
|
173
|
-
|
|
174
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
175
|
-
> below and how to get started using React hooks.
|
|
176
|
-
|
|
177
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
178
|
-
|
|
179
|
-
```tsx
|
|
180
|
-
import {
|
|
181
|
-
// Mutation hook for triggering the API call.
|
|
182
|
-
usePostCreditsCoinbaseMutation
|
|
183
|
-
} from "@openrouter/sdk/react-query/postCreditsCoinbase.js";
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Parameters
|
|
187
|
-
|
|
188
|
-
| Parameter | Type | Required | Description |
|
|
189
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
190
|
-
| `request` | [operations.PostCreditsCoinbaseRequest](../../models/operations/postcreditscoinbaserequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
191
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
192
|
-
| `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. |
|
|
193
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
194
|
-
|
|
195
|
-
### Response
|
|
196
|
-
|
|
197
|
-
**Promise\<[operations.PostCreditsCoinbaseResponse](../../models/operations/postcreditscoinbaseresponse.md)\>**
|
|
198
|
-
|
|
199
|
-
### Errors
|
|
200
|
-
|
|
201
|
-
| Error Type | Status Code | Content Type |
|
|
202
|
-
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
203
|
-
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
204
|
-
|
|
205
|
-
## getProviders
|
|
206
|
-
|
|
207
|
-
### Example Usage
|
|
208
|
-
|
|
209
|
-
<!-- UsageSnippet language="typescript" operationID="get_/providers" method="get" path="/providers" -->
|
|
210
|
-
```typescript
|
|
211
|
-
import { OpenRouter } from "@openrouter/sdk";
|
|
212
|
-
|
|
213
|
-
const openRouter = new OpenRouter({
|
|
214
|
-
security: {
|
|
215
|
-
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
async function run() {
|
|
220
|
-
const result = await openRouter.getProviders();
|
|
221
|
-
|
|
222
|
-
console.log(result);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
run();
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Standalone function
|
|
229
|
-
|
|
230
|
-
The standalone function version of this method:
|
|
231
|
-
|
|
232
|
-
```typescript
|
|
233
|
-
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
234
|
-
import { getProviders } from "@openrouter/sdk/funcs/getProviders.js";
|
|
235
|
-
|
|
236
|
-
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
237
|
-
// You can create one instance of it to use across an application.
|
|
238
|
-
const openRouter = new OpenRouterCore({
|
|
239
|
-
security: {
|
|
240
|
-
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
241
|
-
},
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
async function run() {
|
|
245
|
-
const res = await getProviders(openRouter);
|
|
246
|
-
if (res.ok) {
|
|
247
|
-
const { value: result } = res;
|
|
248
|
-
console.log(result);
|
|
249
|
-
} else {
|
|
250
|
-
console.log("getProviders failed:", res.error);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
run();
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### React hooks and utilities
|
|
258
|
-
|
|
259
|
-
This method can be used in React components through the following hooks and
|
|
260
|
-
associated utilities.
|
|
261
|
-
|
|
262
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
263
|
-
> below and how to get started using React hooks.
|
|
264
|
-
|
|
265
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
266
|
-
|
|
267
|
-
```tsx
|
|
268
|
-
import {
|
|
269
|
-
// Query hooks for fetching data.
|
|
270
|
-
useGetProviders,
|
|
271
|
-
useGetProvidersSuspense,
|
|
272
|
-
|
|
273
|
-
// Utility for prefetching data during server-side rendering and in React
|
|
274
|
-
// Server Components that will be immediately available to client components
|
|
275
|
-
// using the hooks.
|
|
276
|
-
prefetchGetProviders,
|
|
277
|
-
|
|
278
|
-
// Utility to invalidate the query cache for this query in response to
|
|
279
|
-
// mutations and other user actions.
|
|
280
|
-
invalidateAllGetProviders,
|
|
281
|
-
} from "@openrouter/sdk/react-query/getProviders.js";
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### Parameters
|
|
285
|
-
|
|
286
|
-
| Parameter | Type | Required | Description |
|
|
287
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
288
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
289
|
-
| `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. |
|
|
290
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
291
|
-
|
|
292
|
-
### Response
|
|
293
|
-
|
|
294
|
-
**Promise\<[operations.GetProvidersResponse](../../models/operations/getprovidersresponse.md)\>**
|
|
295
|
-
|
|
296
|
-
### Errors
|
|
297
|
-
|
|
298
|
-
| Error Type | Status Code | Content Type |
|
|
299
|
-
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
300
|
-
| errors.InternalServerError | 500 | application/json |
|
|
301
|
-
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Providers
|
|
2
|
+
(*providers*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [getProviders](#getproviders) - List all available model providers
|
|
9
|
+
|
|
10
|
+
## getProviders
|
|
11
|
+
|
|
12
|
+
List all available model providers
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
<!-- UsageSnippet language="typescript" operationID="get_/providers" method="get" path="/providers" -->
|
|
17
|
+
```typescript
|
|
18
|
+
import { OpenRouter } from "@openrouter/sdk";
|
|
19
|
+
|
|
20
|
+
const openRouter = new OpenRouter({
|
|
21
|
+
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
async function run() {
|
|
25
|
+
const result = await openRouter.providers.getProviders();
|
|
26
|
+
|
|
27
|
+
console.log(result);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
run();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Standalone function
|
|
34
|
+
|
|
35
|
+
The standalone function version of this method:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { OpenRouterCore } from "@openrouter/sdk/core.js";
|
|
39
|
+
import { providersGetProviders } from "@openrouter/sdk/funcs/providersGetProviders.js";
|
|
40
|
+
|
|
41
|
+
// Use `OpenRouterCore` for best tree-shaking performance.
|
|
42
|
+
// You can create one instance of it to use across an application.
|
|
43
|
+
const openRouter = new OpenRouterCore({
|
|
44
|
+
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
async function run() {
|
|
48
|
+
const res = await providersGetProviders(openRouter);
|
|
49
|
+
if (res.ok) {
|
|
50
|
+
const { value: result } = res;
|
|
51
|
+
console.log(result);
|
|
52
|
+
} else {
|
|
53
|
+
console.log("providersGetProviders failed:", res.error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
run();
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### React hooks and utilities
|
|
61
|
+
|
|
62
|
+
This method can be used in React components through the following hooks and
|
|
63
|
+
associated utilities.
|
|
64
|
+
|
|
65
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
66
|
+
> below and how to get started using React hooks.
|
|
67
|
+
|
|
68
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import {
|
|
72
|
+
// Query hooks for fetching data.
|
|
73
|
+
useProvidersGetProviders,
|
|
74
|
+
useProvidersGetProvidersSuspense,
|
|
75
|
+
|
|
76
|
+
// Utility for prefetching data during server-side rendering and in React
|
|
77
|
+
// Server Components that will be immediately available to client components
|
|
78
|
+
// using the hooks.
|
|
79
|
+
prefetchProvidersGetProviders,
|
|
80
|
+
|
|
81
|
+
// Utility to invalidate the query cache for this query in response to
|
|
82
|
+
// mutations and other user actions.
|
|
83
|
+
invalidateAllProvidersGetProviders,
|
|
84
|
+
} from "@openrouter/sdk/react-query/providersGetProviders.js";
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Parameters
|
|
88
|
+
|
|
89
|
+
| Parameter | Type | Required | Description |
|
|
90
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
91
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
92
|
+
| `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. |
|
|
93
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
94
|
+
|
|
95
|
+
### Response
|
|
96
|
+
|
|
97
|
+
**Promise\<[operations.GetProvidersResponse](../../models/operations/getprovidersresponse.md)\>**
|
|
98
|
+
|
|
99
|
+
### Errors
|
|
100
|
+
|
|
101
|
+
| Error Type | Status Code | Content Type |
|
|
102
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
103
|
+
| errors.InternalServerError | 500 | application/json |
|
|
104
|
+
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
|
|
@@ -8,19 +8,19 @@ dotenv.config();
|
|
|
8
8
|
* Example usage of the @openrouter/sdk SDK
|
|
9
9
|
*
|
|
10
10
|
* To run this example from the examples directory:
|
|
11
|
-
* npm run build && npx tsx
|
|
11
|
+
* npm run build && npx tsx analyticsGetActivity.example.ts
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { OpenRouter } from "@openrouter/sdk";
|
|
15
15
|
|
|
16
16
|
const openRouter = new OpenRouter({
|
|
17
|
-
|
|
18
|
-
apiKeyAuth: process.env["OPENROUTER_API_KEY_AUTH"] ?? "",
|
|
19
|
-
},
|
|
17
|
+
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
|
|
20
18
|
});
|
|
21
19
|
|
|
22
20
|
async function main() {
|
|
23
|
-
const result = await openRouter.
|
|
21
|
+
const result = await openRouter.analytics.getActivity({
|
|
22
|
+
date: "2025-08-24",
|
|
23
|
+
});
|
|
24
24
|
|
|
25
25
|
console.log(result);
|
|
26
26
|
}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
RequestTimeoutError,
|
|
18
18
|
UnexpectedClientError,
|
|
19
19
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
20
21
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
21
22
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -37,6 +38,7 @@ export function analyticsGetActivity(
|
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
40
|
operations.GetActivityResponse,
|
|
41
|
+
| errors.ErrorResponse
|
|
40
42
|
| OpenRouterError
|
|
41
43
|
| ResponseValidationError
|
|
42
44
|
| ConnectionError
|
|
@@ -62,6 +64,7 @@ async function $do(
|
|
|
62
64
|
[
|
|
63
65
|
Result<
|
|
64
66
|
operations.GetActivityResponse,
|
|
67
|
+
| errors.ErrorResponse
|
|
65
68
|
| OpenRouterError
|
|
66
69
|
| ResponseValidationError
|
|
67
70
|
| ConnectionError
|
|
@@ -96,7 +99,8 @@ async function $do(
|
|
|
96
99
|
Accept: "application/json",
|
|
97
100
|
}));
|
|
98
101
|
|
|
99
|
-
const
|
|
102
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
103
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
100
104
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
105
|
|
|
102
106
|
const context = {
|
|
@@ -107,7 +111,7 @@ async function $do(
|
|
|
107
111
|
|
|
108
112
|
resolvedSecurity: requestSecurity,
|
|
109
113
|
|
|
110
|
-
securitySource: client._options.
|
|
114
|
+
securitySource: client._options.apiKey,
|
|
111
115
|
retryConfig: options?.retries
|
|
112
116
|
|| client._options.retryConfig
|
|
113
117
|
|| { strategy: "none" },
|
|
@@ -141,8 +145,13 @@ async function $do(
|
|
|
141
145
|
}
|
|
142
146
|
const response = doResult.value;
|
|
143
147
|
|
|
148
|
+
const responseFields = {
|
|
149
|
+
HttpMeta: { Response: response, Request: req },
|
|
150
|
+
};
|
|
151
|
+
|
|
144
152
|
const [result] = await M.match<
|
|
145
153
|
operations.GetActivityResponse,
|
|
154
|
+
| errors.ErrorResponse
|
|
146
155
|
| OpenRouterError
|
|
147
156
|
| ResponseValidationError
|
|
148
157
|
| ConnectionError
|
|
@@ -153,10 +162,9 @@ async function $do(
|
|
|
153
162
|
| SDKValidationError
|
|
154
163
|
>(
|
|
155
164
|
M.json(200, operations.GetActivityResponse$inboundSchema),
|
|
156
|
-
M.
|
|
157
|
-
M.
|
|
158
|
-
|
|
159
|
-
)(response, req);
|
|
165
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
166
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
167
|
+
)(response, req, { extraFields: responseFields });
|
|
160
168
|
if (!result.ok) {
|
|
161
169
|
return [result, { status: "complete", request: req, response }];
|
|
162
170
|
}
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
RequestTimeoutError,
|
|
18
18
|
UnexpectedClientError,
|
|
19
19
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
20
21
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
21
22
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -34,6 +35,7 @@ export function apiKeysDeleteKeysHash(
|
|
|
34
35
|
): APIPromise<
|
|
35
36
|
Result<
|
|
36
37
|
operations.DeleteKeysHashResponse,
|
|
38
|
+
| errors.ErrorResponse
|
|
37
39
|
| OpenRouterError
|
|
38
40
|
| ResponseValidationError
|
|
39
41
|
| ConnectionError
|
|
@@ -59,6 +61,7 @@ async function $do(
|
|
|
59
61
|
[
|
|
60
62
|
Result<
|
|
61
63
|
operations.DeleteKeysHashResponse,
|
|
64
|
+
| errors.ErrorResponse
|
|
62
65
|
| OpenRouterError
|
|
63
66
|
| ResponseValidationError
|
|
64
67
|
| ConnectionError
|
|
@@ -95,7 +98,8 @@ async function $do(
|
|
|
95
98
|
Accept: "application/json",
|
|
96
99
|
}));
|
|
97
100
|
|
|
98
|
-
const
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
99
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
104
|
|
|
101
105
|
const context = {
|
|
@@ -106,7 +110,7 @@ async function $do(
|
|
|
106
110
|
|
|
107
111
|
resolvedSecurity: requestSecurity,
|
|
108
112
|
|
|
109
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
110
114
|
retryConfig: options?.retries
|
|
111
115
|
|| client._options.retryConfig
|
|
112
116
|
|| { strategy: "none" },
|
|
@@ -139,8 +143,13 @@ async function $do(
|
|
|
139
143
|
}
|
|
140
144
|
const response = doResult.value;
|
|
141
145
|
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
142
150
|
const [result] = await M.match<
|
|
143
151
|
operations.DeleteKeysHashResponse,
|
|
152
|
+
| errors.ErrorResponse
|
|
144
153
|
| OpenRouterError
|
|
145
154
|
| ResponseValidationError
|
|
146
155
|
| ConnectionError
|
|
@@ -151,10 +160,9 @@ async function $do(
|
|
|
151
160
|
| SDKValidationError
|
|
152
161
|
>(
|
|
153
162
|
M.json(200, operations.DeleteKeysHashResponse$inboundSchema),
|
|
154
|
-
M.
|
|
155
|
-
M.
|
|
156
|
-
|
|
157
|
-
)(response, req);
|
|
163
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
164
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
158
166
|
if (!result.ok) {
|
|
159
167
|
return [result, { status: "complete", request: req, response }];
|
|
160
168
|
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RequestTimeoutError,
|
|
16
16
|
UnexpectedClientError,
|
|
17
17
|
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
18
19
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
19
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -34,6 +35,7 @@ export function apiKeysGetAuthKey(
|
|
|
34
35
|
): APIPromise<
|
|
35
36
|
Result<
|
|
36
37
|
operations.GetAuthKeyResponse,
|
|
38
|
+
| errors.ErrorResponse
|
|
37
39
|
| OpenRouterError
|
|
38
40
|
| ResponseValidationError
|
|
39
41
|
| ConnectionError
|
|
@@ -57,6 +59,7 @@ async function $do(
|
|
|
57
59
|
[
|
|
58
60
|
Result<
|
|
59
61
|
operations.GetAuthKeyResponse,
|
|
62
|
+
| errors.ErrorResponse
|
|
60
63
|
| OpenRouterError
|
|
61
64
|
| ResponseValidationError
|
|
62
65
|
| ConnectionError
|
|
@@ -75,7 +78,8 @@ async function $do(
|
|
|
75
78
|
Accept: "application/json",
|
|
76
79
|
}));
|
|
77
80
|
|
|
78
|
-
const
|
|
81
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
82
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
79
83
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
84
|
|
|
81
85
|
const context = {
|
|
@@ -86,7 +90,7 @@ async function $do(
|
|
|
86
90
|
|
|
87
91
|
resolvedSecurity: requestSecurity,
|
|
88
92
|
|
|
89
|
-
securitySource: client._options.
|
|
93
|
+
securitySource: client._options.apiKey,
|
|
90
94
|
retryConfig: options?.retries
|
|
91
95
|
|| client._options.retryConfig
|
|
92
96
|
|| { strategy: "none" },
|
|
@@ -118,8 +122,13 @@ async function $do(
|
|
|
118
122
|
}
|
|
119
123
|
const response = doResult.value;
|
|
120
124
|
|
|
125
|
+
const responseFields = {
|
|
126
|
+
HttpMeta: { Response: response, Request: req },
|
|
127
|
+
};
|
|
128
|
+
|
|
121
129
|
const [result] = await M.match<
|
|
122
130
|
operations.GetAuthKeyResponse,
|
|
131
|
+
| errors.ErrorResponse
|
|
123
132
|
| OpenRouterError
|
|
124
133
|
| ResponseValidationError
|
|
125
134
|
| ConnectionError
|
|
@@ -130,10 +139,9 @@ async function $do(
|
|
|
130
139
|
| SDKValidationError
|
|
131
140
|
>(
|
|
132
141
|
M.json(200, operations.GetAuthKeyResponse$inboundSchema),
|
|
133
|
-
M.
|
|
134
|
-
M.
|
|
135
|
-
|
|
136
|
-
)(response, req);
|
|
142
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
143
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
144
|
+
)(response, req, { extraFields: responseFields });
|
|
137
145
|
if (!result.ok) {
|
|
138
146
|
return [result, { status: "complete", request: req, response }];
|
|
139
147
|
}
|