Create high-quality visual content with GPT-Image-1.5, FLUX Kontext Pro, and Sora 2 on Azure AI Foundry — tailored for professional use cases.
- Create videos from text prompts with the Sora 2 model
- Generate videos from text + images (image-to-video)
- Audio automatically included in all generated videos
- Support for multiple resolutions: 720p and 1080p (landscape and portrait)
- Durations: 4s, 8s, or 12s
- Generate polished image assets from text prompts, input images, or both
- GPT-Image-1.5: OpenAI's latest image model with face preservation and high-quality editing
- FLUX Kontext Pro: Black Forest Labs model for fast, high-fidelity image generation
- GPT-Image-1-Mini: Lightweight model for rapid prototyping
- Refine prompts using AI best practices to ensure high-impact visuals
- Analyze outputs with AI for quality control, metadata tagging, and asset optimization
- Guardrails for content showing brand products (brand protection)
- Manage your content in an organized asset library with folder support
- Automatic video analysis and metadata tagging
You can also get started with our notebooks to explore the models and APIs:
- Image generation: gpt-image-1.ipynb
- Video generation: sora-api-starter.ipynb
Visionary Lab uses Azure AI Foundry as a single unified AI resource with all model deployments, and managed identity for all service connections (no API keys).
| Component | Service | Auth |
|---|---|---|
| AI Models | Azure AI Foundry (AIServices) | Managed Identity |
| Image/Video Storage | Azure Blob Storage | Managed Identity |
| Metadata | Azure Cosmos DB | Managed Identity |
| Hosting | Azure Container Apps | SystemAssigned MI |
| Deployment | Model | Purpose |
|---|---|---|
gpt-4o |
GPT-4o | LLM for prompt enhancement and analysis |
gpt-image-1.5 |
GPT-Image-1.5 | Primary image generation |
gpt-image-1-mini |
GPT-Image-1-Mini | Fast image generation |
flux-kontext-pro |
FLUX.1-Kontext-pro | Alternative image generation |
sora-2 |
Sora 2 | Video generation |
Azure resources:
- Azure AI Foundry resource with deployed models (see table above)
- Azure Storage Account with Blob Containers for images and videos
- Azure Cosmos DB account
Compute environment:
- Python 3.12+
- Node.js 19+ and npm
- Git
- uv package manager
- Azure CLI (
az loginrequired for local development)
Wait for the Codespace to initialize, then continue with Step 2: Configure Resources.
git clone https://github.com/Azure-Samples/visionary-labMac/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"cp .env.example .envcd frontend
npm install --legacy-peer-deps-
Login to Azure (required for managed identity authentication):
az login
-
Configure environment variables in
.env:code .env
Setting Description AI_FOUNDRY_ENDPOINTYour AI Foundry endpoint (e.g., https://your-foundry.cognitiveservices.azure.com/)LLM_DEPLOYMENTLLM deployment name (e.g., gpt-4o)IMAGEGEN_DEPLOYMENTPrimary image model deployment (e.g., gpt-image-1.5)IMAGEGEN_1_MINI_DEPLOYMENTMini image model deployment (e.g., gpt-image-1-mini)FLUX_KONTEXT_DEPLOYMENTFLUX model deployment (e.g., flux-kontext-pro)SORA_DEPLOYMENTVideo model deployment (e.g., sora-2)AZURE_BLOB_SERVICE_URLBlob Storage URL AZURE_STORAGE_ACCOUNT_NAMEStorage account name AZURE_COSMOS_DB_ENDPOINTCosmos DB endpoint URL No API keys needed. All services authenticate via
DefaultAzureCredentialwhich uses youraz loginsession locally and managed identity in Azure.
Note: For the best experience, deploy all models. The app works with a subset — unavailable models are gracefully skipped.
Supported Resolutions:
- 1280×720 (16:9 landscape)
- 720×1280 (9:16 portrait)
- 1792×1024 (16:9 landscape, high quality)
- 1024×1792 (9:16 portrait, high quality)
Supported Durations: 4s, 8s, or 12s
Audio: All generated videos automatically include synchronized audio
-
Start the backend:
cd backend uv run fastapi devThe backend server will start on http://localhost:8000.
Note: If you encounter:
ImportError: libGL.so.1: cannot open shared object file, install:sudo apt update && sudo apt install libgl1-mesa-glx -
Open a new terminal to start the frontend:
cd frontend npm run build npm startThe frontend will be available at http://localhost:3000.
For production deployment, use Azure Developer CLI:
Prerequisites: Azure Developer CLI (azd)
git clone https://github.com/Azure-Samples/visionary-lab
cd visionary-lab
azd auth login
azd upDuring azd up, you'll be prompted for:
- AI Foundry name: Globally unique name for your AI Foundry resource
- Model deployment names: Which models to deploy (gpt-4o, gpt-image-1.5, sora-2, etc.)
✨ That's it! Your Visionary Lab will be running on Azure Container Apps with:
- Azure AI Foundry with all model deployments
- Managed identity for all service connections (no API keys)
- Azure Storage and Cosmos DB for content management
- RBAC role assignments auto-configured
- Optional Entra ID authentication (configurable per deployment)
📖 For detailed deployment instructions, see DEPLOYMENT.md
