The CustomGPT Python API SDK offers users access to the number one RAG system's REST API from any Python application. The library offers both synchronous and asynchronous clients, as well as definitions for all request params and response fields.
The full documentation can be found online at https://docs.customgpt.ai/reference/i-api-homepage
from customgpt_client import CustomGPT
CustomGPT.api_key="SuperSecretToken"
Now you can access all of our models. An example request will look like this:
response = CustomGPT.Project.create(project_name='Test', sitemap_path='https://example.com/test.xml', file_data_retension=False, file=file)
project_id = response.data.id
response = await CustomGPT.Project.acreate(project_name='Test', sitemap_path='https://example.com/test.xml', file_data_retension=False, file=file)
project_id = response.data.id
Fill your credentials in customgpt_client/tests/credentials.py in base_url and api_key
def credentials():
return (base_url, api_key)