Skip to main content

Products API

Products are created by applying custom textures to templates. Once created, products can be used to generate 3D renders and AI predictions.

Create a Product

Create a new product by combining a template with your custom texture images.

Endpoint

POST /product/

Request Parameters

ParameterTypeRequiredDescription
template_idintegerID of the template to use
namestringCustom name for your product
descriptionstringProduct description
texture[n]fileImage file for texture slot
texture[n][key]stringTexture identifier (e.g., TEX01)

Image Requirements

Image Specifications
  • Formats: .jpg, .png
  • Recommended size: 512x512 pixels or higher
  • Max file size: 10MB per image
  • Color space: RGB

Request Example

curl -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $YOUR_API_TOKEN" \
-F "template_id=362" \
-F "name=Premium Coffee Package" \
-F "description=250g ground coffee with premium branding" \
-F "texture[0]=@images/main-design.jpg" \
-F "texture[0][key]=TEX01" \
-F "texture[1]=@images/metallic-accent.jpg" \
-F "texture[1][key]=TEX02"

Response

{
"id": "b01a9ff690428a78640fb0f738283a77",
"template_id": 362,
"name": "Premium Coffee Package",
"description": "250g ground coffee with premium branding",
"date_modification": "2025-01-21 10:01:51",
"lora_enabled": 0
}

List Products

Retrieve all products in your account.

Endpoint

GET /product/

Request Example

curl -s -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/product/

Response

[
{
"id": "b01a9ff690428a78640fb0f738283a77",
"template_id": 382,
"name": "Bouteille Gin",
"description": "45°",
"date_modification": "2025-01-21 10:01:51",
"lora_enabled": 0
},
{
"id": "3d26a5823201fe71a0730ac457b4d91a",
"template_id": 382,
"name": "bouteille",
"description": "",
"date_modification": "2025-01-30 11:34:45",
"lora_enabled": 1
}
]

Response Fields

FieldTypeDescription
idstringUnique product identifier
template_idintegerAssociated template ID
namestringProduct name
descriptionstringProduct description
date_modificationstringLast update timestamp
lora_enabledinteger1 if LoRA is ready, 0 if not generated
LoRA Status

Products with lora_enabled: 1 can be used for AI predictions. Use the LoRA generation endpoint to enable this feature.

Get Product Details

Retrieve detailed information about a specific product, including packshots and texture URLs.

Endpoint

GET /product/{product_id}

Parameters

ParameterTypeRequiredDescription
product_idstringThe product ID from list or create response

Request Example

curl -s -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/product/3d26a5823201fe71a0730ac457b4d91a

Response

{
"id": "3d26a5823201fe71a0730ac457b4d91a",
"template_id": 350,
"name": "coquillettes",
"description": "",
"date_modification": "2025-01-30 11:40:00",
"packshots": {
"34left": "https://apptest.veez.ai/record/.../_C1R1_s01.png",
"face": "https://apptest.veez.ai/record/.../_C1N1_s01.png",
"34right": "https://apptest.veez.ai/record/.../_C1L1_s01.png"
},
"textures": {
"TEX01": "https://apptest.veez.ai/record/.../texture/image1.jpg"
}
}

Additional Fields

FieldTypeDescription
packshotsobjectDictionary of 3D rendered views
texturesobjectApplied texture URLs indexed by key

Available Packshot Views

Common packshot angles include:

  • face - Front view
  • 34left - Three-quarter left view
  • 34right - Three-quarter right view
  • back - Rear view
  • left - Left side view
  • right - Right side view

Working with Multiple Textures

When a template requires multiple textures, specify each one with a unique index:

curl -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $TOKEN" \
-F "template_id=279" \
-F "name=Multi-Texture Product" \
-F "texture[0]=@design-main.jpg" \
-F "texture[0][key]=TEX01" \
-F "texture[1]=@design-accent.jpg" \
-F "texture[1][key]=TEX02" \
-F "texture[2]=@background.jpg" \
-F "texture[2][key]=TEX03"
Texture Order

The texture index [0], [1], [2] is just for the HTTP form data. What matters is the key value which must match the template's texture slots.

Error Responses

400 Bad Request - Missing Template

{
"error": "Bad Request",
"message": "template_id is required"
}

400 Bad Request - Invalid Texture

{
"error": "Bad Request",
"message": "Texture TEX01 is required for this template"
}

404 Template Not Found

{
"error": "Not Found",
"message": "Template with ID 999 does not exist"
}

413 File Too Large

{
"error": "Payload Too Large",
"message": "Image file exceeds maximum size limit"
}

Best Practices

Image Optimization

  • Use high-resolution images (1024x1024 or higher) for best quality
  • Optimize file sizes to reduce upload time
  • Use PNG for logos with transparency
  • Use JPG for photographic textures

Naming Convention

# Good naming examples
"Premium Coffee - Dark Roast"
"Gin Bottle - Limited Edition"
"Smartphone Case - Matte Black"

# Avoid generic names
"Product 1"
"Test"
"Untitled"

Texture Management

  • Keep texture files organized in folders by product line
  • Use consistent naming for texture files
  • Test textures on templates before bulk uploads

Example Workflows

Simple Product Creation

# 1. Find a template
curl -H "Authorization: Bearer $TOKEN" \
https://app.veez.ai/api/template/

# 2. Get template details
curl -H "Authorization: Bearer $TOKEN" \
https://app.veez.ai/api/template/279

# 3. Create product
curl -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $TOKEN" \
-F "template_id=279" \
-F "name=My Product" \
-F "texture[0]=@design.jpg" \
-F "texture[0][key]=TEX01"

Batch Product Creation (Bash)

#!/bin/bash
TOKEN="your_token_here"
TEMPLATE_ID="279"

for design in designs/*.jpg; do
name=$(basename "$design" .jpg)
curl -X POST https://app.veez.ai/api/product/ \
-H "Authorization: Bearer $TOKEN" \
-F "template_id=$TEMPLATE_ID" \
-F "name=$name" \
-F "texture[0]=@$design" \
-F "texture[0][key]=TEX01"
done

Next Steps

After creating products:

  1. Generate LoRA - Enable AI predictions for your product
  2. Create Predictions - Generate AI images in custom environments
  3. View Examples - See complete workflows