Inpaint AI
Generate stunning interior architectural designs with AI. Transform building images into photorealistic interior renderings.
Endpoint
HTTP Method
POST https://api.mnmlai.dev/v1/inpaint
Request
Send a POST request with multipart/form-data containing your building image and design specifications.
Required Parameters
Parameter | Type | Description |
---|---|---|
image | File | The source image to apply style to (multipart/form-data) |
mask | File | The mask(black background & white selected area) Image (multipart/form-data) |
Optional Parameters
Parameter | Type | Default | Description |
---|---|---|---|
prompt | String | "Optional" | Apply artistic watercolor style |
strength | Number | 0.7 | Style transfer strength (0-1) |
guidance_scale | 0.7 | (0-1) | Guidance Scale (0-1) |
seed | Number | Random | Random seed for reproducibility |
Response
The Inpaint AI endpoint processes your image asynchronously. You'll receive a request ID that you can use to check the status and retrieve the generated design.
Success Response (200 OK)
{
"status": "success",
"id": "b09ssvpzzhrj00cmzt1bykjzp1",
"prompt": "Modern interior design with glass facade"
}
Examples
Basic Example
curl -X POST https://api.mnmlai.dev/v1/inpaint \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@/path/to/building.jpg" \
-F "mask=@/path/to/mask.png" \
-F "prompt=Modern interior design with glass facade"
Advanced Example with All Parameters
curl -X POST https://api.mnmlai.dev/v1/inpaint \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@/path/to/building.jpg" \
-F "mask=@/path/to/mask.png" \
-F "prompt=Apply artistic watercolor style" \
-F "strength=0.7" \
-F "seed=23421142" \
-F "guidance_scale=0.7"
Node.js Example
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const form = new FormData();
form.append('image', fs.createReadStream('building.jpg'));
form.append('mask', fs.createReadStream('mask.jpg'));
form.append('prompt', 'Add artistic watercolor style');
form.append('strength', '0.7');
form.append('guidance_scale', '0.7');
form.append('seed', '23421142');
const response = await axios.post(
'https://api.mnmlai.dev/v1/inpaint',
form,
{
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
...form.getHeaders()
}
}
);
console.log('Request ID:', response.data.id);
Python Example
import requests
url = 'https://api.mnmlai.dev/v1/inpaint'
files = {
'image': open('building.jpg', 'rb')
'mask': open('mask.jpg', 'rb')
}
data = {
'prompt': 'Apply artistic watercolor style',
'strength': '0.7',
'seed': '23423213',
'guidance_scale': '0.7',
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(f"Request ID: {result['id']}")
Processing Status
After submitting your request, use the Status Check endpoint with the returned ID to monitor processing progress:
Status Check Endpoint
GET https://api.mnmlai.dev/v1/status/{id}
Error Handling
Common Error Responses
// 400 Bad Request - Missing required parameters
{
"error": "Missing required field: image"
}
// 401 Unauthorized - Invalid API key
{
"error": "Invalid authentication credentials"
}
// 413 Payload Too Large - File size exceeded
{
"error": "File size exceeds maximum limit of 10MB"
}
// 429 Too Many Requests - Rate limit exceeded
{
"error": "Rate limit exceeded. Please try again later"
}