The accelerator supports image generation through Azure OpenAI image models:
gpt-image-1-minigpt-image-1.5
Both models are used through images.generate() in the backend image agent. The selected model is controlled by AZURE_ENV_IMAGE_MODEL_NAME.
| Model | Status | Primary Use |
|---|---|---|
gpt-image-1-mini |
Supported | General marketing image generation |
gpt-image-1.5 |
Supported | Higher-quality marketing image generation |
The ImageContentAgent builds a single consolidated prompt from:
- Product context (including ingestion-time image descriptions)
- Creative brief visual guidance
- Brand guidelines
- Safety and style constraints
The agent enforces no-text-in-image constraints and color fidelity requirements in the prompt instructions.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Product Image │────▶│ GPT-5 Vision │────▶│ Text Description│
│ (Blob Storage) │ │ (Auto-analyze) │ │ (CosmosDB) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Marketing Image │◀────│ gpt-image-1-mini/1.5 │◀────│ Combined Prompt │
│ (Output) │ │ (Generate) │ │ (Desc + Brief) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
When a product image is uploaded to Blob Storage, ingestion logic can generate a detailed visual description that is later used as image-generation context.
- Sends the image to GPT-5 Vision
- Generates a detailed text description including:
- Product appearance (colors, shapes, materials)
- Key visual features
- Composition and positioning
- Style and aesthetic qualities
- Stores the description in CosmosDB alongside product metadata
async def generate_image_description(image_url: str) -> str:
"""Generate detailed text description of product image using GPT-5 Vision."""
response = await openai_client.chat.completions.create(
model="gpt-5",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": """Describe this product image in detail for use in marketing image generation.
Include: colors, materials, shape, key features, style, and positioning.
Be specific enough that an image generator could recreate a similar product."""
},
{
"type": "image_url",
"image_url": {"url": image_url}
}
]
}
],
max_tokens=500
)
return response.choices[0].message.contentThe image generation flow combines product description context with:
- Creative brief visual guidelines
- Brand guidelines (colors, style, composition rules)
- Scene/context requirements
async def generate_marketing_image(
product: Product,
creative_brief: CreativeBrief,
brand_guidelines: BrandGuidelines
) -> dict:
"""Generate marketing image using the configured GPT image model."""
full_prompt = f"""
Create a professional marketing image for a retail campaign.
PRODUCT (maintain accuracy):
{product.image_description}
SCENE:
{creative_brief.visual_guidelines}
BRAND STYLE:
- Primary color: {brand_guidelines.primary_color}
- Style: {brand_guidelines.image_style}
- Composition: Product centered, 30% negative space
REQUIREMENTS:
- Professional lighting
- Clean, modern aesthetic
- Suitable for {creative_brief.deliverable}
"""
model_name = app_settings.azure_openai.effective_image_model
size = app_settings.azure_openai.image_size or "1024x1024"
quality = app_settings.azure_openai.image_quality or "medium"
response = await openai_client.images.generate(
model=model_name,
prompt=full_prompt,
size=size,
quality=quality,
n=1,
)
return {"image_base64": response.data[0].b64_json}AZURE_OPENAI_ENDPOINTAZURE_ENV_GPT_MODEL_NAMEAZURE_ENV_IMAGE_MODEL_NAME(gpt-image-1-mini,gpt-image-1.5, ornone)AZURE_OPENAI_GPT_IMAGE_ENDPOINT(optional if same as main endpoint)AZURE_ENV_OPENAI_API_VERSIONAZURE_OPENAI_IMAGE_API_VERSION
AZURE_OPENAI_IMAGE_SIZE(for example:1024x1024,1536x1024,1024x1536,auto)AZURE_OPENAI_IMAGE_QUALITY(low,medium,high,auto)
The backend image generator calls Azure OpenAI with:
images.generate()modelset fromAZURE_ENV_IMAGE_MODEL_NAME- prompt text assembled from brief + product + brand constraints
sizeandqualityfrom app settings (or request overrides)
-
Product Representation: The generated product in the marketing image may not be an exact match to the original product. The image model interprets the text description and creates its own version.
-
Brand-Specific Details: Logos, specific patterns, or unique design elements may not be accurately reproduced.
-
Color Matching: While we include color descriptions, exact color matching is not guaranteed.
| Use Case | Suitability |
|---|---|
| Lifestyle/contextual marketing images | ✅ Excellent |
| Social media campaign visuals | ✅ Excellent |
| Concept mockups | ✅ Good |
| Product-in-scene compositions | ✅ Good |
| Exact product photography replacement | ❌ Not recommended |
| Catalog/technical images | ❌ Not recommended |
- Deploy either
gpt-image-1-miniorgpt-image-1.5based on quota and regional availability. - Set
AZURE_ENV_IMAGE_MODEL_NAMEto the deployed model name. - If using a separate image endpoint, set
AZURE_OPENAI_GPT_IMAGE_ENDPOINT. - Keep
AZURE_OPENAI_IMAGE_API_VERSIONaligned with the image model API version required by your deployment.
For best results with the text-based workaround:
- Be Specific: Include exact colors, materials, and dimensions
- Describe Unique Features: Highlight what makes the product distinctive
- Include Context: Mention typical use cases or settings
- Avoid Ambiguity: Use precise terminology
A sleek wireless Bluetooth headphone in matte black finish with
rose gold accents on the ear cup rims and headband adjustment
sliders. Over-ear cushions in premium memory foam covered with
soft protein leather. The headband features a padded top section
with subtle brand embossing. The left ear cup has touch-sensitive
controls visible as a circular touch pad. Cable port and power
button are positioned on the bottom edge of the right ear cup.
Overall aesthetic is premium, modern, and minimalist.
All generated images are validated by the ComplianceAgent for:
- Brand color adherence
- Prohibited visual elements
- Appropriate imagery for target audience
- Required disclaimers (added as text overlay if needed)
Images with compliance violations are flagged with appropriate severity levels before user review.