Text & chat prompt
Write API documentation from code
Write API documentation from code: a free, copy-paste prompt for ChatGPT, Gemini and Claude. Paste the prompt and replace each [BRACKETED] field with your own details.
The prompt
Write API documentation for these endpoints: [PASTE ROUTES, HANDLERS OR OPENAPI SNIPPET] For each endpoint include purpose, method and path, parameters, request body, example request, example response, error codes and authentication requirements. Organise them into sections and start with a short "getting started" guide.
Pro tip: Generate a working curl example for each endpoint and test it before publishing.
How to use this prompt
- Open ChatGPT and start a new chat.
- Paste the prompt.
- Replace each [BRACKETED] field with your real details and paste in your own text where asked.
- Reply with follow-ups such as "make it shorter" or "make it sound more like me".
Prompt at a glance
- Category
- Text & chat
- Works with
- ChatGPT · Gemini · Claude
- Length
- 44 words
- Fields to fill in
- PASTE ROUTES, HANDLERS OR OPENAPI SNIPPET
- Last updated
Frequently asked questions
Which AI tools work with this prompt?
It is written for ChatGPT, Gemini and Claude. Paste it into your preferred tool and adjust the wording if the result is off.
What do I need to fill in?
Replace the field before you send it: PASTE ROUTES, HANDLERS OR OPENAPI SNIPPET. Each field shows an example in the prompt.
Should I paste private information into the prompt?
Only what the task needs. Remove names, contact details and other sensitive data before pasting a resume or document into any AI tool.