Dibrix Draw for utviklere og AI-assistenter
Dibrix Draw er en BIM-modellerer i nettleseren: vegger, tak, åpninger og etasjer som ekte byggemodell, regelsjekk mot TEK17, pris, tegningssett (PDF) og eksport til IFC, DWG, DXF og SKP. Alt kan styres over HTTP eller MCP. Tre veier inn:
A) Uten nøkkel: sandkasse
Anonym økt i 30 minutter, maks 2 per IP. Tegn fra en enkel konfigurasjon (ring av vegger med dør og vindu) og les resultatet. Kjør (bash, curl og python):
B=https://draw.dibrix.com
SID=$(curl -s -X POST $B/configurator/sandbox/session | python -c 'import sys,json;print(json.load(sys.stdin)["id"])')
curl -s -X POST $B/configurator/sandbox/session/$SID/drawing -H 'content-type: application/json' -d '{"type":"garasje","boundary":[[0,0],[8,0],[8,6],[0,6]],"openings":[{"wall":"south","kind":"door","w_m":1.0,"h_m":2.1,"pos_m":2.0},{"wall":"east","kind":"window","w_m":1.2,"h_m":1.2}]}'
curl -s $B/sessions/$SID/scene-summary
curl -s -o hus.png "$B/sessions/$SID/render.png?view=iso"
curl -s -X POST $B/configurator/sandbox/session/$SID/release
Første kall svarer {"id": "…"}. Mer: /agent/quick og /agent.
B) Med nøkkel: full API
- Logg inn og åpne Konto → API-nøkler → Ny nøkkel. Velg økt eller prosjekt og nivå (read / propose / write). Nøkkelen (
dk_…) vises én gang. - Legg den i miljøvariabelen
DIBRIX_API_KEYog send den i headerenAuthorization: Bearer dk_…(aldri i URL). - Skrivenivå kan tegne og lagre utkast; godkjenning gjør bare et menneske.
Hus fra én JSON (/spec/schema): garasje 6,2 × 7,5 m, saltak, dobbel port på kortsiden og dør på langsiden:
B=https://draw.dibrix.com; SID=$(curl -s -X POST $B/sessions -H "Authorization: Bearer $DIBRIX_API_KEY" | python -c 'import sys,json;print(json.load(sys.stdin)["id"])')
curl -s -X POST $B/sessions/$SID/spec -H "Authorization: Bearer $DIBRIX_API_KEY" -H 'content-type: application/json' -d '{"spec":"hus-spec","version":1,"name":"Garasje 6,2 x 7,5","walls":[{"id":"w1","a":[0,0],"b":[6.2,0],"height_m":2.6},{"id":"w2","a":[6.2,0],"b":[6.2,7.5],"height_m":2.6},{"id":"w3","a":[6.2,7.5],"b":[0,7.5],"height_m":2.6},{"id":"w4","a":[0,7.5],"b":[0,0],"height_m":2.6}],"openings":[{"id":"p1","host":"w1","kind":"door","offset_m":0.4,"width_m":2.5,"height_m":2.2},{"id":"p2","host":"w1","kind":"door","offset_m":3.3,"width_m":2.5,"height_m":2.2},{"id":"d1","host":"w2","kind":"door","offset_m":3.0,"width_m":0.9,"height_m":2.1}],"roofs":[{"boundary":[[0,0],[6.2,0],[6.2,7.5],[0,7.5]],"form":"gable","slope_deg":22,"overhang_m":0.4,"z_eave":2.6}]}'
curl -s -o garasje.png "$B/sessions/$SID/render.png?view=iso" -H "Authorization: Bearer $DIBRIX_API_KEY"
curl -s $B/sessions/$SID/agent/delivery-check -H "Authorization: Bearer $DIBRIX_API_KEY"
De fem viktigste kallene:
| # | Kall | Hva |
|---|---|---|
| 1 | POST /sessions | Opprett økt / create session |
| 2 | POST /sessions/{sid}/agent/walls | Legg til vegg / add wall: {"corners":[[0,0],[8,0],[8,6],[0,6]],"closed":true} |
| 3 | POST /sessions/{sid}/roof_from_walls | Legg til tak / add roof: {"form":"gable","slope_deg":30} |
| 4 | GET /sessions/{sid}/agent/delivery-check | Delivery-check |
| 5 | GET /sessions/{sid}/export/plan.pdf | Eksport PDF / export PDF |
Hus, eiendom og terreng som tre åpne spec-typer (JSON Schema + eksempler, ingen innlogging): /spec/schemas, hus, eiendom, terreng. Valider uten å lagre: POST https://draw.dibrix.com/spec/validate. Bygg i sandkassen: POST https://draw.dibrix.com/configurator/sandbox/session/$SID/spec.
Kan ikke AI-en din sende (ingen utgående nett)? Be den gi JSON-en i én kodeblokk, og lim den inn på https://draw.dibrix.com/spec/proev: valider med ett trykk og få modell-lenke. Ingen innlogging.
Spesifikasjoner: /openapi-sandbox.json (kompakt, ca. 60 kB) og /openapi.json (full).
C) MCP og assistenter
Ekstern MCP-server med OAuth-oppdagelse: https://draw.dibrix.com/mcp (svarer 401 uten token; se oauth-protected-resource). Lokalt uten OAuth: stdio-pakken under.
MCP-kort: /.well-known/mcp.json. Pakke: pip install https://draw.dibrix.com/agent/dibrix-web-mcp.zip. Oppsett (.mcp.json):
{
"mcpServers": {
"dibrix-web": {
"command": "python",
"args": [
"-m",
"dibrix_web_mcp",
"--transport",
"stdio"
],
"env": {
"DIBRIX_WEB_URL": "https://draw.dibrix.com",
"DIBRIX_API_KEY": "dk_..."
}
}
}
}
| Klient | Slik |
|---|---|
| Claude Code | claude mcp add dibrix-web -e DIBRIX_WEB_URL=https://draw.dibrix.com -e DIBRIX_API_KEY=dk_… -- python -m dibrix_web_mcp --transport stdio |
| Claude (skrivebord) | Legg blokken over under mcpServers i claude_desktop_config.json. |
| ChatGPT | Egen GPT → Configure → Actions → Import from URL: https://draw.dibrix.com/openapi-sandbox.json. Auth: API Key, Bearer (lim inn dk_…). Sandkasse-operasjonene virker uten nøkkel. |
| Gemini | Bruk https://draw.dibrix.com/openapi-sandbox.json som funksjonsdefinisjoner (function calling), eller MCP via Gemini CLI/SDK med blokken over. |
| Annet | /llms.txt, /agent og /agent.json (alle verktøy). |
Dibrix Draw for developers and AI assistants
Dibrix Draw is a browser BIM modeller: walls, roofs, openings and storeys as a real building model, Norwegian rule checks (TEK17), price, permit drawing sets (PDF) and export to IFC, DWG, DXF and SKP. Everything is scriptable over HTTP or MCP. Three ways in:
A) No key: sandbox
Anonymous 30-minute session, 2 per IP. Run the commands in section A above: the first call returns {"id": "…"}, the second draws a ring of walls with a door and a window, then read scene-summary or render.png.
B) With a key: full API
Sign in, open Account → API keys → New key, copy the dk_… key (shown once) and send Authorization: Bearer dk_…. Five key calls: create session, add wall, add roof, delivery-check, export PDF (table above). Spec: /openapi-sandbox.json.
C) MCP and assistants
MCP server card: /.well-known/mcp.json. Install pip install https://draw.dibrix.com/agent/dibrix-web-mcp.zip; client setup in the table above. ChatGPT: create a GPT with Actions and import https://draw.dibrix.com/openapi-sandbox.json. Gemini: use the same file as function declarations, or the MCP block.
Never paste keys into chat; keep them in DIBRIX_API_KEY.