Skip to main content

Match a Reference API

roomix/match-reference

Restyle your room to match a reference photo — its palette, materials, and mood, in your space.

Starts from $0.039 /run
2 model optionspublicpublished

Wrapper Input

Input

External URL of the user's room photo. Its architecture, layout, camera angle, and through-window views are preserved. Bake EXIF orientation into the pixels before uploading — an upright photo gives the most reliable framing.

External URL of the reference interior photo — the look to match. Only its style transfers (palette, materials, furniture character, lighting mood); its architecture, layout, and camera are ignored, as are any watermarks, captions, or app interface elements it carries.

How literally to chase the reference: precise adapts the look gently to the room, balanced restyles decisively, creative fully transforms toward the reference.

Min: 0.5 - Max: 1

Fine-grained creativity value used only when creativity is precise.

Optional adjustments from the room's owner, e.g. "keep my sofa", "lower the TV", "match the reference's wall color exactly". These are honored literally and outrank the creativity setting — only the architecture, camera, window and door locks outrank them. Naming a specific item lets you move, resize, remove, keep, or recolor just that item.

Output canvas. "auto" follows the room photo at roughly 1 megapixel. Pass the preset whose aspect ratio is closest to the room photo with a 2k suffix for a ~3 megapixel render (sharper, and billed higher on the megapixel-tiered base model).

You need to be logged in to run this model and view results.
Log in

Wrapper Output

Output

Fill in the input form and click submit to see the output
Logs (1 lines)

Pricing

Base ModelPricing ModeEffective Cost
nano-banana-2/editdefaultmegapixel tieredTiered pricing
nano-bananaper output$0.039

Match a Reference API

Match a Reference is a image-to-image AI wrapper by roomix. On ModelRunner it runs through a REST API or via MCP from any AI assistant with pay-per-use pricing.

POST https://queue.modelrunner.run/roomix/match-reference

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/roomix/match-reference \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_url": "https://example.com/input.jpg",
    "reference_url": "https://example.com/input.jpg",
    "creativity": "balanced",
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/roomix/match-reference/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/roomix/match-reference/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("roomix/match-reference", {
  input: {
    "file_url": "https://example.com/input.jpg",
    "reference_url": "https://example.com/input.jpg",
    "creativity": "balanced"
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/roomix/match-reference",
    headers=headers,
    json={
      "file_url": "https://example.com/input.jpg",
      "reference_url": "https://example.com/input.jpg",
      "creativity": "balanced"
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

Input parameters of Match a Reference
NameTypeRequiredDescription
file_urlstring (uri)yesExternal URL of the user's room photo. Its architecture, layout, camera angle, and through-window views are preserved. Bake EXIF orientation into the pixels before uploading — an upright photo gives the most reliable framing.
reference_urlstring (uri)yesExternal URL of the reference interior photo — the look to match. Only its style transfers (palette, materials, furniture character, lighting mood); its architecture, layout, and camera are ignored, as are any watermarks, captions, or app interface elements it carries.
creativityenumyesHow literally to chase the reference: precise adapts the look gently to the room, balanced restyles decisively, creative fully transforms toward the reference. One of: precise, balanced, creative. Default: "balanced".
creativity_levelnumbernoFine-grained creativity value used only when creativity is precise. Default: 0.7.
promptstringnoOptional adjustments from the room's owner, e.g. "keep my sofa", "lower the TV", "match the reference's wall color exactly". These are honored literally and outrank the creativity setting — only the architecture, camera, window and door locks outrank them. Naming a specific item lets you move, resize, remove, keep, or recolor just that item.
output_sizeenumnoOutput canvas. "auto" follows the room photo at roughly 1 megapixel. Pass the preset whose aspect ratio is closest to the room photo with a 2k suffix for a ~3 megapixel render (sharper, and billed higher on the megapixel-tiered base model). One of: auto, 1_1_1k, 1_1_2k, 4_3_1k, 4_3_2k, 3_4_1k, 3_4_2k, 16_9_1k, 16_9_2k, 9_16_1k, 9_16_2k, 3_2_1k, 3_2_2k, 2_3_1k, 2_3_2k, 4_5_1k, 4_5_2k, 5_4_1k, 5_4_2k. Default: "auto".

Machine-readable: OpenAPI schema · llms.txt

Use Match a Reference from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Match a Reference becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this wrapper with the run_model tool using the endpoint roomix/match-reference.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run roomix/match-reference on ModelRunner to generate image”. MCP setup guide.

Wrapper Details

Model Details

**Restyle your room to match a reference photo — the reference's palette, materials, furniture character, and lighting mood, recreated inside your room's own architecture.**

Give it two photos: your room (`file_url`) and an interior whose look you love (`reference_url`) — a Pinterest find, a hotel room, a showroom shot. The result is your room, restyled: its layout, walls, windows, doors, camera angle, and through-window views stay exactly as photographed, while the reference's aesthetic takes over the furnishings and finishes. This is a style and mood transfer, not object insertion — nothing is pasted 1:1 from the reference; its pieces are reinterpreted to fit your room's scale and function.

## Inputs

- `file_url` — your room photo. Architecture, layout, and camera are locked. Upload it upright: bake EXIF orientation into the pixels rather than relying on the metadata flag. - `reference_url` — the look to match. Only its style transfers: color palette, wall and floor finishes, materials, furniture style and character, lighting mood, decor density. Watermarks, usernames, captions, and app interface chrome in the reference are ignored, so a screenshot works fine. - `creativity` — how literally to chase the reference: `precise` adapts the look gently (your furniture arrangement stays recognizable), `balanced` restyles decisively, `creative` fully transforms toward the reference. - `creativity_level` — fine-grained strength from 0.5 (closest to your room) to 1.0; used only when `creativity` is `precise`. - `prompt` — adjustments in your own words, e.g. `lower the TV`, `keep my sofa`. These are honored literally and outrank the creativity setting. - `output_size` — output canvas. `auto` (the default) follows your room photo at roughly 1 megapixel; a `2k` preset returns roughly 3 megapixels for a sharper render, billed higher on the megapixel-tiered base model.

## How to use

1. Shoot the room well lit and wide; pick a reference whose style reads clearly in a single image. 2. Start with `creativity: balanced`. Result drifting too far from your room? Switch to `precise` and lower `creativity_level` toward 0.5. Clinging too hard to your current furniture? Go `creative`. 3. Use `prompt` for specific fixes — naming an item lets the model move, resize, remove, keep, or recolor just that item, even one mounted on a wall (`raise the artwork`, `lower the TV a little`). The room's architecture, camera, windows, and doors stay locked regardless. 4. For a sharp render, pass the `output_size` preset whose aspect ratio is closest to your room photo with the `2k` suffix — e.g. a portrait phone shot of a room becomes `3_4_2k`. 5. Restyling several rooms to one look? Pass the SAME `reference_url` to every run — never a previous run's output — so the set stays coherent.