Pattern AI
1 tokenToolsGenerate seamless tileable textures
Overview
Pattern AI generates seamless, tileable textures and patterns from text descriptions. No input image required — just describe the pattern you want. The output tiles seamlessly in all directions, making it perfect for wallpapers, floor textures, fabric designs, and 3D model texturing.
Text-only (no image required)
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": "pattern", ...}'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Must be "pattern". pattern |
prompt | string | Required | Describe the pattern (e.g. "white Carrara marble with grey veining", "herringbone oak wood floor", "geometric Art Deco wallpaper in gold and navy"). |
format | string | Optional | Output format. Default: png |
Request Example
json
{
"model": "pattern",
"prompt": "white Carrara marble with subtle grey veining, polished finish"
}Response
Success (200)
json
{
"status": "success",
"result": {
"image_url": "https://storage.googleapis.com/...",
"model": "pattern",
"tokens_used": 1,
"processing_time_ms": 4500
}
}Error
json
{
"status": "error",
"error": {
"code": "INSUFFICIENT_TOKENS",
"message": "Not enough tokens",
"required": 1,
"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": "pattern",
"prompt": "white Carrara marble with subtle grey veining, polished finish"
}'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": "pattern",
"prompt": "white Carrara marble with subtle grey veining, polished finish"
}),
});
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": "pattern",
"prompt": "white Carrara marble with subtle grey veining, polished finish"
},
)
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
- 1No input image needed — this is a text-to-image model.
- 2Be specific about materials, colors, and finishes for the best results.
- 3The output is seamlessly tileable — you can repeat it in any direction without visible seams.
- 4Great prompts: "herringbone oak parquet floor", "hexagonal cement tile in blue and white", "terrazzo with pink and green chips".