Generate multi-file documentation

Generate one documentation output from multiple supplied source files.

{
    "title": "Generate multi-file documentation",
    "description": "",
    "method": "POST",
    "baseUrl": "https://app.docuwriter.ai",
    "endpoint": "/api/generate-multi-file-documentation",
    "headers": [
        {
            "key": "Authorization",
            "value": "Bearer YOUR_API_TOKEN",
            "type": "string",
            "required": true
        },
        {
            "key": "Accept",
            "value": "application/json",
            "type": "string",
            "required": true
        },
        {
            "key": "Content-Type",
            "value": "application/json",
            "type": "string",
            "required": true
        }
    ],
    "queryParams": [],
    "pathParams": [],
    "bodyType": "json",
    "requestBody": "{\n  \"files\": [\n    {\n      \"filename\": \"add.js\",\n      \"source_code\": \"export function add(a, b) { return a + b; }\"\n    },\n    {\n      \"filename\": \"index.js\",\n      \"source_code\": \"export { add } from \\\"./add.js\\\";\"\n    }\n  ],\n  \"language\": \"English\"\n}",
    "formData": [],
    "rawBody": "",
    "responses": {
        "200": {
            "description": "HTTP 200: success: true; data.generation contains generated text; data.generation_id is the numeric saved ID; data.version_number and data.definitive_version_number identify version metadata. Response also includes data.content and data.markdown aliases and a success message. This produces a generation; it does not create a structured documentation Space or repository documentation tree. The file-count ceiling does not override total token limits. Illustrative JSON example; sample values are fictional. Some optional or additional resource fields may be omitted.",
            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"generation\": \"# add\\n\\nReturns the sum of two numbers.\",\n    \"generation_id\": 456,\n    \"version_number\": 1,\n    \"definitive_version_number\": 1,\n    \"content\": \"# add\\n\\nReturns the sum of two numbers.\",\n    \"markdown\": \"# add\\n\\nReturns the sum of two numbers.\"\n  },\n  \"message\": \"Multi-file documentation generated successfully\"\n}"
        },
        "401": {
            "description": "Missing or invalid account API token.Missing or invalid account API token. Example JSON response.",
            "body": "{\n  \"message\": \"Unauthenticated.\"\n}"
        },
        "400": {
            "description": "Example: supplied code exceeds the processing budget.",
            "body": "{\n  \"success\": false,\n  \"message\": \"The provided code is too large for processing. Please reduce the amount of code or number of files and try again.\"\n}"
        }
    }
}

Request fields

Field Requirement
files Required files: array of 1–1000 objects, each with filename (string up to 255 characters) and source_code (string).
output_documentation_type Optional output_documentation_type, language, additional_instructions: strings.
name Optional name: string up to 255 characters.
Behavior These field names differ from the single-file documentation endpoint.

Usage notes

  • Generation is synchronous and may take time.
  • The account must satisfy the generator’s current plan/credit checks (403 if denied).
  • Invalid fields return 422; code exceeding the processing token budget returns 400; upstream or output failures can return 500.
  • There is no idempotency-key contract: inspect generation history after an uncertain timeout before retrying. Errors and retries.

API authentication.

Updated