curl --request GET \
--url https://api.pre.dev/spec-status/{specId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pre.dev/spec-status/{specId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pre.dev/spec-status/{specId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pre.dev/spec-status/{specId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/spec-status/{specId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pre.dev/spec-status/{specId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/spec-status/{specId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "pending",
"_id": "<string>",
"created": "2023-11-07T05:31:56Z",
"endpoint": "fast_spec",
"input": "<string>",
"success": true,
"uploadedFileShortUrl": "<string>",
"uploadedFileName": "<string>",
"humanSpecUrl": "<string>",
"totalHumanHours": 123,
"architectureInfographicUrl": "<string>",
"codingAgentSpecUrl": "<string>",
"codingAgentSpecJson": {
"executiveSummary": "<string>",
"coreFunctionalities": [
{
"name": "<string>",
"description": "<string>",
"priority": "High"
}
],
"techStack": [
{
"name": "<string>",
"category": "<string>"
}
],
"milestones": [
{
"milestoneNumber": 123,
"description": "<string>",
"stories": [
{
"title": "<string>",
"subTasks": [
{
"description": "<string>",
"complexity": "S",
"id": "<string>"
}
],
"id": "<string>",
"description": "<string>",
"acceptanceCriteria": [
"<string>"
],
"complexity": "<string>"
}
]
}
],
"title": "<string>",
"techStackGrouped": {}
},
"codingAgentSpecMarkdown": "<string>",
"humanSpecJson": {
"executiveSummary": "<string>",
"coreFunctionalities": [
{
"name": "<string>",
"description": "<string>",
"priority": "High"
}
],
"personas": [
{
"title": "<string>",
"description": "<string>",
"primaryGoals": [
"<string>"
],
"painPoints": [
"<string>"
],
"keyTasks": [
"<string>"
]
}
],
"techStack": [
{
"name": "<string>",
"category": "<string>"
}
],
"milestones": [
{
"milestoneNumber": 123,
"description": "<string>",
"hours": 123,
"stories": [
{
"title": "<string>",
"hours": 123,
"subTasks": [
{
"description": "<string>",
"hours": 123,
"complexity": "<string>",
"id": "<string>",
"roles": [
{
"name": "<string>",
"shortHand": "<string>"
}
]
}
],
"id": "<string>",
"description": "<string>",
"acceptanceCriteria": [
"<string>"
],
"complexity": "<string>"
}
]
}
],
"totalHours": 123,
"roles": [
{
"name": "<string>",
"shortHand": "<string>"
}
],
"title": "<string>",
"techStackGrouped": {}
},
"humanSpecMarkdown": "<string>",
"executionTime": 123,
"predevUrl": "<string>",
"zippedDocsUrls": [
{
"platform": "stripe.com",
"masterZipShortUrl": "<string>",
"masterMarkdownShortUrl": "<string>"
}
],
"errorMessage": "<string>",
"progress": 123,
"creditsUsed": 123,
"userFlowGraph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"description": "<string>",
"level": 123,
"hours": 123
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"description": "<string>",
"edgeType": "<string>"
}
]
},
"architectureGraph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"description": "<string>",
"level": 123,
"hours": 123
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"description": "<string>",
"edgeType": "<string>"
}
]
},
"enrichedTechStack": [
{
"name": "<string>",
"useFor": "<string>",
"reason": "<string>",
"description": "<string>",
"link": "<string>",
"helpfulLinks": [
{
"url": "<string>",
"description": "<string>"
}
],
"alternatives": [
{
"name": "<string>",
"link": "<string>",
"description": "<string>"
}
]
}
],
"progressMessage": "<string>",
"currentContext": "<string>",
"specSource": "<string>",
"docURLs": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}Get specification status
Retrieve generation progress, a failure message, or the complete specification artifacts.
curl --request GET \
--url https://api.pre.dev/spec-status/{specId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pre.dev/spec-status/{specId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pre.dev/spec-status/{specId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pre.dev/spec-status/{specId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/spec-status/{specId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pre.dev/spec-status/{specId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/spec-status/{specId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "pending",
"_id": "<string>",
"created": "2023-11-07T05:31:56Z",
"endpoint": "fast_spec",
"input": "<string>",
"success": true,
"uploadedFileShortUrl": "<string>",
"uploadedFileName": "<string>",
"humanSpecUrl": "<string>",
"totalHumanHours": 123,
"architectureInfographicUrl": "<string>",
"codingAgentSpecUrl": "<string>",
"codingAgentSpecJson": {
"executiveSummary": "<string>",
"coreFunctionalities": [
{
"name": "<string>",
"description": "<string>",
"priority": "High"
}
],
"techStack": [
{
"name": "<string>",
"category": "<string>"
}
],
"milestones": [
{
"milestoneNumber": 123,
"description": "<string>",
"stories": [
{
"title": "<string>",
"subTasks": [
{
"description": "<string>",
"complexity": "S",
"id": "<string>"
}
],
"id": "<string>",
"description": "<string>",
"acceptanceCriteria": [
"<string>"
],
"complexity": "<string>"
}
]
}
],
"title": "<string>",
"techStackGrouped": {}
},
"codingAgentSpecMarkdown": "<string>",
"humanSpecJson": {
"executiveSummary": "<string>",
"coreFunctionalities": [
{
"name": "<string>",
"description": "<string>",
"priority": "High"
}
],
"personas": [
{
"title": "<string>",
"description": "<string>",
"primaryGoals": [
"<string>"
],
"painPoints": [
"<string>"
],
"keyTasks": [
"<string>"
]
}
],
"techStack": [
{
"name": "<string>",
"category": "<string>"
}
],
"milestones": [
{
"milestoneNumber": 123,
"description": "<string>",
"hours": 123,
"stories": [
{
"title": "<string>",
"hours": 123,
"subTasks": [
{
"description": "<string>",
"hours": 123,
"complexity": "<string>",
"id": "<string>",
"roles": [
{
"name": "<string>",
"shortHand": "<string>"
}
]
}
],
"id": "<string>",
"description": "<string>",
"acceptanceCriteria": [
"<string>"
],
"complexity": "<string>"
}
]
}
],
"totalHours": 123,
"roles": [
{
"name": "<string>",
"shortHand": "<string>"
}
],
"title": "<string>",
"techStackGrouped": {}
},
"humanSpecMarkdown": "<string>",
"executionTime": 123,
"predevUrl": "<string>",
"zippedDocsUrls": [
{
"platform": "stripe.com",
"masterZipShortUrl": "<string>",
"masterMarkdownShortUrl": "<string>"
}
],
"errorMessage": "<string>",
"progress": 123,
"creditsUsed": 123,
"userFlowGraph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"description": "<string>",
"level": 123,
"hours": 123
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"description": "<string>",
"edgeType": "<string>"
}
]
},
"architectureGraph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"description": "<string>",
"level": 123,
"hours": 123
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"description": "<string>",
"edgeType": "<string>"
}
]
},
"enrichedTechStack": [
{
"name": "<string>",
"useFor": "<string>",
"reason": "<string>",
"description": "<string>",
"link": "<string>",
"helpfulLinks": [
{
"url": "<string>",
"description": "<string>"
}
],
"alternatives": [
{
"name": "<string>",
"link": "<string>",
"description": "<string>"
}
]
}
],
"progressMessage": "<string>",
"currentContext": "<string>",
"specSource": "<string>",
"docURLs": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"actionUrl": "<string>",
"requiresSubscription": true,
"trialsUsed": 123,
"maxTrials": 123
}specId returned by an async request. IDs are 24-character hexadecimal strings; copy the returned value rather than constructing one.
curl --fail-with-body "https://api.pre.dev/spec-status/$SPEC_ID" \
-H "Authorization: Bearer $PREDEV_API_KEY"
Status lifecycle
| Status | Meaning | Action |
|---|---|---|
pending | Accepted and waiting to start | Keep polling |
processing | Generation is underway | Display progress and keep polling |
completed | Generation finished | Read the specification artifacts |
failed | Generation failed | Read errorMessage |
_id, while the async submission names that value specId.
progress is a percentage and progressMessage is display text. Completed requests report progress 100; a failed request can report progress 0. Progress is not a substitute for checking status.
Result fields
Full results can include both specification variants as JSON and Markdown, download URLs, graphs, technology explanations, archives, estimates, and credit usage. See inputs and outputs. Optional fields can be absent or null until their artifacts exist. A successful status lookup is HTTP200 even when the generation status is failed. A malformed ID returns 400; a missing or inaccessible request returns 404.Authorizations
Use a pre.dev API key from https://pre.dev/projects/key.
Path Parameters
24-character record ID.
^[a-fA-F0-9]{24}$Response
Current spec record.
Full specification/status record. Fields may be absent or null until available. Terminal status is completed or failed. executionTime is milliseconds.
pending, processing, completed, failed 24-character record ID.
^[a-fA-F0-9]{24}$Which endpoint was used
fast_spec, deep_spec Original input text provided
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)
Show child attributes
Show child attributes
Markdown spec optimized for AI coding assistants (only when completed)
Full structured JSON spec with hours, personas, and roles (only when completed)
Show child attributes
Show child attributes
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
Show child attributes
Show child attributes
Error description (only when failed)
Completion percentage (0-100) while processing
Measured credit usage; estimates are not fixed charges.
User flow graph with nodes representing user stories/flows and edges showing navigation paths (only when completed)
Show child attributes
Show child attributes
System architecture graph with C1/C2 level nodes and their relationships (only when completed)
Show child attributes
Show child attributes
Enriched tech stack with detailed reasons, descriptions, and alternatives for each technology (only when completed)
Show child attributes
Show child attributes
Human-readable progress description (e.g. 'Generating architecture...')
Existing context supplied with generation.
Origin of the request, such as api or mcp.
Was this page helpful?

