Skip to main content

Match a Reference API

hakankaan/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.

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.

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 extra guidance for the restyle, e.g. "keep my sofa" or "match the reference's wall color exactly".

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 output0.039

Match a Reference API

Match a Reference is a image-to-image AI wrapper by hakankaan. 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/hakankaan/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/hakankaan/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/hakankaan/match-reference/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/hakankaan/match-reference/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

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

const result = await modelrunner.subscribe("hakankaan/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/hakankaan/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

NameTypeRequiredDescription
file_urlstring (uri)yesExternal URL of the user's room photo. Its architecture, layout, camera angle, and through-window views are preserved.
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.
creativityenumyesHow literally to chase the reference: precise adapts the look gently to the room, balanced restyles decisively, creative fully transforms toward the reference. Default: "balanced".
creativity_levelnumbernoFine-grained creativity value used only when creativity is precise. Default: 0.7.
promptstringnoOptional extra guidance for the restyle, e.g. "keep my sofa" or "match the reference's wall color exactly".

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 hakankaan/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 hakankaan/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. - `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. - `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` — optional extra guidance, e.g. `keep my sofa`.

## 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. Pin details with `prompt` (`keep my sofa`, `use the reference's wall color exactly`). 4. 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.