43 AI Prompts for APIs & Integrations

The best APIs & Integrations prompts in the Coding library. Tested on ChatGPT, Claude, Gemini and every major model.

Browse the prompts

{
  "model": "jev-latest",
  "state": {
    "query_excerpt": "{{query-excerpt}}",
    "candidate_passage": "{{candidate-passage}}"
  },
  "questions": {
    "is_the_source": {
      "type": "noul",
      "instructions": "Does the candidate passage supply the specific {{thing-the-query-needs}} that the query excerpt relies on?",
      "criteria": {
        "true": {"what": "The candidate states or establishes the specific rule, fact, figure, or step the query excerpt depends on"},
        "false": {"what": "The candidate is merely on a similar topic; it does not supply the specific thing the query excerpt needs"}
      }
    }
  }
}

Usage: take the top 20 to 40 candidates from BM25 or vector search, fire one request per query-candidate pair from a thread pool, then sort the shortlist by is_the_source descending. The false criterion is the important half of the question. Without it the mo

Semantic Rerank of a Retrieval Shortlist

Generate a judgment on whether a candidate passage provides specific information needed by a query excerpt, producing a JSON output.

117
## Role
You are an API integration architect specializing in production-grade RESTful integrations that handle rate limits, network failures, token expiry, and unpredictable API behavior.

## Task
Generate production-ready JavaScript code that implements a robust RESTful API integration with comprehensive error handling, authentication, retry logic, and graceful degradation.

## Context
{{api-details}}

Assume the API operates in an unreliable environment where requests may fail, tokens expire mid-flight, and transient errors occur. The code must be maintainable, well-commented, and ready for immediate deployment.

## Requirements
- Use the HTTP client specified in the API details (fetch or axios)
- Implement proper HTTP methods with correct request formatting
- Include secure authentication headers for the specified auth method
- Add comprehensive error handling that distinguishes netwo

API Integration Code Generator

Generates production-ready JavaScript code for RESTful API integrations with authentication, error handling, retry logic, and graceful degradation. Runs on ChatGPT, Claude, and Cursor.

93

RAG Passage Filter Before the Context Window

Generate a filtering mechanism for passages based on a user query using specific criteria and thresholds. Produces a code snippet for integrating passage evaluation into existing systems.

91

API Integration Guide Generator

Generates step-by-step API integration documentation that walks developers from authentication through production deployment. Runs on ChatGPT, Claude, Gemini, and Grok.

74

API Pagination System Design Prompt

Generates production-ready pagination implementations with automatic page fetching, error recovery, and performance optimization for high-traffic APIs. Runs on ChatGPT, Claude, and Cursor.

71
## Role

You are an expert backend architect and NestJS specialist who has built and scaled production-grade APIs for high-traffic applications.

## Task

Guide the creation of a maintainable, scalable, and well-structured API using NestJS best practices. Provide step-by-step guidance with clear explanations and code examples covering:

- Project architecture and optimal folder structure that scales with complexity
- Module organization with proper separation of concerns
- Dependency injection patterns and effective use of NestJS's DI container
- Validation using class-validator and class-transformer
- Error handling with custom exception filters and logging strategies
- Database integration (TypeORM, Prisma, or Mongoose), repository patterns, and transaction management
- Authentication and authorization implementation
- Environment configuration management
- API documentation using Swag

NestJS API Development Guide

Generates step-by-step architectural guidance and code examples for building production-grade NestJS APIs with proper module structure, dependency injection, validation, error handling, database integration, authentication, testing, and deployment strategies. Runs on ChatGPT, Claude, Gemini, and Grok.

68
## Role
You are a security implementation architect specializing in OAuth 2.0 authorization systems, approaching every implementation from an attacker's perspective and prioritizing threat modeling and defense against common vulnerabilities.

## Task
Build a production-ready, RFC 6749-compliant OAuth 2.0 authorization system for {{application-context}}. The implementation must be secure by design, preventing CSRF attacks, token leakage, open redirects, insufficient entropy, and PKCE bypass vulnerabilities.

## Context
Most OAuth implementations fail due to misconfigurations exploited by sophisticated actors who target token handling flaws, redirect URI validation gaps, and insufficient randomness. Treat security as the primary requirement.

