curl --fail-with-body https://api.pre.dev/deep-spec \
-H "Authorization: Bearer $PREDEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Build a team task manager with projects, assignees, and due dates.",
"async": true
}'import requests
url = "https://api.pre.dev/deep-spec"
payload = { "input": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({input: '<string>'})
};
fetch('https://api.pre.dev/deep-spec', 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/deep-spec",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/deep-spec"
payload := strings.NewReader("{\n \"input\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pre.dev/deep-spec")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/deep-spec")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"specId": "507f1f77bcf86cd799439011",
"status": "pending"
}Generate a Deep Spec
Generate a detailed implementation specification with milestones, stories, and granular subtasks.
curl --fail-with-body https://api.pre.dev/deep-spec \
-H "Authorization: Bearer $PREDEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Build a team task manager with projects, assignees, and due dates.",
"async": true
}'import requests
url = "https://api.pre.dev/deep-spec"
payload = { "input": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({input: '<string>'})
};
fetch('https://api.pre.dev/deep-spec', 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/deep-spec",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/deep-spec"
payload := strings.NewReader("{\n \"input\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pre.dev/deep-spec")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/deep-spec")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"specId": "507f1f77bcf86cd799439011",
"status": "pending"
}Example
curl --fail-with-body https://api.pre.dev/deep-spec \
-H "Authorization: Bearer $PREDEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Build an organization-scoped reporting platform with scheduled exports, audit logs, and role-based access.",
"async": true
}'
specId from the HTTP 200 response, then poll its status. Async submission is useful for detailed specifications because generation can outlast client or proxy timeouts.
Inputs and outputs explains file uploads, existing context, JSON, Markdown, and graphs. Credit use is variable; inspect creditsUsed rather than assuming a fixed per-request price. Access and trial errors follow the same authentication and error rules as Fast Spec.Authorizations
Use a pre.dev API key from https://pre.dev/projects/key.
Body
Project requirements. Include goals, users, constraints, and acceptance criteria.
1Existing system or specification as text; this is not a spec ID.
Public documentation URLs; retrieval and downloadable archives are best effort.
Return {specId, status: pending} immediately. Poll GET /spec-status/{specId}.
Response
Full result for synchronous requests; specId and pending status for asynchronous requests.
- Option 1
- Option 2
Full specification/status record. Fields may be absent or null until available. Terminal status is completed or failed. executionTime is milliseconds.
completed 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?

