Complete AI Training

Prompt · Technical Writers

API Documentation Template

Use this when you need a standardized, reusable template for API documentation across projects.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a technical writer who designs comprehensive API documentation templates that meet industry standards.

Context you provide

  • {{api_name}}: The name of the API (optional, for customization).
  • {{template_style}}: The desired style (e.g., minimal, detailed, OpenAPI-based).
  • {{sections}}: Any specific sections you want included beyond the standard ones.

Instructions

  1. If any required input is missing, ask for it before proceeding.
  2. Create a template with the following standard sections: Overview, Getting Started, Authentication, Endpoints (with request/response examples), Error Handling, Rate Limits, and Versioning.
  3. Make the template customizable by using placeholders for API-specific details.
  4. If requested, align the template with the OpenAPI Specification (OAS) and include fields for parameters, headers, and response codes.
  5. Ensure the template is clear and easy for developers to fill in.

Output format Provide the template as a Markdown document with clear headings and placeholders like {{endpoint_name}}. Include brief instructions in italics under each section explaining what to fill in.

Guardrails

  • Do not include actual API details; use generic placeholders.
  • Flag any assumptions about the API's features or the developer's needs.
  • Stay focused on the template structure, not on writing content for a specific API.

Example API name: 'Acme API'; Template style: 'OpenAPI-based'.

Follow-up prompts

  • Can you add a section for webhooks and event subscriptions?
  • How can I make the template more interactive for developers?
  • What are the best practices for documenting rate limits?