API Documentation
MeltFlex REST API for AI interior design
Upload a room photo, describe the desired style or provide furniture references, and receive a photorealistic result. Each generate call costs 10 credits (auto-refunded on failure).
Furniture placement is the flagship. Send reference product photos and the API stages them into the room with correct scale, perspective and shadows. The same /v1/generate endpoint also powers a full suite of design tools (interior restyling, exteriors and gardens, surface and fixture swaps, photo-to-render), and two dedicated endpoints add video walkthroughs and floorplan-to-3D. See AI Tools for a recipe per tool.
API access requires an active subscription (any paid plan). After you subscribe, you can generate your API key in account settings.






Take the result and restyle it with a single prompt:
"Design this room as Italian contemporary"
"Design this room as Japanese"
Tutorial
Before you start
You need an active subscription (any paid plan) to use the API. Once subscribed, go to your account settings and click API Key under Profile:

Then click Generate API Key. The key is shown only once, copy it immediately.

- Auth: Send
Authorization: Bearer mf_sk_...in every request header. - Content-Type:
application/json - Credits: Each generation costs 10 credits, deducted before processing. Failed generations are refunded automatically.
- Timeout: Requests have a 2-minute timeout. Large images may take 30–90 seconds to process.
Basic usage: Restyle a room
The simplest call takes a room image and a text prompt. The API returns a base64-encoded PNG of the transformed room.
export MELTFLEX_API_KEY="mf_sk_..."
curl -X POST "https://www.meltflexai.com/api/v1/generate" \
-H "Authorization: Bearer $MELTFLEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://your-cdn.com/empty-room.jpg",
"prompt": "Transform this empty room during sunset with warm golden light"
}'The response contains a data:image/png;base64,... string. Decode it and save to a file, display in your UI, or upload to your CDN.
Furniture placement
To place specific furniture in a room, send reference images alongside the main room photo. The AI will match each item's appearance (colors, materials, textures) and position them naturally.
referenceImageUrlsarray of public URLs pointing to furniture/decor photos (up to 10)referenceProductsoptional metadata for each image: name for accurate placement
import requests
API_KEY = "mf_sk_..."
URL = "https://www.meltflexai.com/api/v1/generate"
response = requests.post(URL, json={
"imageUrl": "https://your-cdn.com/empty-room.jpg",
"prompt": "Place these furniture items naturally in this room during sunset",
"referenceImageUrls": [
"https://your-cdn.com/modular-sofa.jpg",
"https://your-cdn.com/upholstered-bed.jpg",
"https://your-cdn.com/dining-table.jpg",
"https://your-cdn.com/oak-chair.jpg"
]
}, headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
})
data = response.json()
if data.get("success"):
print(f"Room furnished with 4 items during sunset")For best results, use clean product photos on white/neutral backgrounds.
Production tips
- Use image URLs over base64 when possible. It avoids hitting the 15 MB body limit and is faster.
- Retry on 429: Implement exponential backoff (e.g. 1s, 2s, 4s, up to 30s).
- Timeouts: Set a client-side timeout of ~2 minutes. If the request times out, credits are refunded server-side.
- Image quality: Input images of at least 1024px on the longest side produce the best results.
- Prompt specificity: Be specific. "Scandinavian style with warm oak flooring and linen curtains" works better than "make it nice".
- Security: Never expose your API key in client-side code. Make API calls from your backend.
AI Tools
Overview
MeltFlex exposes a small number of endpoints that cover a large number of jobs. Most of the tools below are the same POST /v1/generate call, where you change the prompt and optionally attach reference images. Two jobs have dedicated endpoints: POST /v1/video and POST /v1/floorplan-to-3d.
The one rule that makes these prompts work: by default the model preserves the room's structure (walls, windows, flooring and fixtures). So for surface and fixture swaps (floors, walls, doors, windows, stairs) you must say explicitly what to change and what to keep. Every recipe below already does this.
| Tool | Endpoint | Reference images | Credits |
|---|---|---|---|
| AI Interior Design | /v1/generate | Optional | 10 |
| AI Layout Boost | /v1/generate | Optional | 10 |
| AI Exterior Design | /v1/generate | Optional | 10 |
| AI Garden Design | /v1/generate | Optional | 10 |
| AI Walls Texture | /v1/generate | Optional | 10 |
| AI Floor Restyle | /v1/generate | Optional | 10 |
| AI Stairs Design | /v1/generate | Optional | 10 |
| AI Doors Design | /v1/generate | Optional | 10 |
| AI Windows Design | /v1/generate | Optional | 10 |
| AI Kitchen Design | /v1/generate | Optional | 10 |
| AI Bathroom Design | /v1/generate | Optional | 10 |
| AI Photo to Render | /v1/generate | No | 10 |
| AI Video Walkthrough | /v1/video | N/A | 100 to 150 |
| AI Floorplan to 3D | /v1/floorplan-to-3d | N/A | 10 |
Interior & layout
Restyle a whole room, or re-plan the furniture that is already in it. Attach reference product photos to stage specific pieces. This is the same furniture-placement flow from the tutorial.

