Skip to main content

Prerequisites

  • A Bedrock account with an API key
  • A construction drawing PDF
Set your API key:
export BEDROCK_API_KEY=sk_xxx

1. Create a Project

curl -X POST https://api.bedrock.cv/projects \
  -H "Authorization: Bearer $BEDROCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My First Project"}'
{
  "id": "prj_01JABCD123",
  "name": "My First Project",
  "created_at": "2024-01-15T10:00:00Z"
}

2. Upload a Drawing

Upload a PDF file, then create a drawing from it.
# Create a file upload
curl -X POST https://api.bedrock.cv/files \
  -H "Authorization: Bearer $BEDROCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "prj_01JABCD123",
    "filename": "arch-set-rev-b.pdf",
    "content_type": "application/pdf"
  }'
{
  "id": "fil_01JABCD111",
  "upload_url": "https://storage.bedrock.cv/upload/...",
  "upload_headers": { "Content-Type": "application/pdf" }
}
# Upload the PDF to the signed URL
curl -X PUT "https://storage.bedrock.cv/upload/..." \
  -H "Content-Type: application/pdf" \
  --data-binary @arch-set-rev-b.pdf

# Create a drawing from the uploaded file
curl -X POST https://api.bedrock.cv/drawings \
  -H "Authorization: Bearer $BEDROCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "prj_01JABCD123",
    "file_id": "fil_01JABCD111",
    "name": "Architectural Set Rev B"
  }'
{
  "id": "drw_01JABCD222",
  "name": "Architectural Set Rev B",
  "job_id": "job_01JABCD333",
  "created_at": "2024-01-15T10:01:00Z"
}

3. Wait for Processing

Bedrock’s vision pipeline automatically splits the PDF into sheets, detects blocks, and parses features. Poll the job until it completes:
curl https://api.bedrock.cv/jobs/job_01JABCD333 \
  -H "Authorization: Bearer $BEDROCK_API_KEY"
{
  "job_id": "job_01JABCD333",
  "type": "drawing.preprocess",
  "status": "Completed",
  "created_at": "2024-01-15T10:01:00Z",
  "completed_at": "2024-01-15T10:02:30Z"
}

4. Query the Drawing Index

Your drawing is now parsed into the Drawing Index. Here are two ways to work with it:
List sheets in your drawing:
curl "https://api.bedrock.cv/sheets?drawing_id=drw_01JABCD222" \
  -H "Authorization: Bearer $BEDROCK_API_KEY"
{
  "data": [
    { "id": "sht_01A", "sheet_number": "A-101", "title": "First Floor Plan", "discipline": "A" },
    { "id": "sht_01B", "sheet_number": "A-102", "title": "Second Floor Plan", "discipline": "A" },
    { "id": "sht_01C", "sheet_number": "A-501", "title": "Details", "discipline": "A" }
  ]
}
Query features — count duplex receptacles on a sheet:
curl "https://api.bedrock.cv/features?sheet_number=E-201&type=duplex_receptacle&project_id=prj_01JABCD123" \
  -H "Authorization: Bearer $BEDROCK_API_KEY"
{
  "data": [
    { "id": "ftr_01A", "type": "duplex_receptacle", "label": null, "parent_feature_id": "ftr_room201" },
    { "id": "ftr_01B", "type": "duplex_receptacle", "label": null, "parent_feature_id": "ftr_room201" },
    { "id": "ftr_01C", "type": "duplex_receptacle", "label": null, "parent_feature_id": "ftr_room202" }
  ],
  "_meta": { "total": 17 }
}
Get a feature with its relations:
curl "https://api.bedrock.cv/features/ftr_door104?expand=relations,block" \
  -H "Authorization: Bearer $BEDROCK_API_KEY"
See the full CMS API reference for all endpoints.

Next Steps

Core Concepts

Understand the Drawing Index data model — hierarchy, features, relations, and grids.

MCP Workflows

See how AI agents chain tools to answer construction questions.