[ ABORT TO HUD ]
SEQ. 1
SEQ. 2

Actions & API Integrations

🧩 Custom GPTs 25 min 250 BASE XP

Connecting GPTs to the Real World

Actions allow your Custom GPT to interact with external APIs. This turns a chatbot into an agent that can fetch live weather, create Jira tickets, or query a private database.

The OpenAPI Schema

To create an Action, you must provide an OpenAPI specification (Swagger). This is a JSON or YAML file that describes your API's endpoints, parameters, and authentication methods.

openapi: 3.1.0
info:
  title: Weather API
  version: 1.0.0
paths:
  /weather:
    get:
      summary: Get current weather
      operationId: getCurrentWeather
      parameters:
        - name: location
          in: query
          required: true
          schema:
            type: string

Authentication

Actions support None, API Key, and OAuth. If you use OAuth, the user will be prompted to log in to the third-party service before the GPT can execute the action.

Security Best Practice: Always require user confirmation before executing actions that modify data (POST, PUT, DELETE). You can enforce this in the GPT instructions.
SYNAPSE VERIFICATION
QUERY 1 // 3
What format is required to define an Action in a Custom GPT?
A Python script
An OpenAPI (Swagger) schema in JSON or YAML
A Dockerfile
A GraphQL schema
Watch: 139x Rust Speedup
Actions & API Integrations | Custom GPTs — OpenAI Academy