Video AI
10 tokens3DCreate 3D flythrough video animations
Overview
Video AI generates 3D flythrough video animations from a single room photo. The AI creates a short video that moves through the space, giving a cinematic walkthrough experience. Choose a design style to apply during the flythrough. Ideal for real estate virtual tours, design presentations, and social media content.
Image input
Endpoint
POST /api/v1/generatebash
curl -X POST https://roomai.com/api/v1/generate \
-H "Authorization: Bearer rai_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"model": "video", ...}'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Must be "video". video |
image | string | Required | URL of the room photo. |
styles | string | Optional | Design style to apply in the video. ModernMinimalistScandinavianIndustrialMid-Century ModernContemporary |
prompt | string | Optional | Custom instructions for the video. |
Request Example
json
{
"model": "video",
"image": "https://example.com/living-room.jpg",
"styles": "modern",
"prompt": "cinematic walkthrough with warm lighting"
}Response
Success (200)
json
{
"status": "success",
"result": {
"image_url": "https://storage.googleapis.com/...",
"model": "video",
"tokens_used": 10,
"processing_time_ms": 4500
}
}Error
json
{
"status": "error",
"error": {
"code": "INSUFFICIENT_TOKENS",
"message": "Not enough tokens",
"required": 10,
"balance": 0
}
}Code Examples
cURL
bash
curl -X POST https://roomai.com/api/v1/generate \
-H "Authorization: Bearer rai_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "video",
"image": "https://example.com/living-room.jpg",
"styles": "modern",
"prompt": "cinematic walkthrough with warm lighting"
}'JavaScript / Node.js
javascript
const response = await fetch("https://roomai.com/api/v1/generate", {
method: "POST",
headers: {
"Authorization": "Bearer rai_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "video",
"image": "https://example.com/living-room.jpg",
"styles": "modern",
"prompt": "cinematic walkthrough with warm lighting"
}),
});
const data = await response.json();
if (data.status === "success") {
console.log("Image URL:", data.result.image_url);
console.log("Tokens used:", data.result.tokens_used);
} else {
console.error("Error:", data.error.message);
}Python
python
import requests
response = requests.post(
"https://roomai.com/api/v1/generate",
headers={
"Authorization": "Bearer rai_live_your_api_key",
"Content-Type": "application/json",
},
json={
"model": "video",
"image": "https://example.com/living-room.jpg",
"styles": "modern",
"prompt": "cinematic walkthrough with warm lighting"
},
)
data = response.json()
if data["status"] == "success":
print("Image URL:", data["result"]["image_url"])
print("Tokens used:", data["result"]["tokens_used"])
else:
print("Error:", data["error"]["message"])Tips
- 1Costs 10 tokens per generation — this is a premium feature.
- 2Processing takes longer than image generation (up to 2-3 minutes).
- 3Use the webhook parameter for async delivery instead of waiting for the response.
- 4Wide-angle room photos produce more dramatic flythrough animations.
- 5The result is a video file URL — not an image.