Restyle any room into a new interior style, fully furnished and photorealistic.
Redesign this room in Scandinavian style with warm oak floors, linen textiles and soft natural light. Keep the room's architecture (walls, windows and layout) unchanged.
Rearrange the furniture already in a room into a better, more functional layout.
Rearrange the existing furniture in this room into a more open, functional layout with clear walking paths and better flow. Keep the same furniture pieces, walls, windows and flooring.Exterior & garden
The endpoint works on any photo, not just interiors. Feed a facade or an outdoor plot and describe the transformation.

Reimagine a facade (cladding, front door, entry) while keeping the building intact.
Redesign the exterior of this house in modern farmhouse style: update the facade cladding, front door and entry lighting. Keep the building's structure, roofline and proportions unchanged.
Landscape an outdoor space with planting, paths and seating.
Design this outdoor space as a low-maintenance Mediterranean garden with gravel paths, olive trees, drought-tolerant planting and a seating area. Keep the plot boundaries and the house unchanged.Surfaces & fixtures
Change one element at a time (flooring, walls, stairs, doors or windows) while everything else stays put. Ideal for “see it before you buy” previews. Each recipe names exactly what to change and what to keep.

Swap the wall finish only: paint, plaster, micro-cement, panelling or wallpaper.
Change the wall finish to warm greige micro-cement. Only change the walls and keep the flooring, ceiling, furniture and fixtures exactly as they are.
Replace the flooring to preview a material before you buy it.
Replace the flooring with wide-plank European oak in a natural matte finish. Only change the floor and keep the walls, furniture and lighting unchanged.
Restyle a staircase, treads, risers and railing, in place.
Redesign this staircase with open oak treads and a slim black steel railing. Only change the staircase and keep the surrounding walls, floor and its position unchanged.
Preview new interior doors without touching the rest of the room.
Replace the interior doors with black-framed steel-and-glass doors. Only change the doors and keep the walls, flooring and everything else unchanged.
Change window frames and glazing while keeping the wall openings.
Change the windows to slim black aluminium frames with clear glazing. Only change the windows and keep the wall openings, layout and interior unchanged.Kitchen & bathroom
Whole-room redesigns that respect the existing footprint and plumbing, so the result stays buildable, not just pretty.

Redesign a whole kitchen: cabinetry, island, worktops and finishes.
Redesign this kitchen in handleless matte-white Scandinavian style with oak open shelving and a quartz island. Keep the room's footprint, windows and plumbing positions unchanged.
Reimagine a bathroom: tiling, vanity, shower and fixtures.
Redesign this bathroom in warm spa-minimalism with micro-cement walls, a walk-in rain shower and an oak vanity. Keep the room's layout and plumbing positions unchanged.Photo to render
Turn a grey 3D draft, a SketchUp screenshot or a rough photo into a photorealistic render, with no V-Ray and no hours of setup. Keep the geometry and camera, then add real light and materials.

