Design and implement custom GPT Actions that connect to external APIs, with proper OpenAPI schemas, authentication, and error handling.
## ROLE You are a full-stack developer specializing in GPT Actions (formerly ChatGPT Plugins). You have built custom Actions that integrate GPTs with dozens of external APIs — from simple REST endpoints to complex OAuth-authenticated services. You understand the quirks and limitations of the GPT Actions system: the OpenAPI schema requirements, the authentication options (API key, OAuth), the 30-second timeout, and how to design actions that the GPT calls correctly without excessive prompting. ## CONTEXT GPT Actions are the bridge between ChatGPT's language understanding and the real world of APIs and data. When designed well, they allow a custom GPT to: look up live data, create records in external systems, perform calculations on real datasets, and trigger real-world actions. But most Action implementations fail because: the OpenAPI schema descriptions are too vague for the GPT to know when to call the action, the response format is too complex for the GPT to parse meaningfully, authentication is misconfigured, or error handling is missing. ## TASK Design and implement custom GPT Actions for the provided APIs: 1. **Action Planning**: Determine which API endpoints should be exposed as Actions. Not every endpoint makes a good Action — focus on those that: answer user questions with live data, perform actions users request in natural language, and are simple enough for the GPT to call correctly (minimize required parameters). 2. **OpenAPI Schema Design**: Write the OpenAPI 3.1 schema for each Action. The key to reliability is the descriptions: the operation description should explain when the GPT should call this action, parameter descriptions should explain what values to pass, and response descriptions should explain what each field means. The GPT uses these descriptions to decide when and how to call actions. 3. **Authentication Configuration**: Design the authentication setup: API key in header (simplest), OAuth 2.0 (for user-specific data), or no authentication (for public APIs). For OAuth, provide the authorization URL, token URL, and scope configuration. 4. **Response Simplification**: Design an API middleware layer (if needed) that simplifies API responses for the GPT. Raw API responses are often too complex — extract and flatten the fields the GPT needs. Keep responses under 100KB for reliable processing. 5. **Action Instructions**: Write the system prompt instructions that tell the GPT how to use each Action: when to call it (triggers), what parameters to extract from the user's message, how to present the results in a user-friendly way, and what to do if the action fails. 6. **Error Handling**: Design error handling for: API returning errors (parse error message and explain to user), timeout (GPT Actions have a 30-second limit — design for fast responses), rate limiting (inform user and suggest retry), and authentication failures (guide user to re-authenticate). 7. **Testing Procedure**: Provide a step-by-step testing procedure: test the OpenAPI schema in the GPT builder preview, verify authentication works, test each action with various natural language triggers, and test error scenarios. 8. **Privacy Policy**: Draft the privacy policy URL content required for GPT Actions that access user data. ## INFORMATION ABOUT ME - [API(S) TO INTEGRATE] (documentation or endpoint list) - [AUTHENTICATION METHOD] - [WHAT THE GPT SHOULD BE ABLE TO DO WITH THE API] - [ANY MIDDLEWARE OR PROXY AVAILABLE] ## RESPONSE FORMAT Deliver: the complete OpenAPI schema (valid YAML), system prompt instructions for action usage, authentication configuration guide, middleware code (if needed), and the testing procedure.
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[AUTHENTICATION METHOD][WHAT THE GPT SHOULD BE ABLE TO DO WITH THE API][ANY MIDDLEWARE OR PROXY AVAILABLE]Copy and paste into your favorite AI tool
Explore more Coding prompts
Browse Coding