## Requirements
- Implement authorization code, client credentials, and implicit grant types with clear security warnings about appropriate use cases

OAuth 2.0 Security Implementation Generator

Generates production-ready OAuth 2.0 authorization code with built-in threat modeling, CSRF prevention, and token security measures. Runs on ChatGPT, Claude, and Cursor to deliver RFC 6749-compliant systems with inline security annotations.

61

WebSocket Client Implementation Prompt

Generates a production-ready WebSocket client implementation guide with RFC 6455 compliance, automatic reconnection, error handling, and lifecycle management. Runs on ChatGPT, Claude, and Cursor to produce structured code and architecture patterns.

60

Build Authentication Systems

Generates a production-ready authentication system with secure login, signup, password reset, 2FA, session management, and route protection middleware. Outputs complete React/Next.js 14 code with TypeScript for ChatGPT, Claude, or Cursor.

57
## Role
You are an integration architect specializing in CRM-to-SEO automation systems. You design integrations that preserve search rankings while enabling real-time synchronization at scale.

## Task
Design a comprehensive integration system that connects CRM/marketing automation platforms to programmatic SEO pages. The solution must automate content updates while maintaining search rankings, URL integrity, and crawl efficiency.

## Context
{{integration-context}}

Provide: CRM/marketing automation platform in use, catalog size (number of products/services/pages), existing template structure, typical update frequency, technical constraints, and any failed integration history.

## Requirements
Your integration design must address:

**System Architecture**
- Integration framework connecting CRM data sources to SEO page generation
- Data flow pipelines and sync mechanisms

**Field Mapping

CRM-SEO Integration System Designer

Designs a technical integration architecture that connects CRM or marketing automation platforms to programmatic SEO pages while preserving search rankings and URL integrity. Runs on ChatGPT, Claude, Gemini, and Grok.

56
## Role

You are an expert REST API architect with deep knowledge of resource-based design, HTTP semantics, and stateless web service patterns.

## Task

Design a complete, production-ready CRUD REST API for the specified resource. Deliver endpoint specifications, HTTP verb mappings, request/response schemas, status codes, validation rules, error handling patterns, and database operation logic.

## Context

**Resource & stack:**
{{api-specification}}

Analyze the resource structure, identify relationships, and systematically build each endpoint. URLs must represent resources and hierarchies clearly. Maintain consistency across all operations. Follow RESTful conventions: resource-based URLs, proper HTTP verbs, stateless communication, and standards-compliant behavior.

## Output

Organize your response with clear headings for each CRUD operation:

### CREATE (POST)
- URL pattern with rout

Build REST API Endpoints

Generates production-ready CRUD REST API specifications with endpoint patterns, HTTP verb mappings, request/response schemas, status codes, validation rules, and database operation logic. Runs on ChatGPT, Claude, and Cursor for code output.

55

OAuth 2.0 Token Refresh Flow Implementation Guide

Generates a complete implementation guide for OAuth 2.0 refresh token flows that automatically handle token expiration, maintain user sessions, and prevent race conditions. Produces production-ready code examples for ChatGPT, Claude, and Cursor.

55

Webhook Signature Verification Code Generator

Generates production-ready HMAC-based webhook signature verification code that protects against tampering, replay, and timing attacks. Runs on ChatGPT, Claude, and Cursor to output secure, maintainable code in your chosen language.

53

Email Service Architecture Design Prompt

Generates a complete implementation strategy for transactional email systems, covering SMTP/API integration, template management, error handling, deliverability optimization, and tracking. Runs on ChatGPT, Claude, Gemini, and Grok.

52
## Role

You are a webhook security architect who designs production-grade webhook receivers that defend against replay attacks, timing exploits, signature bypasses, and malicious payloads. Every implementation assumes hostile conditions where a single vulnerability could cascade into data corruption or security breaches.

## Task

Implement a secure, resilient webhook handler that processes events reliably while defending against malicious actors. Design the complete server-side implementation with security validation, idempotent processing, asynchronous handling, comprehensive logging, and failure recovery.

## Context

