Imagine AI
Generate stunning architectural visualizations from text prompts. Create photorealistic exteriors, interiors, and building layouts using advanced AI models.
Pricing Information
Using the Imagine AI API costs 0.5 credits per image generation. Make sure you have sufficient credits in your account before making API calls.
Endpoint
HTTP Method
POST https://api.mnmlai.dev/v1/imagine-ai
Request
Send a POST request with multipart/form-data containing your text prompt and design specifications.
Required Parameters
Parameter | Type | Description |
---|---|---|
prompt | String | Description of the architectural design you want to generate (max 500 characters) |
Optional Parameters
Parameter | Type | Default | Description |
---|---|---|---|
render_type | String | "exterior" | Type of architectural visualization: "exterior" | "interior" | "layout" |
aspect_ratio | String | "square" | Image dimensions: "square" (1:1) | "horizontal" (16:9) | "vertical" (9:16) |
style_strength | Number | 40 | Style influence strength (0-100) |
seed | Number | Random | Seed for reproducible results (any integer) |
Response
The Imagine AI endpoint processes your request asynchronously. You'll receive a prediction ID that you can use to check the status and retrieve the generated image.
Success Response (200 OK)
{
"status": "success",
"prediction_id": "b09ssvpzzhrj00cmzt1bykjzp1",
"seed": 123456,
"cfg": 3.5,
"prompt": "Modern glass office building with minimalist design"
}
Examples
Basic Example
curl -X POST https://api.mnmlai.dev/v1/imagine-ai \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "prompt=Modern glass office building with minimalist design"
Interior Design Example
curl -X POST https://api.mnmlai.dev/v1/imagine-ai \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "prompt=Luxurious modern living room with marble floors" \
-F "render_type=interior" \
-F "aspect_ratio=horizontal" \
-F "style_strength=60"
Building Layout Example
curl -X POST https://api.mnmlai.dev/v1/imagine-ai \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "prompt=Commercial complex masterplan with green spaces" \
-F "render_type=layout" \
-F "aspect_ratio=square" \
-F "style_strength=50" \
-F "seed=987654"
Node.js Example
const FormData = require('form-data');
const axios = require('axios');
const form = new FormData();
form.append('prompt', 'Modern glass office building with minimalist design');
form.append('render_type', 'exterior');
form.append('aspect_ratio', 'horizontal');
form.append('style_strength', '75');
form.append('seed', '123456');
const response = await axios.post(
'https://api.mnmlai.dev/v1/imagine-ai',
form,
{
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
...form.getHeaders()
}
}
);
console.log('Prediction ID:', response.data.prediction_id);
console.log('Seed:', response.data.seed);
Python Example
import requests
url = 'https://api.mnmlai.dev/v1/imagine-ai'
data = {
'prompt': 'Modern glass office building with minimalist design',
'render_type': 'exterior',
'aspect_ratio': 'horizontal',
'style_strength': '75',
'seed': '123456'
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(url, headers=headers, data=data)
result = response.json()
print(f"Prediction ID: {result['prediction_id']}")
print(f"Seed: {result['seed']}")
Processing Status
After submitting your request, use the Status Check endpoint with the returned prediction ID to monitor processing progress:
Status Check Endpoint
GET https://api.mnmlai.dev/v1/status/{prediction_id}
Best Practices
Prompt Guidelines
- • Be specific about architectural styles and materials
- • Include lighting conditions (daylight, evening, interior lighting)
- • Mention specific design elements (glass facade, modern, traditional)
- • Keep prompts under 500 characters for best results
Render Type Selection
- • Exterior: Building facades, outdoor architecture, landscape integration
- • Interior: Room designs, indoor spaces, furniture layouts
- • Layout: Site plans, masterplans, top-view building arrangements
Parameter Optimization
- • Use
style_strength: 30-50
for subtle style application - • Use
style_strength: 60-80
for strong style influence - • Save seed values for reproducible results
- • Choose aspect ratio based on intended use (social media, presentations, etc.)
Error Handling
Common Error Responses
// 400 Bad Request - Missing prompt
{
"status": "error",
"code": "MISSING_PROMPT",
"message": "Prompt is required"
}
// 400 Bad Request - Prompt too long
{
"status": "error",
"code": "PROMPT_TOO_LONG",
"message": "Prompt must be less than 500 characters",
"details": {
"promptLength": 650,
"maxLength": 500
}
}
// 400 Bad Request - Insufficient credits
{
"status": "error",
"code": "NO_CREDITS",
"message": "You do not have enough credits to use this feature",
"details": {
"credits": 0
}
}
// 401 Unauthorized - Invalid API key
{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Invalid authentication credentials"
}
// 500 Internal Server Error
{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"details": {
"error": "API service temporarily unavailable",
"timestamp": "2025-06-29T10:30:00.000Z"
}
}