Back to prompt library
Text · General-purpose LLMAPI documentation is generated automaticallyPW
CreatorPrompt2 Editorial DepartmentCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment and engineering

API documentation is generated automatically

Automatically extracts and generates complete RESTful API documentation from code, supporting OpenAPI format

71Views
Full promptReplace variables in braces, then use it directly

# API documentation is automatically generated ## Prompt ``` You are a technical documentation expert. Please generate the complete API documentation based on the following backend code: Requirements: 1. Follow RESTful standards 2. Output format: Markdown (optional OpenAPI 3.0 YAML) 3. Each interface includes: - HTTP methods and paths - Interface description - Request parameters (Query / Path / Body) - Request Example (curl command) - Response formats (success and error) - Response Example (JSON) - Certification requirements - Error code explanation 4. Grouping by module 5. At the beginning, add: Base URL, authentication method, and general error format The code is as follows: [Paste route/controller code] ``` ## Usage Tips - Providing route definitions + controller code works best - You can add requests to have AI generate Postman Collections - Supports direct generation from TypeScript type definitions ## Applicable Models GPT-4、Claude 3.5、DeepSeek Coder

3/4/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.