API keys
Use HouseKraft's tools from your own code. Each run uses credits from your HouseKraft account, the same balance as the website.
Loading…
Quick start
Send your key in the Authorization header. Quick tools answer with the finished
result; longer ones answer with a job to check until status is done. The link to the
finished file is in the answer, under job → output → url.
0. Keep your key in an environment variable
export HOUSEKRAFT_KEY=hk_live_…
1. Upload a photo
curl -s -X POST https://app.housekraft.co/api/v1/uploads \ -H "Authorization: Bearer $HOUSEKRAFT_KEY" \ -F image=@room.jpg
2. Run a tool
curl -s -X POST https://app.housekraft.co/api/v1/tools/walls/run \
-H "Authorization: Bearer $HOUSEKRAFT_KEY" \
-H "Content-Type: application/json" \
-d '{"image": "<asset id from step 1>", "color_id": "sage green"}'
3. If the answer says "running": get the result
curl -s https://app.housekraft.co/api/v1/jobs/<job id> \ -H "Authorization: Bearer $HOUSEKRAFT_KEY"