Documentation

DocumentationCustom GPT Integration

Quick Start

AdsOverAI Integration Documentation for Custom GPTs

Table of Contents

  1. Prerequisites
  2. Getting Started
  3. Integration Steps
  4. API Reference
  5. Testing
  6. Best Practices
  7. Troubleshooting
  8. Examples
  9. Support

Prerequisites

Requirements

Before integrating AdsOverAI, ensure you have:

RequirementDescriptionRequired
ChatGPT PlusSubscription required to create/edit Custom GPTs✅ Yes
Existing Custom GPTA Custom GPT you want to monetize✅ Yes
AdsOverAI AccountFree account at adsoverai.com✅ Yes
AdsOverAI API KeyGenerated from your dashboard✅ Yes

Account Setup

  1. Create AdsOverAI Account

  2. Generate API Key

    • Log into your dashboard
    • Navigate to API Keys section
    • Click "Generate New Key"
    • Copy and securely store your key

API Key Format: ADSOVERAI{alphanumeric_string}

⚠️ Security Note: Never share your API key publicly or commit it to version control.


Getting Started

Integration Overview

The integration process consists of three main steps:

1. Configure API Action → 2. Add API Key → 3. Update Instructions

Estimated Time: 5-10 minutes

Architecture

User Query
    ↓
Custom GPT Processing
    ↓
Detects Product Intent
    ↓
Calls AdsOverAI API Action
    ↓
Receives Product Data
    ↓
Formats & Displays Results
    ↓
User Sees Recommendations

Integration Steps

Step 1: Access Your Custom GPT

  1. Navigate to https://chat.openai.com
  2. Click your profile icon (bottom-left corner)
  3. Select "My GPTs" from the menu
  4. Locate your Custom GPT in the list
  5. Click the Edit icon (pencil) next to your GPT
  6. Select the "Configure" tab

Step 2: Add AdsOverAI Action

2.1 Navigate to Actions Section

  1. Scroll down to the "Actions" section
  2. Click "Create new action" button
  3. You will see a schema editor

2.2 Add API Schema

Copy and paste the following OpenAPI schema into the schema editor:

openapi: 3.1.0
info:
  title: AdsOverAI Product Recommendations API
  description: Provides contextual product recommendations based on user queries
  version: 1.0.0
servers:
  - url: https://www.adsoverai.com
    description: AdsOverAI Production Server
paths:
  /api/content/match:
    post:
      operationId: get_product_recommendations
      summary: Get contextual product recommendations
      description: |
        Fetches relevant product advertisements and recommendations based on 
        the user's query and conversation context. Returns products with 
        details including name, brand, description, price, and purchase links.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: The user's product search query or conversation context
                  example: "best running shoes for marathon training"
                  minLength: 3
                  maxLength: 500
                max_ads:
                  type: integer
                  description: Maximum number of product recommendations to return
                  default: 3
                  minimum: 1
                  maximum: 5
                  example: 3
                tracking_enabled:
                  type: boolean
                  description: Enable analytics tracking for recommendations
                  default: true
                platform_type:
                  type: string
                  description: Platform identifier for analytics
                  default: "custom-gpt"
                  enum:
                    - "custom-gpt"
                    - "chatgpt-plugin"
                    - "web"
      responses:
        '200':
          description: Successfully retrieved product recommendations
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful
                    example: true
                  data:
                    type: object
                    required:
                      - matches
                      - total_available
                    properties:
                      matches:
                        type: array
                        description: Array of matched product recommendations
                        items:
                          type: object
                          required:
                            - ad_id
                            - brand_name
                            - product_name
                            - description
                          properties:
                            ad_id:
                              type: string
                              description: Unique identifier for the advertisement
                              example: "ad_12345"
                            brand_name:
                              type: string
                              description: Brand or manufacturer name
                              example: "Nike"
                            product_name:
                              type: string
                              description: Product name
                              example: "Air Zoom Pegasus 40"
                            description:
                              type: string
                              description: Detailed product description
                              example: "Premium running shoes with responsive cushioning"
                            price_range:
                              type: string
                              description: Price or price range
                              example: "$130-$150"
                            cta_text:
                              type: string
                              description: Call-to-action button text
                              example: "View Product"
                            cta_link:
                              type: string
                              format: uri
                              description: Product purchase or details URL
                              example: "https://example.com/product/123"
                            category:
                              type: string
                              description: Product category
                              example: "Athletic Footwear"
                            relevanceScore:
                              type: number
                              format: float
                              description: Relevance score (0.0 to 1.0)
                              example: 0.95
                              minimum: 0
                              maximum: 1
                      total_available:
                        type: integer
                        description: Total number of available matches
                        example: 10
                      processing_time_ms:
                        type: number
                        description: API processing time in milliseconds
                        example: 245.5
                      session_id:
                        type: string
                        description: Session identifier for tracking
                        example: "sess_abc123"
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: "Invalid query parameter"
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: "Invalid API key"
        '429':
          description: Too many requests - Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: "Rate limit exceeded"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: "Internal server error"
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: AdsOverAI API key for authentication

