Generate Deep Spec
Complete documentation for the Deep Spec endpoint. Generate exhaustive, enterprise-grade project specifications.
Documentation Index
Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
Use this file to discover all available pages before exploring further.
POST /deep-spec
Generate an ultra-detailed, comprehensive project specification.Overview
- Cost: Variable (typically ~10-50 credits based on complexity)
- Use Cases: Complex systems, enterprise applications, critical projects
- Processing Time: ~2-3 minutes (sync) or instant return (async)
- Output: Exhaustive analysis, detailed architecture, comprehensive planning
Subscription Required
Deep Spec requires Solo Premium or Enterprise subscription.Endpoint
Headers
For JSON requests:Request Body
Parameters
For JSON requests:| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | ✅ | Description of what you want to build |
currentContext | string | ❌ | CRITICAL: Existing project/codebase context. When provided, generates feature addition spec. When omitted, generates full new project spec with setup, deployment, docs, maintenance |
docURLs | string[] | ❌ | Optional: Array of documentation URLs that Architect will reference when generating specifications. Useful for API documentation, design systems, or existing project docs |
async | boolean | ❌ | false (default) - wait for completion, or true - return immediately with requestId for status polling |
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | ❌ | Optional: File to be parsed as input (e.g., existing code, documentation, requirements). Can be used alone or combined with input text |
input | string | ❌ | Optional: Additional text description when using file upload. Can be empty string if using only file |
docURLs | string[] | ❌ | Optional: Array of documentation URLs that Architect will reference when generating specifications. Useful for API documentation, design systems, or existing project docs |
async | boolean | ❌ | false (default) - wait for completion, or true - return immediately with requestId for status polling |
Deep Spec vs Fast Spec
| Feature | Fast Spec | Deep Spec |
|---|---|---|
| Cost | ~5-10 credits | ~10-50 credits |
| Processing Time | 30-40 sec | 2-3 min |
| Structure | Milestones → Stories | Milestones → Stories → Subtasks |
| Detail Level | Comprehensive | Ultra-detailed |
| Best For | MVPs, prototypes | Enterprise, complex systems |
| Feature Analysis | ✅ | ✅✅✅ |
| Architecture Depth | ✅ | ✅✅✅ |
| Risk Analysis | ✅ | ✅✅✅ |
| User Stories | ✅ | ✅✅✅ |
Example Requests
New Enterprise Project
Complex Feature Addition
Async Processing
Example: With Documentation URLs
Example: With File Upload
Example: File Upload with Existing Context
Response
Success Response (Sync Mode)
| Field | Type | Description |
|---|---|---|
endpoint | string | Endpoint used: "deep_spec" |
input | string | Original input text provided |
status | string | Completion status: "completed" when successful |
success | boolean | Whether the request succeeded |
humanSpecUrl | string | URL where the human-readable spec is hosted (downloadable markdown) |
humanSpecMarkdown | string | Full markdown SOW with all details |
humanSpecJson | object | Full structured SOW JSON (hours, personas, roles) |
totalHumanHours | number | Estimated total hours for a human to implement the spec |
architectureInfographicUrl | string | URL to a visual architecture infographic/diagram for the specification |
codingAgentSpecUrl | string | URL where the coding agent spec format is hosted (downloadable markdown) |
codingAgentSpecMarkdown | string | Simplified markdown SOW for AI tools |
codingAgentSpecJson | object | Simplified structured SOW JSON for AI tools |
executionTime | number | Processing time in milliseconds |
predevUrl | string | pre.dev project URL where you can view and edit the spec |
creditsUsed | number | Total credits consumed by this spec generation. Available in real-time during processing and persisted on completion. Typical values: Fast spec ~5-10, Deep spec ~10-50 |
zippedDocsUrls | array | New: Array of scraped documentation archives. Each object contains platform (hostname from the doc URL), masterZipShortUrl (download link to the ZIP archive), and optional masterMarkdownShortUrl (consolidated markdown). Empty array if no docURLs provided or scraping fails |
Success Response (Async Mode)
Immediate response whenasync: true:
| Field | Type | Description |
|---|---|---|
specId | string | Unique ID to poll for status (use with /api/spec-status/:specId) |
status | string | Initial status: "pending" |
Output Structure: Milestones → Stories → Subtasks
Deep Spec follows a three-level hierarchy for comprehensive implementation planning:- ✅ High-level milestones group related features
- ✅ Detailed user stories with comprehensive acceptance criteria
- ✅ Granular implementation subtasks (DB, API, Frontend, Testing, Docs)
- ✅ Subtasks categorized by layer (DB, Infra, FE, API, Backend, QA, Docs)
- ✅ Task-level complexity estimates for precise planning
Direct SOW Formats
Deep Spec returns the full Scope of Work inline, and also provides URL endpoints:- codingAgentSpecJson / codingAgentSpecMarkdown: concise outputs for AI coding assistants (no hours/personas/roles)
- humanSpecJson / humanSpecMarkdown: full outputs with hours, personas, and roles for stakeholder review
- Feed Cursor/Copilot:
codingAgentSpecJsonorcodingAgentSpecMarkdown - Display in PM tools or dashboards:
humanSpecJson - Export/PDF for clients:
humanSpecMarkdown - Quick effort check:
totalHumanHoursorhumanSpecJson.totalHours
Type Definitions (shared across Fast/Deep)
What Makes Deep Spec Different
Deep Spec provides enterprise-grade analysis that goes far beyond Fast Spec:Enhanced Feature Analysis
- Detailed user journey mapping for each feature
- Comprehensive edge case analysis
- Advanced user story elaboration with detailed acceptance criteria
- Cross-feature dependency mapping
Advanced Architecture Planning
- Detailed system design diagrams (when applicable)
- Comprehensive database schema design
- Advanced security architecture planning
- Scalability modeling and capacity planning
- Performance optimization strategies
Extensive Risk Assessment
- Detailed technical risk analysis with mitigation strategies
- Comprehensive security threat modeling
- Regulatory compliance mapping (GDPR, HIPAA, SOX, etc.)
- Operational risk assessment and business continuity planning
Enterprise-Ready Planning
- Detailed implementation roadmap with critical path analysis
- Resource allocation recommendations
- Stakeholder communication strategies
- Change management planning
- Training and documentation requirements
When to Use Deep Spec
Enterprise Applications
- Healthcare platforms with regulatory requirements
- Financial systems with compliance needs
- Large-scale SaaS platforms with complex workflows
- Mission-critical internal tools
Complex System Requirements
- Multi-tenant architectures
- Real-time processing systems
- High-throughput applications
- Systems requiring 99.9%+ uptime
Large Team Coordination
- Projects with 5+ developers
- Cross-functional team collaboration
- Extended development timelines (6+ months)
- Projects requiring detailed handoffs
Code Examples
cURL - Enterprise Healthcare Platform
Python - Financial Services Platform
JavaScript - Complex SaaS Application
Deep Spec Output Structure
1. Executive Summary & Business Case
- Detailed problem statement and solution approach
- Success metrics and KPIs
- Stakeholder analysis
- High-level timeline and milestones
2. Comprehensive Feature Catalog
- Detailed feature specifications with user stories
- Complex workflow documentation
- Integration requirements mapping
- Third-party service dependencies
3. Enterprise Architecture Design
- System architecture diagrams
- Database design specifications
- API design and integration patterns
- Security architecture blueprint
4. Implementation Strategy
- Detailed development phases with dependencies
- Critical path identification
- Risk mitigation strategies
- Quality assurance approach
5. Operational Considerations
- Deployment strategy and environment planning
- Monitoring and alerting requirements
- Backup and disaster recovery planning
- Support and maintenance guidelines
Documentation Scraping & Archives
Overview
When you providedocURLs in your request, Architect automatically scrapes the documentation in parallel with spec generation and packages it into downloadable ZIP archives. This is especially valuable for Deep Spec where you’re building complex enterprise systems with multiple integrations.
How It Works
- Parallel Processing: Documentation scraping runs simultaneously with spec generation, so it doesn’t extend the already longer Deep Spec generation time
- Graceful Degradation: If documentation scraping fails, spec generation still completes
- Enterprise-Grade Archives: Each platform gets a well-organized ZIP with hierarchical structure
Response Field: zippedDocsUrls
Example: Healthcare Platform with Multiple Documentation Sources
Enterprise Use Cases
Healthcare Systems:- HL7 FHIR implementation guides
- HIPAA compliance documentation
- Medical device integration specs
- Telemedicine API documentation
- Payment gateway documentation (Stripe, Square)
- Banking API specifications
- Regulatory compliance guides (SEC, FINRA)
- Cryptocurrency exchange APIs
- Third-party integration documentation
- Enterprise SSO providers (Okta, Auth0)
- Cloud infrastructure docs (AWS, GCP, Azure)
- Analytics and monitoring platforms
ZIP Archive Structure
Enterprise documentation archives contain:- Individual markdown files per documentation page
- Hierarchical folder structure mirroring the site
- Organized by topic/section for easy navigation
- Comprehensive coverage of scraped documentation
Best Practices for Enterprise Documentation
Do:- ✅ Include compliance and regulatory documentation
- ✅ Add integration partner API docs
- ✅ Reference internal architecture documentation
- ✅ Include security and authentication specifications
- ✅ Provide infrastructure and deployment guides
- ❌ Duplicate URLs from the same domain
- ❌ Include marketing or sales pages
- ❌ Link to outdated or deprecated documentation
- ❌ Add overly broad documentation portals
Viewing Documentation Archives
Enterprise users access documentation archives through the API Usage Logs:- Visit https://pre.dev/enterprise/dashboard?page=api
- Click any API call to open the log details modal
- View “Documentation Archives” section
- Download ZIP files for offline reference
- Share archives with your development team
Integration with Deep Spec Workflow
Documentation archives complement Deep Spec’s detailed analysis:- During Generation: AI references provided docs for accurate integration specs
- After Generation: Development team has complete documentation context
- During Implementation: Developers download archives for detailed reference
- For Review: Stakeholders can verify external dependencies and APIs
Error Handling
Scraping Failures:zippedDocsUrlsreturns empty array[]- Deep Spec generation completes normally
- No errors thrown (graceful degradation)
docURLs Parameter:
zippedDocsUrlsreturns empty array[]- Deep Spec generation proceeds as normal
- Successfully scraped platforms included in response
- Failed platforms omitted from
zippedDocsUrls - Deep Spec generation completes with available documentation
Best Practices for Deep Spec
Input Quality for Complex Projects
- Detailed business requirements - Include specific compliance needs
- Technical constraints - Existing systems, performance requirements
- Scale expectations - User numbers, data volume, transaction rates
- Integration landscape - Existing tools, APIs, third-party services
- Documentation URLs - Provide comprehensive documentation for all external dependencies
Planning for Enterprise Projects
- Allocate sufficient time - Deep specs can take 2-3 minutes
- Use async mode for the best experience with complex inputs
- Review thoroughly - Deep specs contain extensive detail requiring careful review
- Share with stakeholders - Use as a comprehensive project brief
- Distribute documentation archives - Ensure development team has complete context
Cost Considerations
- Variable pricing - Credits charged per-inference based on actual token usage (~10-50 credits for Deep Spec vs ~5-10 for Fast Spec)
- Significant time savings downstream - Reduces costly rework and scope changes
- Better resource allocation - Clear requirements prevent over/under-engineering
- Comprehensive documentation - Archives save hours of documentation gathering
Next: Check Status Endpoint
Authorizations
API key for authentication. Get your API key from https://pre.dev/projects/playground (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY
Body
Description of what you want to build or the feature you want to add
"Build a SaaS project management tool with team collaboration and real-time updates"
CRITICAL: Existing project/codebase context. When provided, generates feature addition spec. When omitted, generates full new project spec with setup, deployment, docs, maintenance
"Existing Next.js app with Supabase, has auth, task CRUD, team features"
Optional array of documentation URLs that Architect will reference when generating specifications. Each URL is automatically scraped and packaged into downloadable ZIP archives organized by platform
[
"https://docs.pre.dev",
"https://docs.stripe.com"
]If true, returns immediately with requestId for status polling. If false (default), waits for completion
Response
Specification generated successfully
- Option 1
- Option 2
Which endpoint was used
fast_spec, deep_spec Original input text provided
Completion status
completed Whether the request succeeded
URL where the human-readable spec is hosted (downloadable markdown)
Estimated total hours for a human to implement the spec
URL to a visual architecture infographic/diagram for the specification
URL where the coding agent spec format is hosted (downloadable markdown)
Structured JSON spec optimized for AI coding assistants (excludes hours, personas, roles)
Markdown spec optimized for AI coding assistants
Full structured JSON spec with hours, personas, and roles for human review
Full markdown spec with all details for human review
Processing time in milliseconds
pre.dev project URL where you can view and edit the spec
Array of scraped documentation archives. Empty array if no docURLs provided or scraping fails. Each object contains platform identifier and download links
Total credits consumed by this spec generation. Available in real-time during processing and persisted on completion. Typical values: Fast spec ~5-10, Deep spec ~10-50.
User flow graph with nodes representing user stories/flows and edges showing navigation paths (only when completed)
System architecture graph with C1/C2 level nodes and their relationships (only when completed)
Enriched tech stack with detailed reasons, descriptions, and alternatives for each technology (only when completed)