Draft or screenshot in, photorealistic photograph out, at the same geometry and camera angle.
Turn this 3D draft / SketchUp screenshot into a photorealistic interior photograph. Keep the exact geometry, layout, materials and camera angle. Add realistic lighting, accurate shadows and true-to-life material detail.Video walkthrough
Animate a still into a short cinematic walkthrough with Veo 3.1. Feed a MeltFlex render (or any interior photo) and get back an MP4 URL. Costs 100 credits for a 4-second clip, 150 for 8 seconds. Full parameters are in the API Reference.
import requests
API_KEY = "mf_sk_..."
URL = "https://www.meltflexai.com/api/v1/video"
# Feed in a MeltFlex render (or any interior still) → cinematic walkthrough.
response = requests.post(URL, json={
"imageUrl": "https://your-cdn.com/living-room-render.jpg",
"durationSeconds": 4, # 4 (100 credits) or 8 (150 credits)
"aspectRatio": "16:9", # "16:9" or "9:16"
# "prompt": "Slow dolly forward, then pan left to the window" # optional
}, headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}, timeout=300)
data = response.json()
if data.get("success"):
print(f"Video ready: {data['videoUrl']} ({data['processingTime']}s)")
else:
print(f"Error: {data.get('error')}")Video generation is asynchronous on Google's side and typically takes 30 to 120 seconds. Keep a client-side timeout of about 5 minutes; if it fails, credits are refunded automatically.
Floorplan to 3D
Convert a flat 2D floorplan image into a downloadable GLB 3D model. The image is cleaned up (walls, doors, windows detected) and converted to geometry. Costs 10 credits.

