The GPT Store is here: How to Create Your First Custom GPT and Connect it to an API

deval 🏝️💻🎸
5 min readJan 8, 2024

--

The GPT Store is launching this week, offering an exciting opportunity to generate income. In today’s AI-driven era, crafting custom AI tools for specific tasks or topics is not only innovative but also a promising avenue for revenue. Leading this wave are OpenAI’s GPT models. With these, you can develop a ChatGPT variant tailored to any need, be it language learning or technical support. This tutorial will navigate you through the process of creating your GPT in preparation for the GPT Store opening.

Step 1: Access the GPT Builder

First, navigate to OpenAI’s GPT editor. Alternatively, you can visit the OpenAI chat website, select your name, and then choose ‘My GPTs’. Once there, proceed to the ‘Explore’ section on OpenAI’s platform and click on ‘Create a GPT’. This step is where your journey begins.

Step 2: Building Your GPT

In the Create tab, you’ll find the GPT Builder. Here, you can describe the kind of GPT you want. For example, “Design a culinary GPT to suggest innovative recipes based on dietary preferences” or “Develop a GPT dedicated to providing historical analysis for educational purposes”. Let’s create a GPT Chef.

As you can see, the GPT Builder did almost all the work 🤓. Let’s provide additional context to ensure it delivers the highest quality recipes.

Step 3: Configuration

We’re going to enhance this GPT by linking it to a recipe API. First, head over to RapidAPI and set up an account. Our goal is to utilize this specific Recipe API to develop an OpenAPI Schema. This demonstration will showcase how to equip GPT with actions and advanced functionalities, truly unlocking the full potential of GPTs.

We will employ this Custom GPT to assist us in creating an OpenAPI Schema JSON. Please copy the example request.

And give it to the OpenAPI Schema GPT so it can build the JSON for us:

Here is the JSON:

{
"openapi": "3.0.0",
"info": {
"title": "Spoonacular Recipe Food Nutrition API",
"description": "API for complex recipe and food nutrition searches.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com"
}
],
"paths": {
"/recipes/complexSearch": {
"get": {
"summary": "Complex Recipe Search",
"operationId": "complexRecipeSearch",
"tags": [
"Recipe Search"
],
"parameters": [
{
"name": "query",
"in": "query",
"description": "Search query (e.g., 'pasta')",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "number",
"in": "query",
"description": "Number of results to return",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful search",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
}
},
"security": [
{
"RapidAPIKeyAuth": []
}
]
}
}
},
"components": {
"schemas": {}
},
"security": [
{
"RapidAPIKeyAuth": []
}
]
}

Go back to the GPT Builder and move to the Configure tab. This section allows you to select actions your GPT can perform, such as browsing the web or creating images. In the lowest section, click on “Create new action”.

Copy the OpenAPI Schema and add your API key.

Step 4: Publish Your Creation

Once you’re satisfied with your GPT, hit “Publish”. You can then share it with others, marking the completion of your GPT’s creation. Congratulations! 🥳 You have successfully created your first custom GPT with access to an external API. You are now equipped to explore various APIs and craft a unique AI assistant specifically tailored to address a particular problem.

Challenges

GPTs, like ChatGPT and other language model-based assistants, confront several common challenges:

  • Hallucinations: Generating inaccurate or fictional information.
  • Adversarial Attacks: Vulnerability to misleading inputs designed to trick the model.
  • Biases: Inherent prejudices reflecting training data.
  • Determinism Issues: Difficulty in consistently following instructions.

Unique to GPTs are additional concerns:

  • Error Propensity: Higher chances of making mistakes.
  • Token Quotas & Throttling: Rapid limitations during extensive system prompts.
  • Tool and Action Reasoning: Occasional errors in utilizing tools and actions, such as schema mistakes.
  • Handling of RAG: Challenges in Retrieval-Augmented Generation with large and complex datasets.

Understanding of these issues is expected to evolve over time, particularly as the platform and technology develop.

A Different Approach to Building Your AI Assistants

SpokesAI: Create, Instruct and Connect your AI assistants

In recent months, I’ve been collaborating on the development of SpokesAI, an app for creating assistants. This web app offers functionalities akin to the GPT assistants API, yet it’s more user-friendly. Interestingly, it provides options to select different models such as Mistral or Google’s Gemini as the underlying ‘brain’. Moreover, SpokesAI allows for seamless integration with applications like Slack, Telegram, and Shopify, all achievable with just a few clicks.

SpokesAI app

Currently, we are in the beta stage, but you’re welcome to explore what we’ve built at SpokesAI. I’m open to feedback, so please feel free to reach out with any comments. Thanks for your interest!

--

--