# OpenAI GPT
Source: https://docs.dappier.com/integrations/open-ai-gpt-integration



OpenAI’s Custom GPT models allow developers to create AI assistants tailored to specific use cases. These models can be fine-tuned with additional instructions, personality settings, and access to external tools or APIs, making them highly adaptable. Whether used for customer support, content generation, data analysis, or specialized research, Custom GPTs enable a more refined AI experience that aligns with user needs.

[**Dappier**](https://dappier.com/developers/) is a platform that connects LLMs and Agentic AI agents to real-time, rights-cleared data from trusted sources, including web search, finance, and news. By providing enriched, prompt-ready data, Dappier empowers AI with verified and up-to-date information for a wide range of applications.

Explore a wide range of data models in our marketplace at [marketplace.dappier.com](https://marketplace.dappier.com/marketplace).

## Build OpenAI Custom GPT using Dappier Real Time Data API

This guide will walk you through the step-by-step process of building a custom OpenAI GPT model that integrates with the Dappier Real Time Data API. By following this tutorial, even a beginner can set up a custom GPT to fetch real-time data, summarize key information, and generate insightful reports.

## Watch the Video Guide

If you prefer a visual walkthrough, check out the accompanying video guide below:

<iframe width="560" height="315" src="https://www.youtube.com/embed/G2hJ41pgJTg?si=HOmzkVEMGV59RN2w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

## Prerequisites

Before getting started, ensure you have:

* An OpenAI account
* API access to create and configure custom GPTs
* A Dappier API key (Get it from [Dappier API Keys](https://platform.dappier.com/profile/api-keys))

***

## Step 1: Access the GPT Builder

1. Navigate to OpenAI’s [Custom GPT Page](https://chat.openai.com/gpts/editor)
2. Log in to your OpenAI account
3. Click on **"Create a GPT"** to start the customization process

***

## Step 2: Define GPT Characteristics

### Name

Set the GPT’s name to **Dappier AI Assistant**

### Description

Use the following description:

> Fetches real-time data and provides summaries, highlights, and reports.

### Instructions

Define specific guidelines for how the GPT should interact with users, such as:

* Asking for clarification when needed
* Maintaining a structured yet conversational tone
* Ensuring accuracy while simplifying complex information

***

## Step 3: Enhance with Additional Knowledge

If needed, upload relevant documents or files to provide the GPT with additional context and knowledge.

***

## Step 4: Configure API Integration

### API Endpoint

Your GPT needs to communicate with the Dappier API. The request will be sent to:

```
https://api.dappier.com/app/aimodel/am_01j06ytn18ejftedz6dyhz2b15
```

### Authentication

Use **Bearer Token** authentication. Include the API key in the `Authorization` header:

```
Authorization: Bearer <your_api_key>
```

### Request Body Format

Send the query in JSON format:

```json  theme={null}
{
    "query": "latest AI news"
}
```

### Example API Request (cURL)

```sh  theme={null}
curl -X POST "https://api.dappier.com/app/aimodel/am_01j06ytn18ejftedz6dyhz2b15" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "latest AI news"}'
```

***

## Step 5: Configure Capabilities

### Sample Conversation Starters

* **Fetch the latest news on AI advancements**
* **Summarize real-time weather updates for New York**
* **Generate a detailed report on current travel trends**
* **Highlight key deals available for online shopping**

***

## Step 6: Import API Schema

To ensure smooth interaction with the API, import the OpenAPI schema:

```json  theme={null}
{
    "openapi": "3.1.0",
    "info": {
        "title": "Dappier Real Time Data API",
        "description": "Access real-time Google web search results, including news, weather, travel, and deals.",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.dappier.com",
            "description": "Dappier API Server"
        }
    ],
    "paths": {
        "/app/aimodel/am_01j06ytn18ejftedz6dyhz2b15": {
            "post": {
                "operationId": "getRealTimeData",
                "summary": "Fetch real-time data from Google search",
                "security": [{ "BearerAuth": [] }],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RealTimeDataRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response with real-time search results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RealTimeDataResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "RealTimeDataRequest": {
                "type": "object",
                "properties": {
                    "query": {
                        "type": "string",
                        "description": "Query text to be passed to the AI model."
                    }
                },
                "required": ["query"]
            },
            "RealTimeDataResponse": {
                "type": "object",
                "properties": {
                    "response": {
                        "type": "string",
                        "description": "Response generated by the AI model for the given query."
                    }
                },
                "required": ["response"]
            }
        },
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        }
    }
}
```

***

## Step 7: Test and Iterate

1. Use the OpenAI GPT interface to test queries like:
   * "Fetch the latest news on AI"
   * "Summarize current weather updates"
   * "Highlight key deals for online shopping"
2. Verify that the responses are accurate and formatted correctly.
3. Refine GPT behavior by adjusting instructions as needed.

***

## Step 8: Deploy and Share

Once tested, you can:

* Share your GPT with others
* Embed it in applications
* Continuously update its behavior based on feedback

**Sharing Options:**

* **Private**: Only accessible to you
* **Unlisted**: Accessible via a direct link
* **Public**: Available in the GPT Store

***

## Privacy & Security

* All API interactions must comply with OpenAI and Dappier’s terms of service.
* Keep your API key secure and do not expose it publicly.
* Review Dappier’s [Privacy Policy](https://dappier.com/privacy-policy/) for more details.

***

## Conclusion

You have now successfully created a custom OpenAI GPT that integrates with Dappier’s Real-Time Data API. Your GPT can fetch and process real-time search results, providing summaries, insights, and reports with ease. Keep experimenting and refining to enhance its performance!