OpenAI ChatGPT Integration

In order to use the Indexceptional API with a custom ChatGPT you will need to complete the following steps. You will require an account in order to use the system and an active ChatGPT Plus subscription.

In order to use the API with ChatGPT you will need to use Basic Authentication with Application Passwords. To get started:

  1. Log in to your Indexceptional account at https://www.indexceptional.com
  2. Go to your Account page https://www.indexceptional.com/account
  3. Select API Access Tab
  4. Create a new application password for “API Access”
  5. Use your username and the generated password for API requests

Create Base64 Authorisation

In order to use the API and custom ChatGPT you will need to use your application password and username to generate a base64 token.

You can accomplish this by combining your username and the application password. Remember to remove any spaces from the password.

username:password

Example

indexceptional:Bz1VbDX0DteXoMHboONAAk7X

Once you have your usename and password setup like above use a base64 encoder. To generate the token.

The generated output is the token you will need for the authorisation in the custom ChatGPT application.


Create Custom ChatGPT Application

Creating the custom ChatGPT Application is straight forward. Please remember you need a ChatCPT plus account to be able to generate your own.

Step 1.

Login to ChatGPT. Either click Explore GPTs or visit this link. When on the gpts page hit Create in the top right hand corner to get started.

Step 2.

On the configuration screen enter the following information. You don’t need to copy the items word for word. Examples provided.

  • Name: Indexceptional API
  • Description: Connect to the Indexceptional API
  • Instructions: Use the indexceptional API to place orders, check balance, previous orders and order status.
  • Capabilities: Web Search & Canvas

After entering the information click Create New Action and move onto Step 3.

Step 3.

A new window will appear. As seen below. In this step we will focus on Authentication. Step 4 will reference Schema.

Using the Base64 generated token. Do the following:

  • Select API Key.
  • Enter the Base64 Token into the API Key text field.
  • Select Basic from Auth Type.

Step 4.

After the authorisation has been entered. You will need to enter the schema for the Open AI operation.

Use the following is the Open AI schema.

openapi: 3.1.0
info:
title: Indexceptional API
description: |
API for managing index orders and checking credit balance.

## Authentication
This API uses WordPress Application Passwords for authentication. You need to:
1. Go to your WordPress account page
2. Navigate to the Application Passwords section
3. Generate a new application password
4. Use HTTP Basic Authentication with your WordPress username and the generated application password

Example:
```
Authorization: Basic base64(username:application_password)
```
version: 1.0.0
contact:
name: GetMediaWise Ltd
email: [email protected]
license:
name: GPL-2.0
url: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

servers:
- url: https://www.indexceptional.com/wp-json/index/api/v1
description: Production API server

components:
securitySchemes:
WordPressAuth:
type: http
scheme: basic
description: WordPress application password authentication. Use your WordPress username and application password.

schemas:
Error:
type: object
properties:
code:
type: string
message:
type: string
data:
type: object

Balance:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
credits:
type: integer
description: Current credit balance
examples: [ "100" ]
anyOf:
- type: integer
- type: string
enum: ["-1"]
description: "-1 indicates unlimited credits"

OrderRequest:
type: object
required:
- urls
properties:
urls:
type: array
items:
type: string
format: uri
description: Array of URLs to be processed
minItems: 1
maxItems: 500
examples: ["https://example.com", "https://example.org"]

OrderResponse:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
order_id:
type: integer
status:
type: string
enum: [api-ordered, manual-action, gbot-visited, checking-index, completed]
total_urls:
type: integer
urls:
type: array
items:
type: object
properties:
url:
type: string
format: uri
date_created:
type: string
format: date
status:
type: string

OrderStatus:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
order_id:
type: integer
status:
type: string
date_created:
type: string
format: date-time
total_urls:
type: integer
urls:
type: array
items:
type: object
properties:
url:
type: string
format: uri
indexable:
type: string
date_created:
type: string
format: date
status:
type: string
date_indexed:
type: string
serp:
type: string

OrdersList:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
orders:
type: array
items:
type: integer
total:
type: integer
per_page:
type: integer
current_page:
type: integer
total_pages:
type: integer

