API & SDKs
RESTful API
PluginLab has a RESTful API that makes it possible for developers to interact with their member's data. Thanks to this API you can manage your members and do some daily operations such as fetching users, updating them and more. Authenticating your requests The first thing to use the Admin API is to authenticate your requests. To do so,PopularPython SDK
Python SDK Altough it's possible to rebuild your own SDK by using our PluginLab RESTful API, if you're using Python as a backend technology it will be much simpler to use our Python SDK. To use our Python SDK, follow the instuctions below or directly go to our Github Repository. Install Getting started Get started by initializing the Pluginlab appSome readersNodeJS SDK
NodeJS SDK Altough it's possible to rebuild your own SDK by using our PluginLab RESTful API, if you're using NodeJS as a backend technology it will be much simpler to use our NodeJS SDK. To use our NodeJS SDK, follow the instuctions below or directly go to our NPM Repository. Installation Getting started To get started you have to init the PlSome readers
General
How do I get the user id from the API calls?
It's a great time to remind how PluginLab works. PluginLab acts as a proxy layer between your backend API and ChatGPT. This allows us to proceed with various checks, track your events, proviSome readersUnderstanding PluginLab ID Token
Validate ID Tokens Everytime PluginLab communicates with your backend, we attach an Authorization header that contains an ID token for the associated user. Example: The ID token is an assymetric JWT that contains the user id (uid) and that you can verify using the following public key: https://auth.pluginlab.ai/admin/v1/cert Once decoded, the payloFew readersVerifying ID Tokens
Long story short Everytime PluginLab communicates with your backend, we attach an Authorization header that contains an ID token for the associated user. Example: The ID token is an assymetric JWT that contains the user id (uid) plus many other info and that you can verify using the following public key: https://auth.pluginlab.ai/admin/v1/cert OnceFew readers
PluginLab Proxy Features
Exclude a request from the user's usage count.
Sometimes you don't want some requests to be counted as part of your user's usage. You can easily achieve this by adding the following header in your request response headers: X-PluginLab-Ignore-Quota. Every response from your API that contains this header will not be counted as part of the user's usage.Few readersRedact query and body parameters in the request
Sometimes you don't want the query and the body content to be logged-in PluginLab. This is the case for example if you ask your user to send some private or secret data from ChatGPT. For this usecase you can use the following response headers : X-PluginLab-Redact-Body X-PluginLab-Redact-Query If once of this header is present in the response returned by your API, the body or the query parameter will not be saved by PluginLab respectively.Few readers