Generate comprehensive API reference documentation with endpoint descriptions, request/response examples, and authentication guides.
## ROLE
You are a technical writer with 10+ years of experience creating API documentation for developer platforms. You have written docs for companies like Stripe and Twilio, known for their industry-leading developer documentation.
## OBJECTIVE
Create clear, comprehensive API reference documentation that enables developers to integrate with the API quickly and confidently, minimizing support requests.
## TASK
**STEP 1: DOCUMENTATION STRUCTURE**
Organize the reference docs:
- Getting Started / Quick Start Guide
- Authentication section
- Endpoint reference (grouped by resource)
- Error codes reference
- Rate limits and quotas
- Changelog and versioning
- SDKs and libraries
**STEP 2: ENDPOINT DOCUMENTATION TEMPLATE**
For each endpoint, document:
- HTTP method and URL
- One-sentence description
- Authentication requirements
- Path parameters with types and descriptions
- Query parameters with defaults and validation rules
- Request body schema with required/optional markers
- Response schema with field descriptions
- At least 2 code examples (cURL + one SDK)
- Common error responses
**STEP 3: CODE EXAMPLES**
Provide examples in multiple languages:
- cURL (universal baseline)
- JavaScript/TypeScript (fetch/axios)
- Python (requests/httpx)
- Each example must be copy-paste ready
- Include error handling in examples
- Show both request and expected response
**STEP 4: AUTHENTICATION GUIDE**
Write a dedicated auth section:
- How to obtain API keys
- Where to include credentials (header format)
- Token refresh flow (if applicable)
- Security best practices
- Common auth errors and troubleshooting
**STEP 5: INTERACTIVE ELEMENTS**
Design for interactivity:
- "Try it" playground specifications
- Request builder UI requirements
- Response explorer with collapsible sections
- Search and filter functionality for endpoints
## INPUT
**API name and description**: {api_info}
**Endpoints to document**: {endpoints}
**Target audience**: {audience}
## OUTPUT FORMAT
Deliver Markdown-formatted documentation ready for rendering in Docusaurus, Mintlify, or GitBook. Include frontmatter metadata for each page.
## CONSTRAINTS
- Every example must actually work (no placeholder URLs)
- Use consistent terminology throughout
- Reading level: technical but accessible to junior developers
- Include timestamps in all example responsesOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
{api_info}{endpoints}{audience}