FutureSpace AI API Documentation
Transform spaces with our powerful AI interior design API. Generate photorealistic interior designs, get style recommendations, and more.
Base URL
https://api.futurespaceai.org/v1
Fast Integration
Get up and running in minutes with our simple REST API
Secure by Default
Enterprise-grade security with API key authentication
Powerful AI
State-of-the-art AI models for realistic transformations
Authentication
FutureSpace API uses API keys for authentication. Include your API key in the Authorization header of all requests.
Example Request
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.post(
'https://api.futurespaceai.org/v1/transform',
headers=headers,
json={
'room_image': 'base64_encoded_image',
'style': 'modern_minimal'
}
)
Security Note
Never share your API key or commit it to version control. Use environment variables to manage your keys securely.
API Endpoints
POST
Transform a room
/v1/transform
Request Body
{
"room_image": "base64_encoded_image",
"style": "modern_minimal",
"preferences": {
"color_scheme": "neutral",
"lighting": "bright",
"materials": ["wood", "metal"]
}
}
GET
List available styles
/v1/styles
Response
{
"styles": [
{
"id": "modern_minimal",
"name": "Modern Minimal",
"description": "Clean lines and minimal decoration"
},
{
"id": "scandinavian",
"name": "Scandinavian",
"description": "Light, airy and functional"
}
]
}
Error Handling
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Rate Limits
Free Tier
- 100 requests per day
- 5 concurrent requests
Pro Tier
- 10,000 requests per day
- 20 concurrent requests
Enterprise Tier
- Unlimited requests
- Dedicated infrastructure
Rate Limit Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
Webhooks
Receive real-time updates about your transformations by configuring webhooks.
Configure Webhook
{
"url": "https://your-domain.com/webhook",
"events": ["transformation.completed", "transformation.failed"],
"secret": "your_webhook_secret"
}
Example Webhook Payload
{
"event": "transformation.completed",
"transformation_id": "tr_123abc",
"timestamp": "2024-01-01T12:00:00Z",
"data": {
"status": "completed",
"result_url": "https://api.futurespaceai.org/v1/results/tr_123abc"
}
}
SDKs & Libraries
Code Examples
Basic Room Transform
from futurespace import FutureSpace
client = FutureSpace('your_api_key')
# Transform a room
with open('room.jpg', 'rb') as image_file:
result = client.transform(
image=image_file,
style='modern_minimal',
preferences={
'color_scheme': 'neutral',
'lighting': 'bright'
}
)
print(f"Transformation ID: {result.id}")
print(f"Status: {result.status}")
print(f"Result URL: {result.url}")
Batch Processing
from futurespace import FutureSpace
client = FutureSpace('your_api_key')
# Process multiple rooms
rooms = ['room1.jpg', 'room2.jpg', 'room3.jpg']
batch = client.batch_transform(
images=rooms,
style='scandinavian',
async_processing=True
)
# Check batch status
status = client.get_batch_status(batch.id)
print(f"Completed: {status.completed}/{status.total}")
Best Practices
Optimization Tips
- • Compress images before upload (max 10MB)
- • Use webhook notifications for long operations
- • Implement proper error handling
- • Cache responses when possible
Security Recommendations
- • Rotate API keys regularly
- • Use environment variables
- • Implement rate limiting on your end
- • Validate webhook signatures