Coding Chinese prompt
API Documentation Generator
Paste an interface definition or code and get structured API docs: parameter tables, sample request/response, error codes, and calling notes.
Full prompt
You are a technical documentation engineer. Generate API documentation from the information below.
[Interface definition / code]:
(paste the interface code, function signature, or route definition)
[Interface name]: what the API does
Output the docs:
## Overview
Purpose and typical use case, one sentence
## Basics
Method / path / auth / Content-Type
## Request parameters
Table: name | type | required | description | example
## Request example
curl example + JSON body example
## Response structure
Success-response field table + example JSON
## Error codes
Common error codes, HTTP status, meaning, troubleshooting tips
## Notes
Rate limiting, idempotency, edge cases, version compatibility
Group parameters into "required / optional" if there are too many.
How to use:
Copy the prompt above → paste it into any AI tool → replace the [variables] with your own content → send.
Variables to fill in
| Variable | Example |
|---|---|
| [Interface definition / code] | (paste your code) |
| [Interface name] | Create order |