paths:
/check-balance:
get:
operationId: getBalance
summary: Check user's credit balance
description: Returns the current credit balance for the authenticated user
security:
- WordPressAuth: []
responses:
'200':
description: Successfully retrieved balance
content:
application/json:
schema:
$ref: '#/components/schemas/Balance'
example:
success: true
data:
credits: 100
'401':
description: Unauthorized - Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: "rest_not_logged_in"
message: "You are not currently logged in."

/order:
post:
operationId: createOrder
summary: Submit a new order
description: |
Creates a new order with the provided URLs.

Rate Limits:
- Maximum 500 URLs per order
- Minimum 20 seconds between requests
- Maximum 10 orders per day
security:
- WordPressAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OrderRequest'
example:
urls: ["https://example.com", "https://example.org"]
responses:
'200':
description: Order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/OrderResponse'
example:
success: true
data:
order_id: 1234
status: "api-ordered"
total_urls: 2
urls: [
{
"url": "https://example.com",
"date_created": "2025-02-22",
"status": "not-started"
},
{
"url": "https://example.org",
"date_created": "2025-02-22",
"status": "not-started"
}
]
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized - Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
tooManyUrls:
value:
code: "too_many_urls"
message: "Maximum of 500 URLs allowed per order"
tooManyRequests:
value:
code: "rate_limit_exceeded"
message: "Please wait 20 seconds before submitting another request"
dailyLimitExceeded:
value:
code: "daily_limit_exceeded"
message: "Maximum of 10 orders per day reached"

/orders:
get:
operationId: listOrders
summary: Get user's orders
description: Retrieves a paginated list of orders for the authenticated user
security:
- WordPressAuth: []
parameters:
- name: per_page
in: query
schema:
type: integer
default: 10
minimum: 1
maximum: 100
description: Number of items per page
- name: page
in: query
schema:
type: integer
default: 1
minimum: 1
description: Page number
- name: status
in: query
schema:
type: string
enum: [any, api-ordered, manual-action, gbot-visited, checking-index, completed]
default: any
description: Filter orders by status
responses:
'200':
description: Successfully retrieved orders
content:
application/json:
schema:
$ref: '#/components/schemas/OrdersList'
example:
success: true
data:
orders: [1234, 1235]
total: 2
per_page: 10
current_page: 1
total_pages: 1
'401':
description: Unauthorized - Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/order/status/{order_id}:
get:
operationId: getOrderStatus
summary: Check order status
description: Retrieves the current status of a specific order
security:
- WordPressAuth: []
parameters:
- name: order_id
in: path
required: true
schema:
type: integer
description: ID of the order to check
responses:
'200':
description: Successfully retrieved order status
content:
application/json:
schema:
$ref: '#/components/schemas/OrderStatus'
example:
success: true
data:
order_id: 1234
status: "api-ordered"
date_created: "2025-02-22T10:30:00Z"
total_urls: 2
urls: [
{
"url": "https://example.com",
"indexable": "200",
"date_created": "2025-02-22",
"status": "not-started",
"date_indexed": "-",
"serp": "-"
}
]
'401':
description: Unauthorized - Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden - User does not have access to this order
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Order not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

After pasting it will validate. And the screen will look similar to below.

Step 5.

On successful competition of the previous tasks we can now test the Chat Bot is working correctly.

Within Available Actions on the lefthand screen select Test on the row called getBalance. It will run and provide a message asking for authorisation. See screenshot below.

Hit Allow and the bot will response. If successful it should say something like:

Your current credit balance is 986. Let me know if you need any more help!

If this works you need to save your CustomGPT. When saving the GPT it’s recommended to keep access to invite-only and yourself. As your credit balance and ordering is authorised with the app.

Once saved the you will see Indexceptional API (or the name you used in your list of GPT’s. You can now use the bot.


Place an Order.

Once the ChatGPT application is setup. You can place an order by asking the bot to index some urls.

Please index the following urls: 
https://www.indexceptional.com
https://www.google.com
https://www.yahoo.com

You will be prompted to allow the operation. Confirm to place the order. You will then see a response similar to the following.

The order will be placed. With this successful response.