REST API
Upload drawings, trigger AI reviews, and retrieve results programmatically. Integrate ClearHandoff into your PDM, PLM, or custom workflow. For the complete endpoint reference, see the API Reference
Authentication
All API requests require a Bearer token in the Authorization header. API keys are scoped to your team — any drawing uploaded or reviewed through the API belongs to your team. Create and manage API keys on your Team page.
Quick Start
import time
import requests
API_KEY = "ch_YOUR_KEY" # Create one on your team page; use an env var in real code
# 1. Upload a drawing and start an AI review in one call
response = requests.post(
"https://www.clearhandoff.com/api/v1/drawings/",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": open("drawing.pdf", "rb")},
data={"name": "My Drawing", "trigger_ai_review": "true"},
)
drawing = response.json()
drawing_id = drawing["id"]
review_id = drawing["review_id"]
# 2. Poll for results (reviews typically complete in 1-3 minutes)
while True:
response = requests.get(
f"https://www.clearhandoff.com/api/v1/drawings/{drawing_id}/ai-review/{review_id}/",
headers={"Authorization": f"Bearer {API_KEY}"},
)
result = response.json()
if result["status"] in ("completed", "failed"):
print(result)
break
time.sleep(5)Upload a drawing and start an AI review
curl -X POST https://www.clearhandoff.com/api/v1/drawings/ \
-H "Authorization: Bearer ch_YOUR_KEY" \
-F "file=@drawing.pdf" \
-F "name=My Drawing" \
-F "trigger_ai_review=true"Poll for results
curl https://www.clearhandoff.com/api/v1/drawings/DRAWING_ID/ai-review/REVIEW_ID/ \
-H "Authorization: Bearer ch_YOUR_KEY"The upload response includes the drawing's id and a review_id. Poll this endpoint until status changes to "completed" (reviews typically complete in 1-3 minutes). The response will then include findings, summary, and recommendation.
Need a test file? Download sample-drawing.pdf
Rate Limits
Rate limits are applied per API key. If you exceed a limit, the API returns 429 Too Many Requests.
| Endpoint | Limit |
|---|---|
| Upload drawing | 1,000 / hour |
| List / detail / versions | 1,000 / hour |
| Trigger review | 120 / hour |
| Trigger batch review | 30 / hour |
| Ask Pen a question | 300 / hour |
| Downloads / status polling | 1,000 / hour |
For the full endpoint reference, see the API Reference | OpenAPI Schema (JSON)
