Skip to main content
POST
Generate 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: ~3-5 minutes (sync) or instant return (async)
  • Output: Exhaustive analysis, detailed architecture, comprehensive planning

Availability

Deep Spec consumes more credits than Fast Spec and is available on paid plans. See pre.dev/pricing for which plans include it.

Endpoint

Headers

For JSON requests:
For file upload requests:

Request Body

Parameters

For JSON requests: For file upload requests (multipart/form-data):

Deep Spec vs Fast Spec

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)

Success Response (Async Mode)

Immediate response when async: true:

Output Structure: Milestones → Stories → Subtasks

Deep Spec follows a three-level hierarchy for comprehensive implementation planning:
Key Characteristics:
  • 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
Use cases:
  • Feed Cursor/Copilot: codingAgentSpecJson or codingAgentSpecMarkdown
  • Display in PM tools or dashboards: humanSpecJson
  • Export/PDF for clients: humanSpecMarkdown
  • Quick effort check: totalHumanHours or humanSpecJson.totalHours

Type definitions (shared by Fast and Deep Spec)

Coding Agent JSON (concise, no hours/personas/roles):
Human JSON (full detail with hours/personas/roles):

What Makes Deep Spec Different

Deep Spec goes beyond Fast Spec in four ways: richer feature analysis (user journeys, edge cases, cross-feature dependencies), deeper architecture planning (schemas, security, scalability), broader risk assessment (technical, security, compliance), and a fuller implementation roadmap (critical path, resourcing, handoffs). If you’re choosing between the two, see Fast vs Deep Specs — the short version: reach for Deep Spec on complex, multi-team, or compliance-heavy systems.

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 provide docURLs in your request, Architect automatically scrapes the documentation in parallel with spec generation and packages it into downloadable ZIP archives. This feature helps AI agents and developers have context about external APIs, design systems, or frameworks referenced in the spec.

How It Works

  1. Parallel Processing: Documentation scraping runs simultaneously with spec generation (not sequentially), so it doesn’t slow down your request
  2. Graceful Degradation: If documentation scraping fails, spec generation still completes successfully
  3. Organized Archives: Each platform gets its own ZIP with hierarchical folder structure based on the documentation site

Response Field: zippedDocsUrls

Example Request with Documentation URLs

Example Response with Documentation Archives

ZIP Archive Structure

Each ZIP archive contains:
  • Individual markdown files (one per scraped page)
  • Hierarchical folder structure mirroring the documentation site
  • Organized by documentation site structure

Supported Domain Formats

The system handles various domain formats:
  • .com, .io, .org, .net
  • .cloud, .dev, .ai
  • Country-specific TLDs (.co.uk, .com.au, etc.)
  • Newer TLDs (.tech, .app, etc.)

Best Practices for Documentation URLs

Do:
  • ✅ Provide specific documentation pages relevant to your spec
  • ✅ Include API documentation for integrations you’re building
  • ✅ Reference design system docs for UI consistency
  • ✅ Use official documentation sources
Don’t:
  • ❌ Include general marketing pages
  • ❌ Link to blog posts instead of official documentation
  • ❌ Reference deprecated or outdated documentation
  • ❌ Link to non-documentation content

Viewing Documentation Archives

Enterprise users can view and download documentation archives from the API Usage Logs browser:
  1. Navigate to https://pre.dev/enterprise/dashboard?page=api
  2. Click on any API call to open the details modal
  3. View the “Documentation Archives” section
  4. Click download links to get the ZIP files

Error Handling

If documentation scraping fails:
  • zippedDocsUrls will be an empty array []
  • Spec generation continues normally
  • No error is thrown (graceful degradation)
If docURLs is not provided or is an empty array:
  • zippedDocsUrls will be an empty array []
  • Spec generation proceeds normally

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 ~3-5 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

Credits are charged per-inference based on actual token usage: ~10-50 credits for Deep Spec vs ~5-10 for Fast Spec. See Plans & Credits.

Next: Check Status Endpoint

Monitor async specification processing progress.

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

API key for authentication. Get your API key from https://pre.dev/projects/key (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY

Body

input
string
required

Description of what you want to build or the feature you want to add

Example:

"Build a SaaS project management tool with team collaboration and real-time updates"

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

Example:

"Existing Next.js app with Supabase, has auth, task CRUD, team features"

docURLs
string<uri>[]

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

Example:
async
boolean
default:false

If true, returns immediately with requestId for status polling. If false (default), waits for completion

Response

Specification generated successfully

endpoint
enum<string>

Which endpoint was used

Available options:
fast_spec,
deep_spec
input
string

Original input text provided

status
enum<string>

Completion status

Available options:
completed
success
boolean

Whether the request succeeded

humanSpecUrl
string<uri>

URL where the human-readable spec is hosted (downloadable markdown)

totalHumanHours
number

Estimated total hours for a human to implement the spec

architectureInfographicUrl
string<uri>

URL to a visual architecture infographic/diagram for the specification

codingAgentSpecUrl
string<uri>

URL where the coding agent spec format is hosted (downloadable markdown)

codingAgentSpecJson
object

Structured JSON spec optimized for AI coding assistants (excludes hours, personas, roles)

codingAgentSpecMarkdown
string

Markdown spec optimized for AI coding assistants

humanSpecJson
object

Full structured JSON spec with hours, personas, and roles for human review

humanSpecMarkdown
string

Full markdown spec with all details for human review

executionTime
integer

Processing time in milliseconds

predevUrl
string<uri>

pre.dev project URL where you can view and edit the spec

zippedDocsUrls
object[]

Array of scraped documentation archives. Empty array if no docURLs provided or scraping fails. Each object contains platform identifier and download links

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.

userFlowGraph
object

User flow graph with nodes representing user stories/flows and edges showing navigation paths (only when completed)

architectureGraph
object

System architecture graph with C1/C2 level nodes and their relationships (only when completed)

enrichedTechStack
object[]

Enriched tech stack with detailed reasons, descriptions, and alternatives for each technology (only when completed)