Overview
The Docs member type automatically generates and serves beautiful, interactive API documentation for your Conductor project. Choose from multiple UI frameworks and let Conductor scan your ensembles and members to create a complete OpenAPI specification. Key Features:- 📚 Auto-Generation - Scans ensembles/members to build OpenAPI spec
- 🎨 Multiple UIs - Stoplight, Redoc, Swagger, Scalar, or RapiDoc
- 🤖 AI Enhancement - Use AI to generate better descriptions
- 🔒 Auth Support - Document API keys, OAuth flows
- ⚡ Edge Caching - Fast docs delivery with configurable TTL
- 🎯 Multiple Formats - Serve YAML, JSON, and interactive HTML
Quick Start
Simplest Setup (New in v1.1!)
Create a docs member atmembers/api-docs.yaml:
/api-docs with default settings.
Public Documentation
For public API docs accessible to everyone:/docs- Interactive documentation/docs/openapi.yaml- OpenAPI spec (YAML)/docs/openapi.json- OpenAPI spec (JSON)
Authenticated Documentation
For internal API docs that require authentication:Admin-Only Documentation
For sensitive admin endpoints with role-based access:UI Frameworks
Stoplight Elements (Recommended)
Modern, feature-rich UI with excellent UX:Redoc
Clean, three-panel layout:Swagger UI
Classic Swagger interface:Scalar
Modern, fast, and beautiful:RapiDoc
Highly customizable:Auto-Generation
Enable Auto-Generation
Let Conductor scan your project:AI-Enhanced Descriptions
Use AI to generate better documentation:- Generate clear descriptions for endpoints
- Add example requests/responses
- Improve parameter documentation
- Suggest best practices
Branding & Customization
Complete Branding
Custom Styling
Add your own CSS to match your brand:Server Configuration
Multiple Environments
Document different environments:Base Path
Set a base path for all endpoints:Route Authentication (New in v1.1!)
The Docs member now integrates with Conductor’s UnifiedRouter for powerful authentication and routing capabilities.Public Documentation (No Auth)
- Public API documentation
- Open-source project docs
- Marketing/developer portal
Optional Authentication
- Non-authenticated users can browse docs
- Authenticated users see “Try It” button
- Great for freemium APIs
Required Authentication
- Internal API documentation
- Partner API docs
- Private beta documentation
Role-Based Access
Permission-Based Access
Custom Failure Handling
Redirect to login:Rate Limiting
Protect your docs from abuse:keyBy:
ip- Limit by IP address (public routes)user- Limit by authenticated user IDapiKey- Limit by API key
Stealth Mode
Return 404 instead of 401 for hidden endpoints:Default Route Resolution
Usedefault to auto-resolve route from file location:
Authentication Methods
Supported methods:bearer- JWT Bearer tokensapiKey- API keys (from KV)cookie- Session cookies (from KV)unkey- Unkey.dev integrationcustom- Custom validators (webhooks, etc.)
Complete Routing Example
Caching
Enable Caching
Speed up docs delivery:- ✅ Production docs (TTL: 3600)
- ✅ Stable APIs (TTL: 600)
- ❌ Development (disabled)
- ❌ Frequently changing APIs (TTL: 60)
Custom OpenAPI Spec
Provide Your Own Spec
Instead of auto-generation:Load from File
Integration
Add to Worker
In yoursrc/index.ts:
Complete Example
A production-ready docs member:Best Practices
1. Use AI Enhancement for Better Docs
2. Cache Appropriately
3. Exclude Internal Endpoints
4. Brand Your Docs
Match your company’s branding:5. Document Multiple Environments
Configuration Reference
UI Options
stoplight- Stoplight Elements (recommended)redoc- Redocswagger- Swagger UIscalar- Scalarrapidoc- RapiDoc
Paths Config
Auto-Generate Config
Branding Config
Auth Config
Cache Config
Related
- Page Member - For web pages
- API Member - For REST endpoints
- OpenAPI CLI - Generate docs from CLI