import requests
API_KEY = "mf_sk_..."
URL = "https://www.meltflexai.com/api/v1/floorplan-to-3d"
# 2D floorplan image → downloadable GLB 3D model.
response = requests.post(URL, json={
"imageUrl": "https://your-cdn.com/2d-floorplan.png"
}, headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}, timeout=300)
data = response.json()
if data.get("success"):
print(f"3D model (GLB): {data['modelUrl']}")
else:
print(f"Error: {data.get('error')}")For best results use a clean, high-contrast floorplan with clear walls. The GLB can be dropped straight into three.js, Blender, Unity or any glTF viewer.
API Reference
Generate Image
Transform a room photo into a photorealistic interior design image. Optionally attach reference images of furniture to place in the room.
https://www.meltflexai.com/api/v1/generateRequest Headers
| Field | Value | Description |
|---|---|---|
Authorization | Bearer mf_sk_... | Your API key from account settings. |
Content-Type | application/json | Request body format. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Describes the desired transformation. E.g. "Transform into scandinavian style", "Make it minimalist with warm lighting", "Place the furniture naturally". |
image | string | Conditional* | Base64 data URL of the room image. Format: data:image/jpeg;base64,... |
imageUrl | string | Conditional* | Publicly accessible URL of the room image. The server fetches it directly. Preferred over base64. |
referenceImages | string[] | No | Array of base64 data URLs for reference images (furniture, decor). Up to 10. |
referenceImageUrls | string[] | No | Array of public URLs for reference images. Up to 10. Preferred over base64 for better performance. |
referenceProducts | object[] | No | Metadata for each reference image. Each object: {"name": "Sofa"}. Helps the AI identify and place items correctly. |
resolution | string | No | Output quality: "512", "1K", or "2K" (sharpest). Defaults to model auto. |
designLevel | string | No | "lite" (faster & cheaper, −2 credits), "quick" (default), or "pro" (most detailed, HIGH thinking, +5 credits). |
mask | boolean | No | Region edit. When true, the input image must have the area to change painted solid red; the prompt is applied only to those red-marked regions and the rest is preserved. |
variations | number | No | Batch of 1–3 images in one call (default 1). Credits are charged per image; failed variations are refunded. |
* Either image or imageUrl must be provided. If both are sent, imageUrl takes priority.
Response Body
A successful request returns HTTP 200 with a JSON body:
{
"success": true,
"image": "data:image/png;base64,iVBORw0KGgo...",
"images": ["data:image/png;base64,iVBORw0KGgo..."],
"count": 1,
"creditsUsed": 10
}| Field | Type | Description |
|---|---|---|
success | boolean | true if the image was generated successfully. |
image | string | Base64-encoded PNG data URL of the first generated image (backward compatible). |
images | string[] | All generated images as data URLs (length equals count; 1 unless variations was used). |
count | number | Number of images returned. |
creditsUsed | number | Total credits charged for this request (per image × successful variations). |
Generate Video
Animate a still image into a short cinematic walkthrough (Veo 3.1). Returns a hosted MP4 URL.
https://www.meltflexai.com/api/v1/video| Field | Type | Required | Description |
|---|---|---|---|
imageUrl | string | Conditional* | Public URL of the source still. Preferred over base64. |
image | string | Conditional* | Base64 data URL of the source still. Format: data:image/png;base64,... |
durationSeconds | number | No | 4 (default, 100 credits) or 8 (150 credits). |
aspectRatio | string | No | "16:9" (default) or "9:16". |
prompt | string | No | Direct the camera or mood. Defaults to a slow cinematic dolly if omitted. |
* Either image or imageUrl must be provided.
A successful request returns HTTP 200:
{
"success": true,
"videoUrl": "https://.../ai-videos/.../clip.mp4",
"durationSeconds": 4,
"aspectRatio": "16:9",
"processingTime": "48.20",
"creditsUsed": 100
}Floorplan to 3D
Convert a 2D floorplan image into a downloadable GLB 3D model.
https://www.meltflexai.com/api/v1/floorplan-to-3d| Field | Type | Required | Description |
|---|---|---|---|
imageUrl | string | Conditional* | Public URL of the floorplan image (JPEG, PNG or WebP). |
image | string | Conditional* | Base64 data URL of the floorplan. Format: data:image/png;base64,... |
* Either image or imageUrl must be provided.
A successful request returns HTTP 200 with a hosted model URL:
{
"success": true,
"modelUrl": "https://.../floorplans/model.glb",
"format": "glb",
"creditsUsed": 10
}If storage is temporarily unavailable, the GLB is returned inline instead as base64 under a model field.
Get Credits
Read your account's current credit balance and the per-operation cost table. Useful for pre-flight checks before a batch.
https://www.meltflexai.com/api/v1/creditscurl "https://www.meltflexai.com/api/v1/credits" \
-H "Authorization: Bearer $MELTFLEX_API_KEY"Returns HTTP 200:
{
"balance": 340,
"totalEarned": 500,
"totalSpent": 160,
"email": "you@studio.com",
"costs": {
"floorplan": 10,
"photo": 10,
"photo_furniture": 15,
"video": 100,
"prompt": 5,
"removal": 10
}
}Resources
Limits
| Limit | Value |
|---|---|
| Credit cost, image generation | 10 credits |
| Credit cost, floorplan to 3D | 10 credits |
| Credit cost, video (4s / 8s) | 100 / 150 credits |
| Max request body size | 15 MB |
| Request timeout, generate | 2 minutes |
| Request timeout, video / floorplan | 5 minutes |
| Max reference images per request | 10 |
| Max active API keys per account | 5 |
| Output, generate | PNG (base64 data URL) |
| Output, video / floorplan | Hosted URL (MP4 / GLB) |
If you receive HTTP 429, implement exponential backoff before retrying. Need higher limits? Check our subscription plans.
Error codes
Error responses include a JSON body with an error field:
{
"error": "Insufficient credits",
"message": "You need 10 credits. Check your balance at meltflexai.com/settings",
"required": 10
}| Status | Meaning | Details |
|---|---|---|
| 200 | Success | Image generated successfully. |
| 400 | Bad Request | Missing or invalid fields (prompt, image). |
| 401 | Unauthorized | Invalid, missing, or revoked API key. |
| 402 | Payment Required | Insufficient credits. Top up your account. |
| 405 | Method Not Allowed | Only POST is supported. |
| 429 | Rate Limited | Too many requests. Wait and retry with exponential backoff. |
| 500 | Server Error | Generation failed. Credits are refunded automatically. |
| 502 | Conversion Failed | Floorplan-to-3D: the conversion service failed after retries. Credits refunded. |
| 503 | Service Unavailable | Video/floorplan service temporarily down. Retry shortly. Credits refunded. |
| 504 | Timeout | Video generation exceeded 5 minutes. Credits refunded. Try again. |