Quick Start Guide
This guide walks you through creating your first AI-generated product visualization in just a few minutes.
What We'll Build
By the end of this tutorial, you'll have:
- ✅ Created a product from a template
- ✅ Generated a LoRA model for AI predictions
- ✅ Produced a stunning AI image of your product
Prerequisites
Before starting, ensure you have:
- 🔑 API token from your Veez.ai administrator
- 🖼️ Product image (512x512+ recommended, JPG/PNG format)
- 💻 Terminal or API client (we'll use cURL)
Step 1: Set Up Your Environment
First, save your API token as an environment variable for easy use:
export VEEZAI_API_TOKEN="your_api_token_here"
Test your connection:
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/template/ | jq '.[0]'
You should see template data returned. If you get an error, verify your token.
Step 2: Choose a Template
List available templates and find one that supports LoRA:
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/template/ | jq '.[] | select(.lora == "available")'
Let's use template ID 279 for this example. Get its details:
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/template/279 | jq '.'
Note the required textures in the response. You'll see something like:
{
"textures": [
{
"key": "TEX01",
"name": "Design Pack",
"required": 1
}
]
}
Step 3: Prepare Your Image
For this example, ensure your product image is:
- Format: JPG or PNG
- Size: At least 512x512 pixels
- Content: Clear product design or logo
- Quality: High resolution, good contrast
Save your image as my-product-design.jpg in your current directory.
Step 4: Create Your Product
Create a product using the template and your image:
curl -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $VEEZAI_API_TOKEN" \
-F "template_id=279" \
-F "name=My First Product" \
-F "description=Created with Veez.ai Quick Start Guide" \
-F "texture[0]=@my-product-design.jpg" \
-F "texture[0][key]=TEX01"
Save the product ID from the response:
# Example response:
{
"id": "abc123def456ghi789",
"template_id": 279,
"name": "My First Product",
"lora_enabled": 0
}
Store the product ID:
export PRODUCT_ID="abc123def456ghi789"
Step 5: Generate LoRA Model
Now generate the LoRA model that enables AI predictions:
curl -X POST https://app.veez.ai/api/product/$PRODUCT_ID/generate-lora \
-H "Authorization: Bearer $VEEZAI_API_TOKEN"
You should see:
{
"result": "LoRA creation in progress"
}
Step 6: Wait for LoRA Completion
LoRA generation takes 10-30 minutes. Check the status:
# Check every few minutes
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/product/$PRODUCT_ID | jq '.lora_enabled'
When it returns 1, your LoRA is ready!
Automated Waiting Script
Or use this script to wait automatically:
#!/bin/bash
echo "Waiting for LoRA to complete..."
while true; do
status=$(curl -s -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/product/$PRODUCT_ID | jq -r '.lora_enabled')
if [ "$status" = "1" ]; then
echo "✅ LoRA is ready!"
break
else
echo "⏳ Still processing... (checking again in 60 seconds)"
sleep 60
fi
done
Step 7: Create Your First Prediction
Once LoRA is ready, create an AI-generated image:
curl -X POST https://app.veez.ai/api/prediction/ \
-H "Authorization: Bearer $VEEZAI_API_TOKEN" \
-F "product_id=$PRODUCT_ID" \
-F "prompt=A premium product on a marble countertop in a modern kitchen, soft natural lighting, professional photography style" \
-F "aspect_ratio=16:9"
Save the prediction ID from the response:
export PREDICTION_ID="prediction_id_from_response"
Step 8: Download Your Image
Wait about 60 seconds, then check your prediction:
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/prediction/$PREDICTION_ID | jq '.images[]'
You'll get image URLs like:
"https://apptest.veez.ai/record/xyz/prediction/out-0.png"
Download your image:
curl -o my-first-prediction.png "https://apptest.veez.ai/record/xyz/prediction/out-0.png"
🎉 Congratulations!
You've successfully:
- ✅ Created a product from a 3D template
- ✅ Generated a LoRA model for AI capabilities
- ✅ Produced an AI image with your product in a custom scene
Complete Script
Here's the entire workflow in one script:
#!/bin/bash
# Configuration
export VEEZAI_API_TOKEN="your_token_here"
TEMPLATE_ID="279"
PRODUCT_NAME="Quick Start Product"
IMAGE_FILE="my-product-design.jpg"
echo "🚀 Starting Veez.ai Quick Start..."
# 1. Create product
echo "📦 Creating product..."
product_response=$(curl -s -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $VEEZAI_API_TOKEN" \
-F "template_id=$TEMPLATE_ID" \
-F "name=$PRODUCT_NAME" \
-F "texture[0]=@$IMAGE_FILE" \
-F "texture[0][key]=TEX01")
PRODUCT_ID=$(echo $product_response | jq -r '.id')
echo "✅ Product created: $PRODUCT_ID"
# 2. Generate LoRA
echo "🧠 Starting LoRA generation..."
curl -s -X POST https://app.veez.ai/api/product/$PRODUCT_ID/generate-lora \
-H "Authorization: Bearer $VEEZAI_API_TOKEN" > /dev/null
# 3. Wait for LoRA
echo "⏳ Waiting for LoRA completion..."
while true; do
status=$(curl -s -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/product/$PRODUCT_ID | jq -r '.lora_enabled')
if [ "$status" = "1" ]; then
echo "✅ LoRA ready!"
break
else
echo " Still processing..."
sleep 60
fi
done
# 4. Create prediction
echo "🎨 Generating AI image..."
prediction_response=$(curl -s -X POST https://app.veez.ai/api/prediction/ \
-H "Authorization: Bearer $VEEZAI_API_TOKEN" \
-F "product_id=$PRODUCT_ID" \
-F "prompt=A premium product on a marble surface, professional studio lighting" \
-F "aspect_ratio=1:1")
PREDICTION_ID=$(echo $prediction_response | jq -r '.id')
# 5. Wait for image generation
echo "⏳ Generating image..."
sleep 60
# 6. Download result
image_url=$(curl -s -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/prediction/$PREDICTION_ID | jq -r '.images[0]')
if [ "$image_url" != "null" ]; then
curl -o "result-$(date +%s).png" "$image_url"
echo "🎉 Success! Image downloaded."
else
echo "⚠️ Image still processing. Check again in a few minutes:"
echo " curl -H \"Authorization: Bearer \$VEEZAI_API_TOKEN\" https://app.veez.ai/api/prediction/$PREDICTION_ID"
fi
Next Steps
Now that you've mastered the basics:
- Explore Advanced Workflows - Learn pro techniques
- API Reference - Dive deeper into each endpoint
- Experiment with different prompts - Try various environments and styles
- Scale up - Create multiple products and batch generate images
Troubleshooting
Common Issues
401 Unauthorized
- Check your API token is correct
- Ensure
Bearerprefix is included
Template doesn't support LoRA
- Use
jq '.[] | select(.lora == "available")'to find compatible templates
Image upload fails
- Verify image format (JPG/PNG only)
- Check file size (under 10MB)
- Ensure file path is correct
LoRA takes too long
- Normal processing time is 10-30 minutes
- Check status periodically, don't poll too frequently
Need more help? Check the API Reference or contact support!