Analyze construction drawings with AI. Extract annotations, build knowledge graphs, and search across entire drawing sets.Documentation Index
Fetch the complete documentation index at: https://docs.stru.ai/llms.txt
Use this file to discover all available pages before exploring further.
Get Started
Set your API key
Get an API key from app.stru.ai, then set it as an environment variable:
Capabilities
- Raw Detection
- Graph + Search
- Async Support
Fast geometric detection returning results in 1-2 seconds. No LLM processing, no graph storage.Detects: Leaders, Section Tags, Detail Tags, Revision Triangles, Revision Clouds, Title Block bounds.Price: $0.02/page
Use Cases
Cross-Reference Indexing
Automatically link section tags, detail callouts, and sheet references across a drawing set
QA/QC Automation
Validate drawing consistency, detect missing references, flag revision conflicts
Quantity Takeoffs
Extract and count components, connections, and annotations
Analytical Model Generation
Build structured data for BIM/analysis workflows
API Reference
Authentication
All requests require a Bearer token:Tier 1: Raw Detection
Fast geometric detection. No LLM, no graph storage. Returns annotations in 1-2 seconds. Price: $0.02/pageGET /v1/drawings/cache/
Check whether a PDF file hash exists in the drawing cache.POST /v1/drawings
Submit a PDF page for annotation detection.| Field | Type | Required | Description |
|---|---|---|---|
file | file | One of file or file_hash | PDF file (max 50MB) |
file_hash | string | One of file or file_hash | Hash of a previously uploaded PDF |
page | integer | Yes | Page number (1-indexed) |
Response
Response
GET /v1/drawings/
Retrieve a previously processed drawing.DELETE /v1/drawings/
Delete a drawing result.Tier 2: Graph + Search
Full pipeline: detection → LLM enrichment → knowledge graph → semantic search. What you get:- Entities with semantic descriptions
- Relationships between entities
- Cross-sheet reference linking
- Natural language search
| Operation | Price |
|---|---|
| Graph Ingestion | $0.15/page |
| Search | $0.005/query |
POST /v1/projects
Create a project to group related sheets.Response
Response
GET /v1/projects
List all projects.Response
Response
GET /v1/projects/
Get project details and aggregate stats.Response
Response
DELETE /v1/projects/
Delete project and all associated graph data.Sheets
POST /v1/projects//sheets
Ingest one or more PDF pages into the knowledge graph. Returns immediately with job IDs for polling.| Field | Type | Required | Description |
|---|---|---|---|
file | file | One of file or file_hash | PDF file |
file_hash | string | One of file or file_hash | Hash of a previously uploaded PDF |
page | string | Yes | Page selector (see formats below) |
source_description | string | No | Description of the source document |
on_sheet_exists | string | No | Behavior when sheet already exists: error, skip (default), or rebuild |
community_update_mode | string | No | incremental or rebuild |
semantic_index_update_mode | string | No | incremental or rebuild |
| Format | Example | Description |
|---|---|---|
| Single page | 12 | One specific page |
| Range | 1-5 | Inclusive page range |
| List / mixed | 1,3,8-10 | Comma-separated pages and ranges |
| All pages | all | Every page in the PDF |
Response (202 Accepted)
Response (202 Accepted)
One job is created per page:
GET /v1/projects//jobs/
Poll job status for async sheet ingestion. Each job progresses through a 5-step pipeline. Pipeline steps:| Step | Key | Description |
|---|---|---|
| 1/5 | detect_annotations | Detect Annotations |
| 2/5 | enrich_annotations | Enrich Annotations |
| 3/5 | synthesize_remaining_text | Synthesize Remaining Text |
| 4/5 | resolve_entities_and_facts | Resolve Entities and Facts |
| 5/5 | load_graph_and_index | Load Graph and Index |
queued → running → complete | failed
Timeout rules:
- Queued timeout: 30 minutes from enqueue
- Running timeout: 10 minutes from first start
Response (in-progress)
Response (in-progress)
Response (complete)
Response (complete)
Response (failed)
Response (failed)
GET /v1/projects//sheets
List all ingested sheets in a project.Response
Response
GET /v1/projects//sheets/
Get full sheet graph slice including regions, mentions, component instances, and references.Response
Response
GET /v1/projects//sheets//annotations
Get the raw annotation geometry from cached detection results for a processed sheet.Response
Response
DELETE /v1/projects//sheets/
Remove a sheet from the graph and run maintenance rebuilds.Response
Response
Search
POST /v1/projects//search
Hybrid retrieval combining Qdrant vector search, BM25 fulltext, and optional Neo4j graph context. $0.005/query| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query |
limit | integer | No | Results per channel (1-100, default 10) |
channels | array | No | Subset of entities, facts, communities |
include_graph_context | boolean | No | Include graph neighborhood (default true) |
/search returns relevance-ranked results, not exhaustive traversal. For deterministic full traversal, use the /entities and /relationships endpoints instead.Response
Response
Entities & Relationships
GET /v1/projects//entities
Deterministic entity listing for full traversal and export.| Filter | Type | Description |
|---|---|---|
sheet_id | string | Filter by sheet |
type | string | Entity type (see below) |
family | string | Component family |
normalized_spec | string | Normalized specification |
region_uuid | string | Filter by region |
region_label | string | Filter by region label |
note_number | string | Filter by note number |
limit | integer | Max results (default 200) |
mention, component_instance, component_type, region, community
The type filter also accepts mention subtypes (e.g., callout) via mention_type. For bbox-based traversal, the primary types are mention, component_instance, and region.
Response
Response
GET /v1/projects//entities/
Get entity detail with relationships and location info.| Parameter | Type | Description |
|---|---|---|
include_invalid | boolean | Include invalidated relationships (default false) |
expand_target | boolean | Expand REFERENCES target sheet summaries (default false) |
attributes, provenance, outgoing relationships, incoming relationships, and locations.
GET /v1/projects//relationships
List facts and references as relationship rows.| Filter | Type | Description |
|---|---|---|
sheet_id | string | Filter by sheet |
source_id | string | Filter by source entity |
target_id | string | Filter by target entity |
type | string | Relationship type |
include_invalid | boolean | Include invalidated (default false) |
invalid_only | boolean | Only invalidated relationships |
orphan_only | boolean | Only orphaned references |
limit | integer | Max results (default 200) |
Response
Response
Traverse Guide
Use this sequence for complete JSON traversal (not ranked results):Use
/search for relevance-ranked retrieval. Use /entities and /relationships for deterministic traversal and export.Reference
- Entity Types
- Relationship Types
- Rate Limits
| Type | Description |
|---|---|
mention | Detected annotation or text reference (subtypes: callout, etc.) |
component_instance | Specific instance of a structural/MEP component |
component_type | Component type definition (e.g., W12x26) |
region | Spatial region on a sheet (view, zone) |
community | Graph community grouping related entities |
Error Handling
The API returns errors in two formats: Validation / business errors:Pricing
| Capability | Endpoint | Price |
|---|---|---|
| Raw Detection | POST /v1/drawings | $0.02/page |
| Graph Ingestion | POST /v1/projects/{id}/sheets | $0.15/page |
| Search | POST /v1/projects/{id}/search | $0.005/query |
Pricing Examples
Pricing Examples
| Need | Use | Cost Example |
|---|---|---|
| Fast annotation detection, no storage | Raw Detection | 100 pages = $2 |
| Searchable knowledge graph across sheets | Graph Ingestion | 100 pages = $15 |
| Find specific entities or components | Search | 200 queries = $1 |