{{webhook-integration-details}}

This webhook endpoint will handle critical events where failures or security breaches have cascading consequences. Previous implementations have failed due to duplicate processing, signature validation bypasses, and compromised systems f

Secure Webhook Handler Builder

Generates production-grade webhook receiver code with signature verification, idempotent processing, and defense against replay attacks and malicious payloads. Runs on ChatGPT, Claude, and Cursor to output hardened server-side implementations.

50
## Role

You are an expert data transformation engineer specializing in XML-to-JSON conversion, structured data migration, and cross-platform data interoperability.

## Task

Analyze the provided XML samples and generate clean, efficient transformation code that converts XML to JSON while preserving data hierarchy and meeting modern API standards.

## Context

XML's element-attribute model requires careful mapping to JSON's key-value structure. Handle:

- Namespaces and namespace declarations
- XML attributes (convert using the specified convention)
- Mixed content and nested hierarchy
- Array detection where multiple elements share the same name
- Repeating elements that must become JSON arrays

Follow these conversion principles:

- XML elements → JSON objects or keys
- Attributes → special properties per the specified convention
- Namespace information → preserve or strip as specified

XML to JSON Conversion Code Generator

Generates transformation code that converts XML structures to clean JSON while preserving data hierarchy, handling attributes and namespaces, and detecting arrays. Runs on ChatGPT, Claude, and Cursor.

49

Webhook Integration Development Prompt

Generates production-ready webhook listener code with signature validation, idempotency, error handling, and security hardening for ChatGPT, Claude, and Cursor. Outputs complete implementations for Next.js and Express endpoints tailored to your stack.

48

GraphQL Query Builder Prompt for API Integration

Generates production-ready GraphQL queries with proper syntax, variable definitions, authentication configuration, and error handling. Outputs executable code for ChatGPT, Claude, or Cursor in your chosen language.

48
## Role

You are a senior full-stack architect with deep expertise in Next.js production systems, API design, and authentication patterns. You specialize in building secure, maintainable applications with proper separation of concerns, comprehensive error handling, and patterns that prevent technical debt.

## Task

Create a complete, production-ready CRUD API system for a task management application using Next.js App Router (13+) and Prisma. Build all four operations (Create, Read, Update, Delete) with authenticated route protection. Each task must include title, description, status, dueDate, and priority fields.

## Context

{{api-requirements}}

The application must handle real user data securely. Follow enterprise-grade patterns for:
- Clean architecture with separated controller, service, and data access layers
- Comprehensive authentication middleware and route protection
- TypeScr

Build Task Management APIs

Generates a complete, production-ready CRUD API system for task management using Next.js App Router and Prisma, with authentication middleware, clean architecture, and TypeScript type safety. Runs on ChatGPT, Claude, and Cursor.

46
## Role

You are an expert backend engineer specializing in distributed systems and API reliability.

## Task

Generate production-ready idempotency implementation code that prevents duplicate operations and ensures safe request retries. Handle network failures, concurrent requests, and retry scenarios common in distributed systems.

## Context

Idempotency prevents duplicate payments, resource creation, and other unintended side effects. Your implementation must:

- Create unique identifiers for each operation
- Implement standard idempotency headers (`Idempotency-Key` or `X-Idempotency-Key`)
- Handle concurrent requests and timeouts
- Provide both client-side request generation and server-side validation
- Include storage with TTL-based expiration for tracking processed requests
- Demonstrate safe retry logic without duplicates
- Cover comprehensive error handling

**Technical stack:**

Idempotency Implementation Code Generator

Generates production-ready idempotency code for distributed systems that prevents duplicate operations and ensures safe request retries. Outputs complete client-side and server-side implementations for ChatGPT, Claude, or Cursor.

46

API Architecture Audit Prompt

Generates structured architectural reviews of API implementations, identifying pattern violations, authentication flaws, and error-handling gaps. Runs on ChatGPT, Claude, Gemini, and Grok.

45

Mock API Response Generator for RESTful APIs

Generates production-grade mock API responses with proper HTTP status codes, headers, JSON structures, pagination, and error handling. Runs on ChatGPT, Claude, and other text-based AI models.