2.3 Verify Schema

After pasting the schema:

  1. Click outside the text box
  2. Wait for validation (green checkmark should appear)
  3. If errors appear, ensure the YAML is properly formatted

Step 3: Configure Authentication

3.1 Set Up API Key Authentication

  1. Scroll down to the "Authentication" section (below the schema)
  2. Select "API Key" from the dropdown menu
  3. Configure the following fields:
FieldValue
Auth TypeAPI Key
API Key LocationHeader
Header NameX-API-Key
API Key ValueYour AdsOverAI API key (from Step 1)

3.2 Example Configuration

Authentication Type: API Key
API Key:            X-API-Key
Value:              ADSOVERAI_YOUR_KEY_HERE

⚠️ Important: Replace ADSOVERAI_YOUR_KEY_HERE with your actual API key.


Step 4: Add Privacy Policy

  1. Scroll to the "Privacy policy" field
  2. Enter: https://www.adsoverai.com/privacy

This is required for Custom GPTs that use external APIs.


Step 5: Update GPT Instructions (Recommended)

To make your GPT automatically use the product recommendations, add these instructions to your existing configuration:

Option A: Automatic Product Recommendations

Add this to your GPT's instructions:

PRODUCT RECOMMENDATIONS:
When users ask about products, shopping, purchases, or recommendations:

1. Analyze the user's needs and provide helpful context
2. Call the get_product_recommendations action with a clear, descriptive query
3. Present the returned products naturally in your response
4. Include product names, brands, prices, and links
5. Mention that some recommendations are sponsored

EXAMPLE:
User: "What's the best laptop for video editing?"

Response flow:
- Provide advice on laptop specifications for video editing
- Call get_product_recommendations with query: "laptop for video editing high performance"
- Display products with: name, brand, key features, price, link
- Add: "These recommendations include sponsored products"

FORMAT FOR DISPLAYING PRODUCTS:
"Here are some excellent options:

1. **[Product Name]** by [Brand]
   [Brief description]
   Price: [Price Range]
   [View Product Link]

2. [Continue for each product]

*Note: Some recommendations are sponsored.*"

WHEN TO CALL THE API:
✅ User asks "what should I buy"
✅ User requests product recommendations
✅ User compares products
✅ User researches purchases
✅ User asks about prices

❌ General questions not related to products
❌ Technical support questions
❌ Personal advice unrelated to shopping

Option B: On-Demand Recommendations

If you want users to explicitly request product recommendations:

PRODUCT RECOMMENDATIONS (ON-DEMAND):
When users explicitly ask to "show products" or "find recommendations":

1. Confirm what they're looking for
2. Call get_product_recommendations action
3. Present results with clear formatting
4. Disclose sponsored content

Users can trigger recommendations by saying:
- "Show me products"
- "Find recommendations"
- "What can I buy"

Step 6: Save and Test

  1. Click "Save" button (top-right corner)
  2. Your Custom GPT is now integrated with AdsOverAI
  3. Proceed to Testing section below

API Reference

Endpoint

POST https://www.adsoverai.com/api/content/match

Authentication

X-API-Key: YOUR_ADSOVERAI_API_KEY

Request Parameters

