{"info":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","description":"<html><head></head><body><p>Official Prompt2CAD API workflows. Set api_key in a private environment or replace the bearer token with a Postman Vault reference. Run requests one at a time in the documented order; do not Run All because generations are asynchronous and spend credits. run_id is generated once if empty; retain it when retrying unchanged operations and change it for a new workflow. Default model: default. Budget model: deepseek/deepseek-v4.1-flash. Docs: <a href=\"https://prompt2cad.com/documentation/integrations/api\">https://prompt2cad.com/documentation/integrations/api</a> · SDK: <a href=\"https://github.com/prompt2cad/sdk\">https://github.com/prompt2cad/sdk</a> · OpenAPI: <a href=\"https://prompt2cad.com/api/v1/openapi.json\">https://prompt2cad.com/api/v1/openapi.json</a>. Exports and uploads add no customer credit debit; generation and paid auxiliary tools use the account credit balance.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"58957039","collectionId":"c40469e5-275b-41c5-a826-47dd8701f9d7","publishedId":"2sBYHRVh9f","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-10-14T16:03:03.000Z"},"item":[{"name":"01 — Credits and project","item":[{"name":"Read account credits","id":"3d528139-39f1-4ebd-9e8f-0e01bce5b241","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/usage","description":"<p>Read account credits and limits without starting generation.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["usage"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"3d528139-39f1-4ebd-9e8f-0e01bce5b241"},{"name":"Create a generation project","event":[{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"project_id\", data.id);","  ","  [\"generation_id\", \"generation_status\", \"export_id\", \"download_path\"].forEach(key => pm.collectionVariables.unset(key));","  ","}"],"id":"b7040681-286a-4e6a-8d4f-e22f1920827b"}}],"id":"266a1e04-54d5-4327-b475-918152d8b85f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":project"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Prompt2CAD integration example\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects","description":"<p>Creates a project and stores project_id. No CAD generation or credit debit occurs here.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"266a1e04-54d5-4327-b475-918152d8b85f"}],"id":"e0a6dab0-181d-4a1b-937a-110521d36d1c","_postman_id":"e0a6dab0-181d-4a1b-937a-110521d36d1c","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}}},{"name":"02 — Generate and refine","item":[{"name":"Generate a mounting bracket","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }"],"id":"b1a086d8-f5cb-4fc8-be90-f63784ed4eb9"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"dc92e70e-aa10-40d1-879b-0b14b0147edc"}}],"id":"d2f80bb1-fd54-4430-abb5-38fd7075f252","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":generate"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"prompt\": \"Create an L bracket, 100 mm wide, with 60 mm legs, 6 mm walls and two 8 mm mounting holes.\",\n  \"model\": \"default\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//generations","description":"<p>Starts a credit-consuming generation/refinement. Saves generation_id. Poll manually every five seconds; 202 means accepted, not completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2f80bb1-fd54-4430-abb5-38fd7075f252"},{"name":"Poll initial generation","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"5abca325-22db-44fd-9d7d-be27984b6c54"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"98d21116-864c-4db8-b207-07246ef914b0"}}],"id":"3a3e3cb6-628c-4492-a874-985b9c512cdb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//generations/","description":"<p>Read-only status and usage. Send every five seconds until completed. Stop on paused, awaiting_input, failed or cancelled. This collection never resumes a paid segment automatically.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"3a3e3cb6-628c-4492-a874-985b9c512cdb"},{"name":"Refine with DeepSeek V4.1 Flash","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }"],"id":"5af9d33f-f8d7-4092-8e7c-0f0ca03fe752"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (pm.variables.get(\"generation_status\") !== \"completed\") { pm.execution.skipRequest(); throw new Error(\"Poll the generation until completed before refining or exporting.\"); }"],"id":"43ab4023-3bd9-4285-837c-e27d86ffbce7"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"c3bfcec8-c312-4c11-91df-a410a4fa96b7"}}],"id":"89fa8b74-2ba3-4afd-adbe-8ae37382332c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":refine"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"prompt\": \"Increase the bracket width to 120 mm. Keep the leg lengths, wall thickness and hole diameters unchanged.\",\n  \"model\": \"deepseek/deepseek-v4.1-flash\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//generations","description":"<p>Starts a credit-consuming generation/refinement. Saves generation_id. Poll manually every five seconds; 202 means accepted, not completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"89fa8b74-2ba3-4afd-adbe-8ae37382332c"},{"name":"Poll refinement","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"024275e5-d007-4734-96ed-329309147ac7"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"e028b68b-8d3b-466c-abc1-06b2180d7f4f"}}],"id":"48bfd7b1-7007-4ef2-a7ed-138222de5aac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//generations/","description":"<p>Read-only status and usage. Send every five seconds until completed. Stop on paused, awaiting_input, failed or cancelled. This collection never resumes a paid segment automatically.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"48bfd7b1-7007-4ef2-a7ed-138222de5aac"}],"id":"0121cd64-ec4a-49f4-bd06-9ad6c23efe42","description":"<p>Generate, then poll to completion before refining. The refinement example selects the budget model explicitly.</p>\n","_postman_id":"0121cd64-ec4a-49f4-bd06-9ad6c23efe42","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}}},{"name":"03 — Modify an existing CAD file","item":[{"name":"Create a CAD modification project","event":[{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"project_id\", data.id);","  ","  [\"generation_id\", \"generation_status\", \"export_id\", \"download_path\"].forEach(key => pm.collectionVariables.unset(key));","  ","}"],"id":"1ed17f78-8b81-49c1-a336-08ca33c1d5a8"}}],"id":"44c6e701-db05-4751-b738-768cfdc2a79b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":cad-project"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Prompt2CAD integration example\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects","description":"<p>Creates a project and stores project_id. No CAD generation or credit debit occurs here.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"44c6e701-db05-4751-b738-768cfdc2a79b"},{"name":"Upload CAD source bytes","event":[{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"cad_file_id\", data.id);","  ","  ","  ","}"],"id":"6a002508-599d-4ec4-8988-c03eb202fe3e"}}],"id":"2143b2e1-1819-4627-8897-51a180621557","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/octet-stream"}],"body":{"mode":"file","file":{"src":""}},"url":"https://prompt2cad.com/api/v1/cad-files?fileName=plate.stl&units=mm","description":"<p>Select a local file in Body → binary. Supported: DWG, DXF, SKP, OBJ, STL, GLB and self-contained glTF. Source 10 MiB, normalized geometry 8 MiB, retained sources 16 MiB/project. Each retry creates a new upload ID.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["cad-files"],"host":["https://prompt2cad.com/api/v1"],"query":[{"key":"fileName","value":"plate.stl"},{"key":"units","value":"mm"}],"variable":[]}},"response":[],"_postman_id":"2143b2e1-1819-4627-8897-51a180621557"},{"name":"Modify the imported plate","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"cad_file_id\")) { pm.execution.skipRequest(); throw new Error(\"Set cad_file_id by completing the preceding workflow step first.\"); }"],"id":"fc44bdce-b4c4-4549-9731-1c159cbc7d68"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"9a70c5fb-36bb-4324-bbf9-6194ce96ce26"}}],"id":"ff604617-b45d-4640-a266-65f864e30f27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":cad-modify"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"prompt\": \"Use the attached plate as the base. Add two 6 mm through-holes, centered across its width and spaced 60 mm apart along its length. Preserve the outer shape and thickness.\",\n  \"model\": \"deepseek/deepseek-v4.1-flash\",\n  \"cadFileIds\": [\n    \"\"\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//generations","description":"<p>Starts a credit-consuming generation/refinement. Saves generation_id. Poll manually every five seconds; 202 means accepted, not completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"ff604617-b45d-4640-a266-65f864e30f27"},{"name":"Poll CAD modification","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"84a5e02a-897f-4466-8948-b3e0afa2f1af"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"6a65bf9a-0ca2-401e-8b08-9cf53aa45a38"}}],"id":"b63fe9d3-d0e3-4015-a347-d95f6dd1a376","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//generations/","description":"<p>Read-only status and usage. Send every five seconds until completed. Stop on paused, awaiting_input, failed or cancelled. This collection never resumes a paid segment automatically.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"b63fe9d3-d0e3-4015-a347-d95f6dd1a376"},{"name":"Refine the imported plate","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }"],"id":"353877ab-2754-4113-8cfe-8ec344b85fa0"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (pm.variables.get(\"generation_status\") !== \"completed\") { pm.execution.skipRequest(); throw new Error(\"Poll the generation until completed before refining or exporting.\"); }"],"id":"00e43f6f-0f77-4398-afe2-f7fb23dc5ceb"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"19f29415-6786-4ec9-b8fc-ee9aba122dc8"}}],"id":"bb97fecc-c794-4e77-932c-f9bb9ad6404a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":cad-refine"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"prompt\": \"Increase the two hole diameters to 8 mm; preserve their centers and the plate. Use the existing project source without re-uploading.\",\n  \"model\": \"deepseek/deepseek-v4.1-flash\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//generations","description":"<p>Starts a credit-consuming generation/refinement. Saves generation_id. Poll manually every five seconds; 202 means accepted, not completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb97fecc-c794-4e77-932c-f9bb9ad6404a"},{"name":"Poll CAD refinement","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"c1c2b7fd-32d0-48ff-9e04-26f37a425f8f"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"373d9b81-6582-4e48-9970-64938f5e6c30"}}],"id":"5311226b-a97c-493e-9f9a-cea652e37e52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//generations/","description":"<p>Read-only status and usage. Send every five seconds until completed. Stop on paused, awaiting_input, failed or cancelled. This collection never resumes a paid segment automatically.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"5311226b-a97c-493e-9f9a-cea652e37e52"}],"id":"26815f34-0828-4121-bc30-1d7a6dd5d74c","description":"<p>Creates a separate project. Choose a local plate.stl in the binary upload body. Check source units and bounds before generating. STEP/IGES are not supported inputs.</p>\n","_postman_id":"26815f34-0828-4121-bc30-1d7a6dd5d74c","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}}},{"name":"04 — Optional image reference","item":[{"name":"Create an image-reference project","event":[{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"project_id\", data.id);","  ","  [\"generation_id\", \"generation_status\", \"export_id\", \"download_path\"].forEach(key => pm.collectionVariables.unset(key));","  ","}"],"id":"d14bbba2-e4ec-4289-94cd-a365a2007728"}}],"id":"d03269e0-16dd-47f3-923d-9c4b77858574","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":image-project"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Prompt2CAD integration example\"\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects","description":"<p>Creates a project and stores project_id. No CAD generation or credit debit occurs here.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"d03269e0-16dd-47f3-923d-9c4b77858574"},{"name":"Upload reference image","event":[{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"image_file_id\", data.id);","  ","  ","  ","}"],"id":"74603168-1698-4410-8e5e-6928484e4644"}}],"id":"a4e280a5-77ec-44a9-beaf-bec89209a2cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"image/png"}],"body":{"mode":"file","file":{"src":""}},"url":"https://prompt2cad.com/api/v1/files","description":"<p>Select a local PNG using Body → binary. Stores image_file_id. Image limits: 20 MiB and 40 megapixels; normalized to JPEG at a 768-pixel longest side.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["files"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"a4e280a5-77ec-44a9-beaf-bec89209a2cc"},{"name":"Generate from the reference image","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"image_file_id\")) { pm.execution.skipRequest(); throw new Error(\"Set image_file_id by completing the preceding workflow step first.\"); }"],"id":"788989d4-c41a-418d-9ee9-ceb291ffcca0"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"381619f2-e696-4496-a3e0-00dccc360274"}}],"id":"6bf2fd37-ffe4-4b46-8d5b-932f4fef2817","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":image-generate"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"prompt\": \"Model the bracket shown in this reference. Its base is 100 mm wide; use 6 mm walls and 8 mm mounting holes.\",\n  \"model\": \"default\",\n  \"imageFileIds\": [\n    \"\"\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//generations","description":"<p>Starts a credit-consuming generation/refinement. Saves generation_id. Poll manually every five seconds; 202 means accepted, not completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"6bf2fd37-ffe4-4b46-8d5b-932f4fef2817"},{"name":"Poll image-reference generation","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"78611c66-5db3-43cf-ba1a-f5c6319dab01"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"generation_id\", data.id);","  if (data.status) pm.collectionVariables.set(\"generation_status\", data.status);","  ","  ","}"],"id":"36b32dfd-b2f0-47d6-b6ed-669056e6946d"}}],"id":"261589c7-45c5-4efb-b655-bed15364b275","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//generations/","description":"<p>Read-only status and usage. Send every five seconds until completed. Stop on paused, awaiting_input, failed or cancelled. This collection never resumes a paid segment automatically.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","generations",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"261589c7-45c5-4efb-b655-bed15364b275"}],"id":"09af76eb-b647-4f95-b24f-d47743a64b6c","description":"<p>Creates a separate project. Choose a PNG in the binary body; for JPEG/WebP adjust Content-Type accordingly. Include physical dimensions in the prompt.</p>\n","_postman_id":"09af76eb-b647-4f95-b24f-d47743a64b6c","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}}},{"name":"05 — Export the completed revision","item":[{"name":"Request STEP, STL and PNG exports","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"generation_id\")) { pm.execution.skipRequest(); throw new Error(\"Set generation_id by completing the preceding workflow step first.\"); }"],"id":"bf223102-0c39-4a8b-afd5-77bd7de9a09c"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (pm.variables.get(\"generation_status\") !== \"completed\") { pm.execution.skipRequest(); throw new Error(\"Poll the generation until completed before refining or exporting.\"); }"],"id":"1c547c60-79cf-4f5e-b3ba-dc75688d4255"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  if (data.id) pm.collectionVariables.set(\"export_id\", data.id);","  ","  ","  pm.collectionVariables.unset(\"download_path\");","}"],"id":"d94f8597-dcfa-477a-86a4-69cccdc4b428"}}],"id":"0e63437b-92b8-40df-8af9-f29da1ec6609","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Idempotency-Key","value":":export:"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"generationId\": \"\",\n  \"formats\": [\n    \"step\",\n    \"stl\",\n    \"png\"\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://prompt2cad.com/api/v1/projects//exports","description":"<p>Requests three formats. OBJ is ZIP/MTL; DXF is 3D geometry; PNG is a viewport preview. Export each completed generation with a distinct operation key.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","exports"],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e63437b-92b8-40df-8af9-f29da1ec6609"},{"name":"Poll export and select a download","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"project_id\")) { pm.execution.skipRequest(); throw new Error(\"Set project_id by completing the preceding workflow step first.\"); }","if (!pm.variables.get(\"export_id\")) { pm.execution.skipRequest(); throw new Error(\"Set export_id by completing the preceding workflow step first.\"); }"],"id":"6553c629-971d-4e5a-8952-03b1c519c7fc"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.response.code >= 200 && pm.response.code < 300) {","  const data = pm.response.json();","  const artifact = (data.artifacts || []).find(item => item.status === \"completed\" && /^\\/api\\/v1\\/artifacts\\/[^/]+\\/download$/.test(item.downloadUrl || \"\"));","  if (artifact) pm.collectionVariables.set(\"download_path\", artifact.downloadUrl);","}"],"id":"ed7ce48b-de08-4111-8930-61c5d5c46e75"}}],"id":"c9a9d8e2-d931-43b0-80cf-620b36fd6a75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com/api/v1/projects//exports/","description":"<p>Read export status and check every artifact: individual formats can fail. Saves the first successful artifact download path; edit download_path to download another completed artifact.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"path":["projects","","exports",""],"host":["https://prompt2cad.com/api/v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"c9a9d8e2-d931-43b0-80cf-620b36fd6a75"},{"name":"Download a completed artifact","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"download_path\")) { pm.execution.skipRequest(); throw new Error(\"Set download_path by completing the preceding workflow step first.\"); }"],"id":"f4346f2c-464c-4c24-b919-c27352120167"}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!/^\\/api\\/v1\\/artifacts\\/[^/]+\\/download$/.test(pm.variables.get(\"download_path\"))) { pm.execution.skipRequest(); throw new Error(\"Use a download path returned by this API export.\"); }"],"id":"e2cc109e-6193-464f-a57c-ed1d2cb05bfe"}}],"id":"40d1c519-c3fa-4a54-a83b-5d84640f119d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://prompt2cad.com","description":"<p>Authenticated binary download. Use Send and Download in Postman to save it locally. Artifacts are retained for seven days.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}},"urlObject":{"host":["https://prompt2cad.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"40d1c519-c3fa-4a54-a83b-5d84640f119d"}],"id":"57fb9aee-8f16-4742-bb01-ffd67f0b2faa","description":"<p>Exports the current completed generation. Immutable snapshot; later changes do not alter this export. Artifacts expire after seven days. Change formats to any supported output as needed.</p>\n","_postman_id":"57fb9aee-8f16-4742-bb01-ffd67f0b2faa","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"c40469e5-275b-41c5-a826-47dd8701f9d7","id":"c40469e5-275b-41c5-a826-47dd8701f9d7","name":"Prompt2CAD API — Generate, Modify CAD, Refine and Export","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["if (!pm.variables.get(\"run_id\")) pm.collectionVariables.set(\"run_id\", pm.variables.replaceIn(\"e281248b-198b-4a6c-9d95-8f6b3935ed6e\"));"],"id":"8bb22839-8377-443b-93bd-3338f37849b9"}}],"variable":[{"key":"base_url","value":"https://prompt2cad.com/api/v1"},{"key":"origin","value":"https://prompt2cad.com"},{"key":"api_key","value":""},{"key":"run_id","value":""},{"key":"project_id","value":""},{"key":"generation_id","value":""},{"key":"generation_status","value":""},{"key":"export_id","value":""},{"key":"download_path","value":""},{"key":"cad_file_id","value":""},{"key":"image_file_id","value":""},{"key":"cad_file_name","value":"plate.stl"},{"key":"cad_units","value":"mm"},{"key":"model","value":"default"}]}