Use the OpenAI SDK
If your code already calls OpenAI’s images.edit, it can call Remodeled AI with two changes: the API key and the base URL. The official OpenAI SDKs for Python, TypeScript, Go, Java and .NET all work, as does anything else that speaks OpenAI’s image API (LangChain, LiteLLM, Vercel AI SDK’s OpenAI provider).
base URL https://api.remodeled.ai/public/openai/v1API key your rmk_ keyimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["REMODELED_API_KEY"], base_url="https://api.remodeled.ai/public/openai/v1")
result = client.images.edit( model="remodel", image=open("living-room.jpg", "rb"), prompt="Japandi living room, warm oak and linen", quality="medium",)print(result.data[0].url)import fs from 'node:fs';import OpenAI from 'openai';
const client = new OpenAI({ apiKey: process.env.REMODELED_API_KEY, baseURL: 'https://api.remodeled.ai/public/openai/v1',});
const result = await client.images.edit({ model: 'remodel', image: fs.createReadStream('living-room.jpg'), prompt: 'Japandi living room, warm oak and linen', quality: 'medium',});console.log(result.data?.[0]?.url);curl -X POST https://api.remodeled.ai/public/openai/v1/images/edits \ -H "Authorization: Bearer $REMODELED_API_KEY" \ -F model=remodel \ -F "prompt=Japandi living room, warm oak and linen" \ -F quality=mediumModels are tools
Section titled “Models are tools”model picks the tool. client.models.list() lists them.
model |
What it does | prompt |
|---|---|---|
remodel (default) |
Redesign the room, keeping walls, windows and camera angle | Style and direction |
staging |
Furnish an empty room | Style and direction |
declutter |
Empty the room | Optional |
exterior |
Restyle a house front or garden | Style and direction |
edit |
Make the one change the prompt describes | The change |
gpt-image-*, dall-e-* |
Treated as edit, so existing code keeps working |
The change |
With model: "edit" (or a gpt-image-* name), add a mask (a PNG with transparent pixels over the area to change, as OpenAI uses) and the request becomes a brush edit that leaves the rest of the photo alone.
How OpenAI’s fields map
Section titled “How OpenAI’s fields map”| Field | Here |
|---|---|
image |
The room photo. More images (up to 4 extra, as image[]) are reference or item photos. |
quality |
low, medium, high = Quick, Standard, Best (prices). auto or no quality = Standard. Room tools only. |
size |
Picks the nearest aspect (1024x1024 square, 1536x1024 landscape, 1024x1536 portrait). Default: the photo’s own shape. |
n |
1 to 4 images (remodel, staging, declutter, exterior). Each is charged. |
response_format |
url (default) or b64_json. |
user |
Stored as metadata.user on the design. |
| Extra form fields | room, style, change and scope work as on the native API. |
The answer is OpenAI’s ImagesResponse with one addition, remodeled: the design’s id, the credits it cost and the tool used. The design is also visible with GET /public/v1/designs/{id}, and fires your webhook like any other.
Differences from OpenAI
Section titled “Differences from OpenAI”- It waits up to 90 seconds. Nearly every design finishes well within that. If one doesn’t, the answer is
504 still_renderingwithdetails.designId; retry the same request and it waits on the same design instead of starting another. - Retries never pay twice. The OpenAI SDKs retry timeouts and 5xx on their own, without an idempotency key. The SDKs mark their retries with an
x-stainless-retry-countheader of 1 or more; such a retry of the same request within 10 minutes waits on the design the first attempt started. A request without that header (your own retry loop, or a client that doesn’t send it) starts a new design, so retry by hand only after checkingGET /public/v1/designs. images.generateis not supported (400 image_required): every tool starts from a photo of a room.- Errors come as
{"error": {"code", "message"}}with our error codes. The OpenAI SDKs read them as usual:openai.APIStatusErrorwith.status_code, and.codeset to our code. streamis not supported, andnmust be 1 foredit.