Quickstart Guide

Getting started with CustomGPT's API is quick and easy.

👍

TL;DR: Don't like reading documentation? Jump straight into our cookbooks on GitHub.

This quickstart guide aims to facilitate the process of getting you prepared for your first API call. If you are looking for our application, visit https://app.customgpt.ai/


Step 1: Create an Account or Log In

To use the CustomGPT website and API, you'll need to sign up for an account.

Sign up or log in here. here

For more information on signing up or logging in, look no further.

🔒

Shh-pas-sword

It is important to keep your password private and not share it with anyone.


Step 2: Acquiring the API key

  1. From the app, click on the circle in the top right corner of the project dashboard and select the "My Profile" option from the dropdown menu that appears.
  2. Select the API tab and press the Create API Key button to generate a new API key.
  3. Make sure to take note of this key when it is created, as you will not get a chance to see it again without deleting it and creating a new key.

🚧

Warning

Please ensure to keep your API key secure and confidential to prevent unauthorized access and potential security breaches.


Step 3: Making the first API call

Authentication to the API is performed via HTTP Basic Auth. To authenticate with CustomGPT API endpoints, you must provide the API Key in the header, as shown below.

'authorization: Bearer Your_API_KEY' 

For example, you will use the POST - Create new project endpoint to create a new project. In this scenario, you can send an API request by adding your API Key in the Authentication header as shown below:

curl --request POST \
     --url 'https://app.customgpt.ai/api/v1/projects' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer Your_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "project_name": "projectname",
  "sitemap_path": "https://example.com/sitemap.xml"
}
'