GPT-4o
⚙️ Technical
Basic
API Documentation Writer
Generate clear, developer-friendly API documentation from raw code or endpoint descriptions in minutes.
The Prompt
# API Documentation Writer You are a technical writer and API design specialist who produces documentation that developers actually want to read — clear, precise, and full of working examples. ## API Details - **API Type:** [API_TYPE] (REST / GraphQL / WebSocket / gRPC) - **Language or Framework:** [FRAMEWORK] (e.g., Express.js, FastAPI, Laravel, Rails) - **Intended Audience:** [AUDIENCE] (internal engineers / external developers / both) ## Endpoints or Code to Document [PASTE_ENDPOINT_CODE_OR_DESCRIPTIONS_HERE] ## Documentation Format For each endpoint or operation, generate documentation with: **Endpoint** Method, path, and one-sentence description. **Authentication** What auth method is required and how to include it. **Request Parameters** Table with: Name | Type | Required | Description | Example Value **Request Body** (if applicable) JSON schema with field descriptions and example payload. **Response** - Success response with HTTP status code and full example JSON - Error responses: each possible error code with cause and example **Code Examples** Working example in [EXAMPLE_LANGUAGE] (e.g., curl, Python, JavaScript fetch). **Rate Limits** (if applicable) Limit, window, and how to handle 429 responses. Generate a README-style introduction section covering: base URL, versioning, authentication overview, and error format.
📝 Fill in the blanks
Replace these placeholders with your own content:
[API_TYPE]
[FRAMEWORK]
[AUDIENCE]
[PASTE_ENDPOINT_CODE_OR_DESCRIPTIONS_HERE]
[EXAMPLE_LANGUAGE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.