t2i

Generate AI images from text prompts via Microsoft Foundry providers using the t2i CLI.

2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill t2i-elbruno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: t2i
Source: https://github.com/elbruno/ElBruno.MagenticUI/tree/main/.claude/skills/t2i
Command: npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill t2i-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually creating images for scripts, CI/CD pipelines, and content workflows is slow and hard to automate. This Skill teaches AI agents how to use the t2i command-line tool to generate images from text prompts through Microsoft Foundry providers (FLUX.2, MAI-Image-2), including configuration, secrets management, and batch generation. ## Core Features & Use Cases - Text-to-Image Generation: Run t2i "<prompt>" with provider, size, and inference-step flags to produce PNG images from text descriptions. - Configuration & Secrets Management: Set up provider endpoints and API keys securely via t2i config and t2i secrets, with DPAPI or encrypted-file storage and environment variable support for CI/CD. - Batch & Pipeline Automation: Generate multiple images in shell or PowerShell loops with predictable output filenames and rate-limit delays, or integrate into GitHub Actions and Azure Pipelines. - Use Case: A developer needs weekly marketing hero images generated automatically. The agent installs the t2i dotnet tool, configures Foundry credentials as CI secrets, and adds a scheduled GitHub Actions workflow that runs t2i and uploads the PNG artifacts. ## Quick Start Ask the agent to verify setup with t2i doctor and then generate an image, for example: "Use t2i to generate a minimalist logo and save it as logo.png."

Frequently Asked Questions about t2i

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image from a text prompt with t2i?

Run t2i followed by your prompt in quotes, for example t2i "a robot painting a landscape". Use --output to set the filename, --provider to choose foundry-flux2 or foundry-mai2, and --width, --height, and --steps to control size and inference steps.

How do I configure API credentials for t2i providers?

Run t2i secrets set <provider> to enter the endpoint and API key interactively, stored via DPAPI on Windows or an encrypted file on macOS/Linux. For CI/CD, set environment variables like T2I_FOUNDRY_FLUX2_ENDPOINT and T2I_FOUNDRY_FLUX2_API_KEY.

Which t2i provider should I use, foundry-flux2 or foundry-mai2?

Use foundry-flux2 (the default) for highest-quality production images where 10-30 second generation is acceptable. Choose foundry-mai2 for fast iteration under 10 seconds, prototyping, or conversational prompts with synchronous responses.

Can I use t2i in GitHub Actions or CI/CD pipelines?

Yes. Install the tool with dotnet tool install -g ElBruno.Text2Image.Cli, provide credentials through pipeline secrets as T2I_<PROVIDER>_<FIELD> environment variables, then run t2i with an explicit --output path and upload the PNG as an artifact.

Why does t2i fail with 'missing secret' or 401 errors?

These errors mean the provider's API key is not configured or is invalid. Run t2i secrets list to check stored credentials, t2i secrets set <provider> to add or rotate them, and t2i secrets test <provider> or t2i doctor to verify connectivity.

How do I batch generate multiple images with t2i?

Loop over an array of prompts in Bash or PowerShell, calling t2i with an explicit --output filename for each iteration. Add a sleep of about 2 seconds between requests to respect provider rate limits and avoid 429 errors.