The Documentation Generator API provides automated documentation generation capabilities for codebases, creating comprehensive technical documentation from source code analysis.
POST /api/v1/docs/generate
Generates documentation for a specified codebase or project.
{
"project_path": "string",
"output_format": "markdown|html|pdf",
"include_private": false,
"documentation_types": [
"api",
"architecture",
"deployment",
"user_guide"
],
"template": "default|custom",
"custom_template_path": "string",
"language": "auto|python|javascript|typescript|java|csharp",
"exclude_patterns": [
"*/tests/*",
"*/node_modules/*"
]
}
{
"success": true,
"documentation_id": "doc_12345",
"output_path": "/path/to/generated/docs",
"generated_files": [
{
"type": "api",
"path": "/path/to/api-docs.md",
"size_bytes": 15420
}
],
"processing_time_ms": 2500,
"warnings": []
}
GET /api/v1/docs/status/{documentation_id}
Retrieves the status of a documentation generation task.
{
"id": "doc_12345",
"status": "completed|processing|failed",
"progress": 100,
"created_at": "2025-06-17T10:30:00Z",
"completed_at": "2025-06-17T10:32:30Z",
"error_message": null
}
GET /api/v1/docs/templates
Retrieves available documentation templates.
{
"templates": [
{
"name": "default",
"description": "Standard technical documentation template",
"supported_formats": ["markdown", "html", "pdf"],
"documentation_types": ["api", "architecture", "deployment"]
},
{
"name": "enterprise",
"description": "Enterprise-grade documentation with compliance sections",
"supported_formats": ["markdown", "html", "pdf"],
"documentation_types": ["api", "architecture", "deployment", "security", "compliance"]
}
]
}
PUT /api/v1/docs/{documentation_id}
Updates existing documentation with new content or regenerates based on code changes.
{
"regenerate": true,
"update_sections": ["api", "architecture"],
"preserve_custom_content": true
}
{
"success": true,
"updated_files": [
"/path/to/updated-api-docs.md"
],
"processing_time_ms": 1500
}
DELETE /api/v1/docs/{documentation_id}
Removes generated documentation and associated metadata.
{
"success": true,
"message": "Documentation deleted successfully"
}
Custom templates can be provided using Jinja2 syntax:
{
"template": "custom",
"custom_template_path": "/path/to/custom-template.j2",
"template_variables": {
"company_name": "Aurelis",
"version": "1.0.0",
"author": "Development Team"
}
}
400
: Invalid request parameters404
: Documentation or template not found422
: Unsupported file format or language500
: Documentation generation failed{
"success": false,
"error": {
"code": "INVALID_PROJECT_PATH",
"message": "The specified project path does not exist or is not accessible",
"details": {
"path": "/invalid/path",
"suggestion": "Verify the path exists and has proper permissions"
}
}
}
curl -X POST "https://api.aurelis.dev/v1/docs/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_path": "/workspace/my-project",
"output_format": "markdown",
"documentation_types": ["api", "architecture"],
"include_private": false
}'
curl -X GET "https://api.aurelis.dev/v1/docs/status/doc_12345" \
-H "Authorization: Bearer YOUR_API_KEY"
from aurelis import DocsGenerator
generator = DocsGenerator(api_key="your_api_key")
# Generate documentation
result = generator.generate(
project_path="/workspace/my-project",
output_format="markdown",
documentation_types=["api", "architecture"]
)
# Check status
status = generator.get_status(result.documentation_id)
aurelis docs generate \
--project-path /workspace/my-project \
--output-format markdown \
--types api,architecture \
--template enterprise
For issues with documentation generation, contact support with: