Write an API reference people can use right away
Prompt that turns code and examples into a per-endpoint reference with error codes and working calls. Paste it into an AI tool of your choice, which then writes the API reference.
- Topic
- Apps & prototypes
- Type
- Prompt
- Level
- Intermediate
- Time
- about 10 min
Results depend on the tool, the model and what you enter.
Result preview
Example: written by our editors, not real AI output.
## POST /orders Creates an order. | Field | Type | Required | Note | | customer_id | string | yes | from GET /customers | | items | list | yes | at least 1 | | coupon | string | no | upper case | Errors: 409 = coupon already used → resend without coupon Open question: does the limit of 100 calls per minute apply per key or per account?
Fill in
What you type stays in this browser window. We store and send nothing.
- REST API of an online shop
- internal API between two services
- API for partner companies
- webhook API
- GraphQL API
- source code of the routes
- an existing OpenAPI file
- a collection of example calls
- old docs as text
- only team notes
- developer teams at customers
- new people on our own team
- partner companies with no prior knowledge
- support team
- in-house frontend team
Your prompt
You have edited the prompt. Changes in the fields above no longer overwrite it.
This is an instruction for an AI, not the result itself.
Where this prompt works
These AI tools are a good fit for this prompt:
How to use it
- Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
- Copy the finished prompt into an AI tool of your choice.
- Give only the reference to someone who does not know the API. If they make a first successful call without asking, the reference is good.
Why does this work?
References rarely fail because endpoints are missing. They fail on missing error codes, unclear required fields and examples that do not run. A fixed structure per endpoint, plus open questions instead of guessed answers, makes them reliable.
Tips
- Replace keys, tokens and customer data in examples with placeholders before you put material into the AI tool.