ParameterTypeRequiredDefaultDescription
querystring✅ Yes-User's search query (3-500 chars)
max_adsinteger❌ No3Number of results (1-5)
tracking_enabledboolean❌ NotrueEnable analytics
platform_typestring❌ No"custom-gpt"Platform identifier

Request Example

{
  "query": "best noise canceling headphones under $300",
  "max_ads": 3,
  "tracking_enabled": true,
  "platform_type": "custom-gpt"
}

Response Format

{
  "success": true,
  "data": {
    "matches": [
      {
        "ad_id": "ad_12345",
        "brand_name": "Sony",
        "product_name": "WH-1000XM5",
        "description": "Industry-leading noise cancellation",
        "price_range": "$299",
        "cta_text": "View Product",
        "cta_link": "https://example.com/product",
        "category": "Audio",
        "relevanceScore": 0.95
      }
    ],
    "total_available": 10,
    "processing_time_ms": 245,
    "session_id": "sess_abc123"
  }
}

Error Responses

Status CodeMeaningResponse
400Bad RequestInvalid parameters
401UnauthorizedInvalid API key
429Rate LimitToo many requests
500Server ErrorInternal error

Rate Limits

TierRequests/MinuteRequests/Day
Free601,000
Pro30010,000
EnterpriseCustomCustom

Testing

Test Your Integration

Method 1: Quick Test

  1. Open your Custom GPT in ChatGPT
  2. Send a test message:
    "What are the best running shoes for marathon training?"
    
  3. Your GPT should:
    • Provide advice about running shoes
    • Show 3 product recommendations
    • Include prices and links

Method 2: Direct API Test

Test the action directly in the configuration:

  1. In the Actions section, find your action
  2. Click "Test" button
  3. Enter test parameters:
    {
      "query": "wireless headphones",
      "max_ads": 3
    }
    
  4. Click "Run"
  5. Verify response contains product data

Expected Behavior

✅ Success Indicators:

  • Products display with names, brands, prices
  • Links are clickable and working
  • Relevance scores are present
  • Response time < 2 seconds

❌ Error Indicators:

  • "Action failed" message
  • Empty product list
  • Authentication errors
  • Timeout errors

Common Test Queries

Try these queries to verify different scenarios:

1. "Recommend a laptop for programming"
2. "What's the best coffee maker under $100?"
3. "I need a gift for a tech-savvy friend"
4. "Compare wireless earbuds"
5. "Find me running shoes for beginners"

Best Practices

Query Optimization

✅ Good Queries:

  • "best wireless headphones for gym"
  • "laptop for video editing under $1500"
  • "beginner running shoes with good cushioning"

❌ Poor Queries:

  • "stuff" (too vague)
  • "what" (no context)
  • Empty strings

User Experience

  1. Be Transparent

    • Always mention sponsored content
    • Disclose when showing paid recommendations
    • Be honest about product relationships
  2. Provide Context

    • Give helpful advice before showing products
    • Explain why products are relevant
    • Offer to answer follow-up questions
  3. Format Clearly

    ✅ Use bullet points or numbered lists
    ✅ Include product names in bold
    ✅ Show prices clearly
    ✅ Make links obvious
    

Error Handling

Configure your GPT to handle errors gracefully:

IF API returns error:
- Apologize for technical issues
- Offer to continue conversation without products
- Suggest trying again later
- Provide general advice without specific products

Example: "I'm having trouble fetching product recommendations 
right now, but I can still help with general advice about [topic]."

Performance

  • Cache responses: Don't call API repeatedly for same query
  • Limit requests: Max 3-5 products per response
  • Timeout handling: Set 5-second timeout expectation
  • Fallback content: Have general advice ready if API fails

Troubleshooting

Issue: "Action failed" Error

Possible Causes:

  1. Invalid API key
  2. Incorrect authentication configuration
  3. Network timeout

Solutions:

  1. Verify API key is correct and active
  2. Check authentication header is X-API-Key
  3. Test API key in dashboard
  4. Regenerate API key if needed

Issue: No Products Returned

Possible Causes:

  1. Query too vague
  2. No matching products in catalog
  3. Rate limit exceeded

