# Restyle the Floor > Replace the flooring in a room photo — material, tone, finish, lay pattern, and rug — with the furniture and architecture untouched. ## Overview - **Endpoint**: `https://queue.modelrunner.run/roomix/floor-restyle` - **Wrapper ID**: `roomix/floor-restyle` - **Category**: image-to-image - **Kind**: wrapper inference - **Tags**: interior, floor, flooring, material, room ## Pricing - **Estimated Price**: $0.08766667 average per output ## Request Lifecycle This wrapper runs on the ModelRunner **asynchronous queue API** — a single POST does not return the output. Every call requires an `Authorization: Key $MODEL_RUNNER_KEY` header. Run three steps: 1. **Submit** — `POST https://queue.modelrunner.run/roomix/floor-restyle` with a JSON body holding the input fields at the top level. The body may also include a reserved top-level `metadata` object — a flat string map (max 16 keys, key ≤64 / value ≤512 chars) stored on the request for your own tagging. It is never sent to the wrapper; filter your request history with `GET https://queue.modelrunner.run/requests?metadata=` (exact key=value matches, AND-ed). The response carries request handles only (no output yet): ```json { "status": "IN_QUEUE", "request_id": "<21-char id>", "status_url": "https://queue.modelrunner.run/roomix/floor-restyle/requests//status", "response_url": "https://queue.modelrunner.run/roomix/floor-restyle/requests/", "cancel_url": "https://queue.modelrunner.run/roomix/floor-restyle/requests//cancel" } ``` 2. **Poll status** — `GET ` until `status` is `COMPLETED`. Possible values are `IN_QUEUE`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, `CANCELLED`. A `FAILED` request responds with HTTP 400 and an `error` field. 3. **Read result** — `GET `. Returns the finished request, including the generated `output`: ```json { "id": "", "status": "COMPLETED", "output": ..., "input": ... } ``` The JavaScript and Python SDKs below perform steps 2–3 for you. In any language without an SDK (Swift, Go, Kotlin, etc.) you must implement the polling loop and the final result fetch yourself — see the cURL example for the full flow. ### Input Schema - **`rug`** (`string`, _optional_): What happens to area rugs. Adding one never moves the furniture — the rug goes underneath it. - Default: `"keep"` - Options: `"keep"`, `"remove"`, `"add-neutral"`, `"add-patterned"`, `"add-vintage"` - **`tone`** (`string`, _optional_): How light or dark the material reads. The same oak looks completely different across these. - Default: `"auto"` - Options: `"auto"`, `"light"`, `"medium"`, `"dark"` - **`finish`** (`string`, _optional_): Surface sheen, which drives how much of the room's light the floor reflects. - Default: `"auto"` - Options: `"auto"`, `"matte"`, `"satin"`, `"gloss"`, `"textured"` - **`prompt`** (`string`, _optional_): Optional extra notes, e.g. 'wide planks running toward the window' or 'leave the tiled entry as it is'. - **`pattern`** (`string`, _optional_): How the material is laid. Independent of 'material', so oak can be straight planks or herringbone. - Default: `"auto"` - Options: `"auto"`, `"straight-plank"`, `"herringbone"`, `"chevron"`, `"large-format"`, `"hexagon"`, `"checkerboard"`, `"basketweave"` - **`file_url`** (`string`, _required_): External URL of the uploaded photo of the room whose floor should be replaced. - **`material`** (`string`, _optional_): Material for the new floor. 'auto' lets the wrapper pick one that suits the room. Ignored when 'custom_material' is set. - Default: `"auto"` - Options: `"auto"`, `"oak-hardwood"`, `"walnut-hardwood"`, `"ash-hardwood"`, `"parquet"`, `"bamboo"`, `"cork"`, `"laminate"`, `"luxury-vinyl-plank"`, `"porcelain-tile"`, `"ceramic-tile"`, `"encaustic-cement-tile"`, `"marble"`, `"travertine"`, `"slate"`, `"terrazzo"`, `"polished-concrete"`, `"microcement"`, `"wall-to-wall-carpet"`, `"sisal-jute"` - **`custom_material`** (`string`, _optional_): Free-text description of a flooring material not in the list, e.g. 'reclaimed barnwood with visible saw marks', 'green marble with gold veining', or 'sage green painted floorboards'. When set it overrides 'material'. This is also how you reach a stained or painted floor in a specific color — there is deliberately no separate color field, because a floor's color comes from its material and tone. ### Output Schema _No `Output` schema properties are available._ ## Usage Examples ### cURL The queue API is asynchronous: submit the request, poll `status_url` until it is `COMPLETED`, then read the result from `response_url`. Requires `jq`. ```bash # 1. Submit the request (returns request handles, not the output) SUBMIT=$(curl --silent --request POST \ --url https://queue.modelrunner.run/roomix/floor-restyle \ --header "Authorization: Key $MODEL_RUNNER_KEY" \ --header "Content-Type: application/json" \ --data '{ "file_url": "" }') STATUS_URL=$(echo "$SUBMIT" | jq -r '.status_url') RESPONSE_URL=$(echo "$SUBMIT" | jq -r '.response_url') # 2. Poll until the request leaves the queue / in-progress state while true; do STATUS=$(curl --silent --url "$STATUS_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" | jq -r '.status') echo "Status: $STATUS" case "$STATUS" in COMPLETED) break ;; FAILED|CANCELLED) echo "Request $STATUS"; exit 1 ;; esac sleep 1 done # 3. Read the finished request, including the generated output curl --silent --url "$RESPONSE_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" ``` ### JavaScript ```javascript import { modelrunner } from "@modelrunner/client"; const result = await modelrunner.subscribe("roomix/floor-restyle", { input: { "file_url": "" } }); console.log(result.data); ``` ### Python ```python import asyncio import modelrunner_ai async def main(): response = await modelrunner_ai.submit_async( "roomix/floor-restyle", arguments={ "file_url": "" } ) result = await response.get() print(result["output"]) asyncio.run(main()) ``` ## Additional Resources - [Playground](https://modelrunner.ai/wrappers/roomix/floor-restyle) - [OpenAPI Schema](https://modelrunner.ai/wrappers/roomix/floor-restyle/openapi.json) - [LLM Instructions](https://modelrunner.ai/wrappers/roomix/floor-restyle/llms.txt)