REST API for AI-powered floor visualizations. Generate photorealistic floor renderings programmatically.
Base URL: https://floorzap.live/api/v1 — All endpoints return JSON. Authenticated endpoints require a Bearer token.
FloorZap uses OAuth2 client credentials to issue short-lived JWT access tokens. First, obtain your client_id and client_secret from the FloorZap dashboard. Then exchange them for an access token:
Request body:
{
"client_id": "eai_abc123...",
"client_secret": "eais_xyz789..."
}Or use HTTP Basic auth: Authorization: Basic base64(client_id:client_secret)
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"tier": "professional"
}Use the token in subsequent requests:Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...
| Parameter | Type | Description | |
|---|---|---|---|
image_base64 | string | required | Base64-encoded photo of the floor/room |
style_name | string | optional | Name of the floor style / style (e.g. "White Oak") |
style_id | string | optional | UUID of a specific style from /styles endpoint |
collection | string | optional | Collection name (Hardwood Classics, Solid, River, etc.) |
color_hint | string | optional | Color description to guide the AI |
swatch_base64 | string | optional | Base64 swatch image for color matching |
Response:
{
"success": true,
"data": {
"id": "gen_a1b2c3d4e5f6...",
"status": "complete",
"original_image_url": null,
"generated_image_url": "https://...",
"style": {
"id": "uuid-or-null",
"name": "White Oak",
"collection": "Hardwood Classics"
},
"provider": "floorzap-vision-v1",
"processing_time_ms": 14200,
"credits_used": 1,
"credits_remaining": 999
},
"meta": {
"request_id": "req_f6e5d4c3b2a1...",
"rate_limit_remaining": 58,
"rate_limit_reset": "2026-03-16T12:01:00Z"
}
}Generate 2–10 styles in a single request. Professional and Enterprise tiers only.
{
"image_base64": "base64...",
"styles": [
{ "style_name": "White Oak", "collection": "Hardwood Classics" },
{ "style_name": "Ocean Breeze", "collection": "Solid" },
{ "style_name": "Copper Vein" }
]
}Response (HTTP 202):
{
"success": true,
"data": {
"job_id": "uuid",
"status": "processing",
"styles_count": 3
}
}{
"success": true,
"data": {
"job_id": "uuid",
"status": "complete",
"styles_count": 3,
"progress": "3/3",
"results": [
{
"style_name": "White Oak",
"status": "complete",
"generated_image_url": "https://...",
"provider": "floorzap-vision-v1",
"processing_time_ms": 12400
}
]
}
}| Query Param | Default | Description |
|---|---|---|
collection | all | Filter by collection name |
limit | 50 | Results per page (max 200) |
offset | 0 | Pagination offset |
{
"success": true,
"data": [
{
"id": "uuid",
"name": "White Oak",
"code": "MG-001",
"slug": "midnight-galaxy",
"collection": "Hardwood Classics",
"color_hint": "deep blue with silver flecks",
"hex_colors": ["#1a1a3e", "#c0c0c0"],
"swatch_url": "https://...",
"product_type": "floor"
}
],
"meta": { "total": 160, "limit": 50, "offset": 0, "has_more": true }
}{
"success": true,
"data": {
"period_start": "2026-02-14T00:00:00Z",
"period_end": "2026-03-16T00:00:00Z",
"generations_used": 142,
"generations_limit": 10000,
"rate_limit_per_minute": 200,
"tier": "professional"
}
}Register callback URLs to receive real-time notifications when events occur. Payloads are signed with HMAC-SHA256 using the webhook secret.
{
"url": "https://yourapp.com/hooks/floorzap",
"events": ["generation.complete", "batch.complete"]
}Response (the secret is shown only once):
{
"success": true,
"data": {
"id": "uuid",
"url": "https://yourapp.com/hooks/floorzap",
"events": ["generation.complete", "batch.complete"],
"secret": "whsec_a1b2c3...",
"is_active": true
}
}Available events: generation.complete, generation.failed, batch.complete, usage.threshold
| Tier | Requests / Minute | Monthly Generations | Batch |
|---|---|---|---|
| Starter | 60 | 1,000 | No |
| Professional | 200 | 10,000 | Yes (2-10 styles) |
| Enterprise | 500 | 100,000 | Yes (2-10 styles) |
Rate limit headers are included on every authenticated response:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | ISO 8601 timestamp when the window resets |
# 1. Get access token
curl -X POST https://floorzap.live/api/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"client_id":"eai_abc123","client_secret":"eais_xyz789"}'
# 2. Generate visualization
curl -X POST https://floorzap.live/api/v1/generate \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"image_base64": "<base64_photo>",
"style_name": "White Oak",
"collection": "Hardwood Classics"
}'
# 3. Browse styles (no auth needed)
curl https://floorzap.live/api/v1/styles?collection=Hardwood Classics&limit=10const BASE = 'https://floorzap.live/api/v1';
// Get token
const tokenRes = await fetch(`${BASE}/auth/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: process.env.FLOORZAP_CLIENT_ID,
client_secret: process.env.FLOORZAP_CLIENT_SECRET,
}),
});
const { access_token } = await tokenRes.json();
// Generate
const genRes = await fetch(`${BASE}/generate`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${access_token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image_base64: photoBase64,
style_name: 'White Oak',
collection: 'Hardwood Classics',
}),
});
const { data } = await genRes.json();
console.log(data.generated_image_url);import requests, base64
BASE = "https://floorzap.live/api/v1"
# Get token
token_resp = requests.post(f"{BASE}/auth/token", json={
"client_id": "eai_abc123",
"client_secret": "eais_xyz789",
})
token = token_resp.json()["access_token"]
headers = {"Authorization": f"Bearer {token}"}
# Read and encode image
with open("garage.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
# Generate visualization
gen_resp = requests.post(f"{BASE}/generate", headers=headers, json={
"image_base64": image_b64,
"style_name": "White Oak",
"collection": "Hardwood Classics",
})
result = gen_resp.json()["data"]
print(result["generated_image_url"])| HTTP | Code | Meaning |
|---|---|---|
| 400 | bad_request | Missing or invalid parameters |
| 401 | unauthorized | Missing or invalid Bearer token |
| 401 | token_expired | Access token has expired — request a new one |
| 401 | invalid_client | Bad client_id or client_secret |
| 403 | tier_required | Feature requires a higher tier (e.g. batch needs Pro+) |
| 404 | not_found | Resource does not exist |
| 429 | rate_limit_exceeded | Too many requests — check Retry-After header |
| 429 | usage_limit_exceeded | Monthly generation quota exhausted |
| 500 | internal_error | Server error — retry or contact support |
FloorZap API v1 — Questions? Contact ops@floorzap.pro