Specs (Architect)
Generate a Fast Spec
Generate a specification with architecture, milestones, user stories, and acceptance criteria.
Fast Spec is a concise planning pass. Compare Fast and Deep, or read inputs and outputs for context, uploads, and artifact formats.
Example
curl --fail-with-body https://api.pre.dev/fast-spec \
-H "Authorization: Bearer $PREDEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Add CSV exports to the reporting dashboard.",
"currentContext": "Existing TypeScript app with a reports API and organization-scoped access.",
"async": true
}'With async: true, HTTP 200 returns { "specId": "…", "status": "pending" }. Poll spec status using the returned ID. With async omitted or false, the connection waits for the completed specification; long requests can exceed your client’s timeout.
Access and cost
A key for a paid plan or a team workspace is required; Plus and team workspaces without a plan get a limited specification trial, and paid generation needs available credits. See authentication.
Generation cost varies with the request. The completed result includes creditsUsed when available. A network timeout does not prove generation stopped; check history before creating another spec.
Errors
| Status | When |
|---|---|
400 | No input or file, or docURLs is not an array of strings |
401 | Missing or invalid key, or a personal key without a paid plan |
402 | Not enough credits to start |
403 | The specification trial is used up (Plus, or a team workspace without a plan), or the call came from a browser origin that is not allowed |
500 | Generation failed. Check history before retrying |
Each status has an example body in the response examples. See errors and retries.
curl --fail-with-body https://api.pre.dev/fast-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}'const body = JSON.stringify({ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true})fetch("https://api.pre.dev/fast-spec", { method: "POST", headers: { "Content-Type": "application/json" }, body})package mainimport ( "fmt" "net/http" "io/ioutil" "strings")func main() { url := "https://api.pre.dev/fast-spec" body := strings.NewReader(`{ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true }`) req, _ := http.NewRequest("POST", url, body) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}import requestsurl = "https://api.pre.dev/fast-spec"body = """{ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json"})print(response.text)import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.http.HttpResponse.BodyHandlers;import java.time.Duration;import java.net.http.HttpRequest.BodyPublishers;var body = BodyPublishers.ofString("""{ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true}""");HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build();HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.pre.dev/fast-spec")) .header("Content-Type", "application/json") .POST(body) .build();try { HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString()); System.out.println("Status code: " + response.statusCode()); System.out.println("Response body: " + response.body());} catch (Exception e) { e.printStackTrace();}using System;using System.Net.Http;using System.Text;var body = new StringContent("""{ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true}""", Encoding.UTF8, "application/json");var client = new HttpClient();var response = await client.PostAsync("https://api.pre.dev/fast-spec", body);var responseBody = await response.Content.ReadAsStringAsync();use reqwest::{Result, Client};async fn main() -> Result<()> { let client = Client::new(); let url = "https://api.pre.dev/fast-spec"; let body = r#"{ "input": "Build a team task manager with projects, assignees, and due dates.", "async": true }"#; let res = client .post(url) .header("Content-Type", "application/json") .body(body) .send() .await? .text() .await?; println!("{}", res); Ok(())}{ "specId": "507f1f77bcf86cd799439011", "status": "pending"}{ "_id": "507f1f77bcf86cd799439011", "endpoint": "fast_spec", "status": "completed", "success": true, "progress": 100, "codingAgentSpecMarkdown": "# Task manager\n\nProjects, assignments, and due dates."}Your pre.dev workspace API key (pdk_...) from Integrations, Built-in tab: https://pre.dev/projects/integrations?tab=built-in
In: header
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
Full result for synchronous requests; specId and pending status for asynchronous requests.
TypeScript Definitions
Use the response body type in TypeScript.
Full specification/status record. Fields may be absent or null until available. Terminal status is completed or failed. executionTime is milliseconds.
application/json
Invalid request.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Missing, invalid, or ineligible authentication.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Insufficient balance or a billing gate.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Access or trial eligibility denied.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Request failed.
TypeScript Definitions
Use the response body type in TypeScript.