Spec Status
Monitor the progress of asynchronous specification processing requests.
Overview
When you make an async request ("async": true), use this endpoint to poll for completion status.
Endpoint
Parameters
Example Request
specId in the URL is the value returned as specId from the async spec generation request.Response
Pending
Processing
Completed
Failed
Response Fields
Fetching the spec URLs
humanSpecUrl and codingAgentSpecUrl are public short links (https://api.pre.dev/s/...). They need no auth header and return the document directly (markdown, or a zip for bundles):
humanSpecMarkdown / codingAgentSpecMarkdown, so you rarely need to fetch the URLs at all.
Polling Best Practices
Polling Interval
- Recommended: Poll every 10-15 seconds
- Minimum: Don’t poll more frequently than every 5 seconds
- Maximum: No need to poll more than every 30 seconds
Example Polling Script
Python Polling Example
JavaScript Polling Example
Expected Processing Times
Error Handling
Common Issues
Spec ID Not Found:Best Practices
User Experience
- Show a loading indicator while polling
- Display progress messages to users
- Set a reasonable timeout (e.g., 30 minutes)
- Provide a way to cancel or retry
Rate Limiting
- Respect the polling interval recommendations
- Implement exponential backoff for retries
- Handle rate limit responses gracefully
Monitoring
- Log polling attempts for debugging
- Track completion times for performance monitoring
- Alert on unusual failure rates
Architect API Overview
Authorizations
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
Path Parameters
The unique ID returned from an async spec generation request
"507f1f77bcf86cd799439011"
Response
Status retrieved successfully
MongoDB ObjectId of the spec request
ISO timestamp when the request was created
Which endpoint was used
fast_spec, deep_spec Original input text provided
Current status
pending, processing, completed, failed Whether the request succeeded
Short URL for uploaded file (if file was uploaded)
Name of uploaded file (if file was uploaded)
URL where the human-readable spec is hosted (only when completed)
Estimated total hours for a human to implement the spec (only when completed)
URL to a visual architecture infographic/diagram for the specification (only when completed)
URL where the coding agent spec format is hosted (only when completed)
Structured JSON spec optimized for AI coding assistants (only when completed)
Markdown spec optimized for AI coding assistants (only when completed)
Full structured JSON spec with hours, personas, and roles (only when completed)
Full markdown spec with all details for human review (only when completed)
Processing time in milliseconds (only when completed or failed)
pre.dev project URL (only when completed)
Array of scraped documentation archives (only when completed). Empty array if no docURLs provided or scraping fails
Error description (only when failed)
Completion percentage (0-100) while processing
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)
Human-readable progress description (e.g. 'Generating architecture...')

