REST API reference
Base URL https://kubikly.com/api/v1. JSON in and out, except file uploads (multipart). Machine-readable spec: openapi.json.
Authentication
Create a key in Account → API keys and send it on every request. A key acts as your account: your projects, your credits, your limits. It is shown once; revoke it there at any time.
Authorization: Bearer kb_live_…Endpoints
| Method | Path | What it does | Cost |
|---|---|---|---|
| GET | /me | Your credits, free models left, and what each action costs. | Free |
| GET | /projects | Your projects, newest first. | Free |
| POST | /projects | Create a 3D model from 1–6 files (multipart `file`) or from `image_url` / `image_base64` (JSON). Returns the project and its generation job. | First model free, then credits |
| GET | /projects/{id} | Status, a compact text description of the model (rooms, sizes, materials, items), its jobs and signed file URLs. | Free |
| POST | /projects/{id}/edit | Change the model in words: `{ "instruction": "make the bedroom 40 cm wider" }`. | Free |
| POST | /projects/{id}/renders | A photoreal render: `{ "quality": "hd" | "4k", "note": "warm evening light", "confirm": true }`. | Credits |
| POST | /projects/{id}/exports | A 3D file: `{ "format": "glb" | "obj" | "stl", "confirm": true }`. | Credits |
| GET | /jobs/{id} | A generation, render or export job: status, progress and the file URL when done. | Free |
| POST | /game-assets | A game-ready 3D model (GLB) of a character, creature, weapon, vehicle or prop from `prompt` and/or `image_url` / `image_base64` / multipart `file`. Options: `category`, `style`, `rig`, `animation`, `format`, `detail`, `confirm`. | Credits |
| GET | /game-assets | Your game assets, newest first. | Free |
| GET | /game-assets/{id} | A game asset: status and, when ready, the signed URL of the 3D file and its concept picture. | Free |
| GET | /webhooks | Your webhook endpoints and the event names. | Free |
| POST | /webhooks | Register an https address: `{ "url": "https://…" }`. The signing secret is returned once. | Free |
| DELETE | /webhooks/{id} | Remove a webhook endpoint. | Free |
Create a model
studio is home (floor plans and drawings), jewelry (rings, pendants, bracelets) or product (furniture and objects). Up to six files, 25 MB each: JPG, PNG, WebP, HEIC or PDF, identified by their content.
curl -X POST https://kubikly.com/api/v1/projects \
-H "Authorization: Bearer $KUBIKLY_API_KEY" \
-F studio=home -F title="Flat 4B" -F notes="Ceilings are 2.7 m" \
-F file=@floor-plan.pdfcurl -X POST https://kubikly.com/api/v1/projects \
-H "Authorization: Bearer $KUBIKLY_API_KEY" -H "Content-Type: application/json" \
-d '{ "studio": "jewelry", "image_url": "https://example.com/ring.jpg", "confirm": true }'The answer is 202 with projectId, jobId and a link to open the model in Kubikly. Poll the project until status is ready (or awaiting_calibration: the model is built, and one real dimension sent to /edit, such as "the kitchen is 4.2 m wide", makes every size exact). failed is refunded.
curl https://kubikly.com/api/v1/projects/$PROJECT_ID -H "Authorization: Bearer $KUBIKLY_API_KEY"
{ "status": "ready", "summary": "SCENE kind=house units=m scale=calibrated … ROOM Living room 24.3m² … WALL …",
"generation": { "status": "completed" }, "jobs": [], "files": [], "url": "https://kubikly.com/app/projects/…" }Edit, render, export
curl -X POST https://kubikly.com/api/v1/projects/$PROJECT_ID/edit \
-H "Authorization: Bearer $KUBIKLY_API_KEY" -H "Content-Type: application/json" \
-d '{ "instruction": "Make the bedroom 40 cm wider and put an oak floor in the kitchen" }'curl -X POST https://kubikly.com/api/v1/projects/$PROJECT_ID/renders \
-H "Authorization: Bearer $KUBIKLY_API_KEY" -H "Content-Type: application/json" \
-d '{ "quality": "hd", "note": "warm evening light", "confirm": true }'curl -X POST https://kubikly.com/api/v1/projects/$PROJECT_ID/exports \
-H "Authorization: Bearer $KUBIKLY_API_KEY" -H "Content-Type: application/json" \
-d '{ "format": "glb", "confirm": true }'
curl https://kubikly.com/api/v1/jobs/$JOB_ID -H "Authorization: Bearer $KUBIKLY_API_KEY"
# { "status": "completed", "url": "https://kubikly.com/api/assets/…?exp=…&sig=…" } (signed, valid 1 hour)Game assets
A game-ready 3D character, creature, weapon, vehicle or prop from a description or a picture, as GLB. Full guide: 3D game asset API.
curl -X POST https://kubikly.com/api/v1/game-assets \
-H "Authorization: Bearer $KUBIKLY_API_KEY" -H "Content-Type: application/json" \
-d '{ "prompt": "a wooden treasure chest with iron bands", "category": "prop", "confirm": true }'
curl https://kubikly.com/api/v1/game-assets/$ASSET_ID -H "Authorization: Bearer $KUBIKLY_API_KEY"
# { "status": "ready", "format": "glb", "modelUrl": "https://kubikly.com/api/game-assets/…/file?exp=…&sig=…" }Webhooks
Instead of polling, register an https address in Account → Webhooks or with POST /webhooks. Kubikly POSTs a JSON event there when a job finishes. Up to five endpoints per account; the signing secret is shown once.
POST https://your-server.com/kubikly-webhook
Kubikly-Event: game_asset.ready
Kubikly-Signature: t=1764374400,v1=5f8c…
{ "id": "…", "created": "2026-11-29T00:00:00.000Z", "type": "game_asset.ready",
"data": { "id": "…", "name": "Treasure chest", "status": "ready", "format": "glb",
"url": "https://kubikly.com/api/game-assets/…/file?exp=…&sig=…" } }Events: model.ready, model.failed, render.ready, render.failed, export.ready, export.failed, game_asset.ready, game_asset.failed. File URLs in an event are signed for 24 hours. Verify each delivery: v1 is the hex HMAC-SHA256 of <t>.<raw body> with your secret.
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = createHmac("sha256", secret).update(t + "." + rawBody).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300; // reject replays older than 5 minutes
return fresh && v1.length === expected.length && timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}Answer with any 2xx within ten seconds. Anything else is retried with increasing delays; an endpoint that fails twenty times in a row is switched off. Deliveries go to public https hosts only and never follow redirects.
Credits and confirmation
The API spends the same credits as the studio, at the same prices (developer pricing); GET /me returns your balance and every cost. A paid call without confirm: true spends nothing and answers 409:
{ "error": "A photoreal HD render costs 3 credits; your balance is 40. Send confirm: true to go ahead.",
"code": "needs_confirmation", "details": { "quote": { "credits": 3, "balance": 40 } } }A job that fails is refunded automatically, as in the studio. Exports, as in the studio, need an account that has bought credits or a plan at least once.
Errors and limits
400invalid input (the message says which field),401missing or revoked key,402not enough credits,404not your project,409confirmation needed,413file too large,429rate limit.- Every error is JSON:
{ "error": "…", "code": "…", "details": … }. - 600 requests per hour per key, plus the studio's per-hour and concurrent job limits.
image_urlmust be a public https address without redirects.