Reference
Klarifai Studio API
Photoreal AI rendering for architecture & interiors. Turn sketches, photos and CAD screenshots into magazine-quality renders, then upscale to 4K — the same engine behind design.klarifai.co.uk, over a small, synchronous REST API.
https://design.klarifai.co.uk/api/v1Authentication
Every request needs an API key. Create one in your developer dashboard — it's shown only once. Send it as a Bearer token, or in an x-api-key header. Keys look like kld_live_….
Authorization: Bearer kld_live_xxxxxxxx
# or
x-api-key: kld_live_xxxxxxxxCredits & pricing
API calls draw on the same render-credit balance as the web app — buy token packs in your dashboard, no subscription.
| POST /render | 1 credit |
| POST /upscale | 1 credit |
| GET /account | free |
A call that fails after being charged is refunded automatically. Track every call and your spend on the API usage tab.
Endpoints
/render· 1 creditRender an image
Turn a sketch, photo or CAD screenshot into a photoreal interior or exterior render. The request is synchronous — the 200 response already holds the finished image on a stable Klarifai URL. If a render fails after the credit is taken, it is refunded automatically.
Body — application/json
imagestring · urirequiredPublic http(s) URL of the source image to render.
typestringoptionalWhich render model to use.
interiorexteriordefault interiorstylestringoptionalDesign style hint, e.g. “Scandinavian”. Optional.
promptstringoptionalFull prompt that overrides the auto-built one. Optional, max 1200 chars.
outputFormatstringoptionalOutput image format.
jpgpngwebpavifdefault jpgcurl https://design.klarifai.co.uk/api/v1/render \
--request POST \
--header 'Authorization: Bearer kld_live_xxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"image": "https://example.com/kitchen-sketch.jpg",
"type": "interior",
"style": "Scandinavian",
"outputFormat": "jpg"
}'{
"output_url": "https://design.klarifai.co.uk/storage/.../render.jpg",
"type": "interior",
"creditsRemaining": 41,
"cost": 1
}/upscale· 1 creditUpscale to 4K
Upscale any render — or any public image — to 4K while preserving detail and sharpness. A separate, explicit step from /render, so you only pay for 4K when you ask for it. Synchronous; credit refunded automatically on failure.
Body — application/json
imagestring · urirequiredPublic http(s) URL of the image to upscale (e.g. a /render output_url).
outputFormatstringoptionalOutput image format.
jpgpngwebpavifdefault jpgcurl https://design.klarifai.co.uk/api/v1/upscale \
--request POST \
--header 'Authorization: Bearer kld_live_xxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"image": "https://design.klarifai.co.uk/storage/.../render.jpg",
"outputFormat": "jpg"
}'{
"output_url": "https://design.klarifai.co.uk/storage/.../4k.jpg",
"upscaled": true,
"creditsRemaining": 40,
"cost": 1
}/account· freeCheck your balance
Return the render-credit balance for the account that owns the API key. This call is never charged.
curl https://design.klarifai.co.uk/api/v1/account \
--header 'Authorization: Bearer kld_live_xxxxxxxx'{
"render_credits": 42
}Errors
Every error returns a JSON body with a human error message and a machine code you can switch on. HTTP status reflects the class of failure.
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 400 | BAD_IMAGE | 'image' is not a public http(s) URL |
| 402 | INSUFFICIENT_CREDITS | Out of render credits — top up in the dashboard |
| 502 | RENDER_FAILED | Upstream render error (credit refunded) |
| 502 | UPSCALE_FAILED | Upstream upscale error (credit refunded) |
Ready to build?
Mint a key and make your first render in two minutes.
Klarifai Studio is part of KlarifAi. Questions? sales@klarifai.co.uk