Solutions:

  1. Use more specific queries
  2. Try different product categories
  3. Check rate limit status in dashboard
  4. Wait and retry

Issue: Slow Response Times

Possible Causes:

  1. Network latency
  2. High API load
  3. Complex queries

Solutions:

  1. Reduce max_ads parameter (try 2-3)
  2. Optimize query specificity
  3. Implement timeout handling
  4. Contact support for enterprise needs

Issue: Incorrect Products

Possible Causes:

  1. Ambiguous query
  2. Query misinterpretation

Solutions:

  1. Make queries more specific
  2. Include category information
  3. Add price range to query
  4. Specify key requirements

Examples

Example 1: Tech Shopping Assistant

Configuration:

Name: "TechBuy Assistant"

Instructions (excerpt):

When users ask about technology products:
1. Ask clarifying questions about use case
2. Explain technical requirements
3. Call get_product_recommendations
4. Present options with pros/cons
5. Help user decide based on needs

Sample Interaction:

User: "I need a new laptop"

GPT: "I'd be happy to help! A few questions:
- What will you primarily use it for?
- What's your budget?
- Any preference for Windows or Mac?"

User: "Video editing, around $2000, no preference"

GPT: [Provides advice about specs needed]
[Calls get_product_recommendations with query: 
 "laptop for video editing $2000 high performance"]
[Displays 3 relevant options with details]

Example 2: Gift Finder

Name: "Perfect Gift Finder"

Instructions (excerpt):

SPECIALTY: Finding thoughtful gifts

PROCESS:
1. Ask about recipient (age, interests, relationship)
2. Confirm budget
3. Call get_product_recommendations with detailed query
4. Present 3-5 gift options with reasoning
5. Offer to find alternatives if needed

Sample Interaction:

User: "Gift for my dad who loves golf"

GPT: "Great! A few more details:
- What's your budget?
- Is this for a special occasion?
- Does he have all the basic equipment?"

User: "$100-150, birthday, yes he has clubs"

GPT: [Calls API with query: 
 "golf gift birthday $100-150 accessories gadgets"]
[Shows personalized gift options with explanations]

Example 3: Budget Shopping Helper

Name: "Budget Smart Shopper"

Instructions (excerpt):

FOCUS: Helping users find best value products

APPROACH:
- Always consider budget constraints
- Compare price vs features
- Highlight deals and savings
- Show budget-friendly alternatives

When showing products:
- Emphasize value proposition
- Compare price points
- Mention "best value" picks

Support

Documentation

Contact

Community

Response Times

ChannelExpected Response Time
Email24-48 hours
Discord2-4 hours (community)
Enterprise Support1-2 hours

Appendix

Changelog

Version 1.0.0 (Current)

  • Initial release
  • OpenAPI 3.1.0 schema
  • Custom GPT integration support
  • Basic authentication via API key

Glossary

TermDefinition
Custom GPTPersonalized version of ChatGPT created by users
ActionExternal API integration in Custom GPTs
OpenAPIStandard specification for describing REST APIs
Contextual MatchingAI-based algorithm matching ads to conversation context
CTACall-to-Action (e.g., "Buy Now", "View Product")
Relevance Score0-1 score indicating how well product matches query

FAQ

Q: Is AdsOverAI free? A: Free tier available with 1,000 requests/day. Paid plans for higher volume.

Q: Can I customize which products appear? A: Products are automatically matched based on context. Contact enterprise@adsoverai.com for custom catalogs.

Q: How are products selected? A: AI algorithms analyze query context, user intent, and product relevance.

Q: Can I use this commercially? A: Yes, commercial use is permitted. Review terms at adsoverai.com/terms.

Q: What if I exceed rate limits? A: Requests will be throttled. Upgrade plan for higher limits.


Legal

Terms of Service

By using AdsOverAI, you agree to our Terms of Service.

Privacy Policy

Review our data handling practices: Privacy Policy

Compliance

  • GDPR compliant
  • CCPA compliant
  • SOC 2 Type II certified

Document Version: 1.0.0
Last Updated: December 2024
Maintained by: AdsOverAI Team


© 2024 AdsOverAI. All rights reserved.