45

cURL to Code Converter Prompt

Generates production-ready code from cURL commands, preserving every HTTP detail - headers, authentication, encoding - while adding error handling and language-specific best practices. Runs on ChatGPT, Claude, Cursor, and other code-capable models.

44
## Role

You are a security architect specializing in authentication systems. You design JWT implementations that eliminate client-side token exposure vulnerabilities while maintaining seamless user experience.

## Task

Design a comprehensive JWT security architecture for the provided application. Create implementation guidelines covering HTTP-only cookie storage, automatic session refresh, middleware validation, security monitoring, and threat response mechanisms.

## Context

The application handles sensitive user data and faces threats including XSS attacks, token theft, and session hijacking. Previous implementations failed due to client-side token management creating exploitable attack vectors. The solution must protect against sophisticated attacks while remaining invisible to users.

{{tech-stack}}

{{security-requirements}}

## Output

Provide:

**Security Architecture**
Overall

JWT Security Architecture Design Prompt

Generates a complete JWT authentication security architecture that eliminates client-side token exposure through HTTP-only cookies, automatic refresh flows, and threat detection. Runs on ChatGPT, Claude, Gemini, and Grok.

44

What are AI prompts for APIs & Integrations?

AI prompts for APIs & Integrations are engineered instructions that already work. These are not one-line questions. Each one fixes the role, the context, the task and the output format before you type a word, so you get a usable result on the first run instead of the fourth.

They cover the work APIs & Integrations actually get asked for: research and briefs, copy and content, analysis and reporting, planning, outreach and the admin that eats the day. Open a card to see the full prompt and the output it returns.

Popular on this page right now: "Semantic Rerank of a Retrieval Shortlist", "API Integration Code Generator", "RAG Passage Filter Before the Context Window".

43 on this page, every one scoped to APIs & Integrations. Free to read, free to copy.

Why these prompts work for APIs & Integrations

A weak prompt costs you the hour you were trying to save: you rewrite it three times, get something generic, then finish the job by hand. An engineered prompt front-loads that thinking once.

In APIs & Integrations that means first drafts you can send, analysis you can act on, and the repetitive work handed off, so the time goes into judgement instead of typing.

Every prompt here was written for a real job and tested against the models people actually use. Nothing scraped from a thread.

How to use these prompts

Open a prompt, copy it, and replace the [bracketed] variables with your own product, audience or topic. The structure around them stays as is. That structure is the part doing the work.

Paste it into ChatGPT, Claude, Gemini, Grok or the model you already use. If the output drifts, tighten the context line instead of rewriting the whole prompt.

No account needed to copy one. No setup, no extension, nothing to install.

Which AI tool works best for APIs & Integrations prompts?

Text prompts here run well in ChatGPT, Claude, Gemini and Grok; image prompts target Midjourney and Nano Banana. Each card lists the models it was tested with.

Are these AI prompts free to use?

A big part of the library is free: open a prompt, copy it, use it. Premium packs and the Complete AI Bundle unlock the full collection with lifetime updates.

How do I adapt these prompts to my use case?

Start with the [variables]: niche, audience, constraints. If the result still misses, add one example of the output you want. A single good example beats three extra instructions.

For a prompt built from scratch, the Start Now card above opens the custom prompt generator.

Related resources

Get smarter on AI every week

One email a week with the best new prompts, tools, and model updates. Unsubscribe anytime.

Join 100,000+ subscribers. One email a week, real prompts, tools, and model updates. Unsubscribe anytime.

About APIs & Integrations prompts

API and integration prompts design and connect services: a REST or GraphQL contract from a feature description, a client for a third-party API with retries and error handling, a webhook handler, an authentication flow, a data sync between two systems, a mapping between two schemas. They ask for the endpoints, the auth method, the rate limits and the failure cases, and they produce the code with the failure paths written, not only the happy path.

Backend developers use them for the boilerplate of every integration and for the parts that are easy to get wrong, such as idempotency and pagination. Product teams use the contract prompts to agree on an API before the frontend and backend are built. The prompts include a review step that lists what happens when the other service is slow, down or returns something unexpected, which is where integrations break in production.