Upload a document

Upload document

POST/v1/documents

Send a drawing set or specification PDF. You get back a document_id that every analysis uses. Start here: every analysis needs an uploaded document.

Returns a document_idthat you pass to every detection and parsing endpoint. Documents are stored for the duration of your tier's retention window and then are automatically deleted.

Returns
A document ID201 Created · document_id
Body
Your PDFmultipart form data
Next step
Start an analysisany drawing or spec endpoint
Auth
API keyX-API-Key header

Request

Send the PDF as multipart form data along with your X-API-Key header. Body must be multipart/form-data — do not JSON-encode it. Only PDF files are accepted.

FieldDescription
filebinaryRequiredThe PDF file. Filename is preserved in original_filename. Maximum size depends on your tier — see Size limits & retention below.
This endpoint does not accept a JSON body. Set Content-Type to multipart/form-data (most HTTP clients handle this automatically when you attach a file).

Response

201 Created. Returns the document object immediately. Save the document_id — it is the only way to reference this document in subsequent API calls.

FieldDescription
document_idstring · UUIDStable identifier for the uploaded document. Pass this to detection and parsing endpoints.
original_filenamestringThe filename sent with the upload.
file_size_bytesintegerSize of the stored PDF in bytes.
page_countintegerNumber of pages in the PDF. Use this to build valid page_numbers arrays for detection calls.
mime_typestringAlways application/pdf.
tierstringYour account tier at the time of upload (free, developer, pro, enterprise).
uploaded_atstring · ISO 8601When the document was stored.
expires_atstring · ISO 8601When the document will be deleted. Retention window is tier-dependent.
download_urlstringPresigned URL for downloading the original PDF. Valid for 15 minutes.
download_url_expires_in_secondsintegerAlways 900. Re-fetch via GET /v1/documents/{id} for a fresh URL.

Size limits & retention

PlanMaximum file sizeRetention
free50 MB30 days
developer100 MB30 days
pro150 MB90 days
enterprise200 MBCustom
StatusWhat it means
413PDF_TOO_LARGEFile exceeds the maximum for your tier. Compress or split the PDF before re-uploading.
422PDF_ENCRYPTEDPassword-protected PDFs cannot be processed. Remove the password and re-upload.
422PDF_CORRUPTThe file could not be parsed as a valid PDF.

Errors

StatusWhat it means
401Missing or invalid X-API-Key.
413PDF_TOO_LARGEFile exceeds tier limit.
422PDF_ENCRYPTED · PDF_CORRUPTInvalid file.

Searches these docs: guides, the basics and every endpoint.

Make your first requestPlayground walkthrough: upload, choose an analysis, run it
Connect your softwareYour application calls the REST API. Requires an API key
Connect your AI agentGive an agent a tool that calls the REST API
AuthenticationX-API-Key header, 401 errors, keeping keys safe
Detect doorsPOST /v1/drawings/detection/doorsDoor detection — Find the doors on the pages of an architectural drawing set.
Check your resultsGET /v1/jobs/{job_id}Get a job — See a job’s status and, once it’s complete, its results.