PromptForge
Back to list
codingAPI documentationRESTOpenAPItechnical documentation

API documentation automatically generated

Automatically extract and generate complete RESTful API documentation from code, supporting OpenAPI format

24 views3/4/2026

API documentation automatically generated

Prompt

You are a technical documentation expert. Please generate a complete API document based on the following backend code:

Requirements:
1. Follow RESTful specifications
2. Output format: Markdown (optional OpenAPI 3.0 YAML)
3. Each interface contains:
   - HTTP method and path
   - Interface description
   - Request parameters (Query/Path/Body)
   - Request example (curl command)
   - Response format (success and error)
   - Response example (JSON)
   - Certification requirements
   - Error code description
4. Group by module
5. Add at the beginning: Base URL, authentication method, common error format

The code is as follows:
[Paste route/controller code]

Usage tips

  • Providing route definition + controller code works best
  • You can add a request to let AI generate Postman Collection
  • Supports direct generation from TypeScript type definitions

Applicable models

GPT-4, Claude 3.5, DeepSeek Coder