Vision & Image Generation
Multimodal image analysis · Responses API with images · image generation models · video generation with Sora
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Analysis or generation?
Computer vision is a field of AI that enables machines to interpret and understand visual information from the world, such as images, videos, and live camera feeds. In Foundry, two kinds of models cover the objectives, and they work in opposite directions.
| You need to | Model type | Examples in Foundry |
|---|---|---|
| Understand an image: describe it, answer questions about it, read charts and screenshots | Multimodal, vision-enabled model (image in, text out) | GPT-4.1, GPT-4.1-mini, GPT-4.1-nano, GPT-5 series, partner multimodal models |
| Create or edit an image from a text description | Image generation model | GPT-Image-1.5, GPT-Image-1, GPT-Image-1-Mini, FLUX (third party) |
| Create a video from a text description | Video generation model | Sora 2, models from Fal |
Interpreting images with multimodal models
- Multimodal models are AI models that can understand and work with more than one type of data at the same time, such as text, images, audio, or video. Combining visual understanding with natural language responses is referred to as vision-enabled GPT models or GPT with vision.
- Vision-enabled models are designed for flexible, general-purpose visual reasoning. Because they accept both text and images, they reduce the need for separate vision pipelines.
- Describe the contents of an image in natural language
- Answer questions about objects, text, or scenes in an image
- Extract meaning from charts, screenshots, documents, or photos
- Combine image understanding with text instructions in a single prompt
| Model family | What the module says |
|---|---|
| GPT-4.1 / GPT-4.1-mini / GPT-4.1-nano | General-purpose multimodal GPT models that process text and images together; used for image description, visual question answering, document and screenshot analysis, and chart and diagram interpretation |
| GPT-5 series | Advanced multimodal models for enterprise and agentic scenarios: multimodal inputs (including text and images), structured outputs and tool use |
| Partner models | Foundry also hosts partner-provided multimodal models that support text and image understanding |
Try it first in the Foundry portal: in the model playground, select a vision-enabled model, upload images, and test prompts interactively.
Image analysis in a client app
- The OpenAI Responses API is designed for agentic apps and supports native multimodal inputs, including images. A single request can include text input and image input together, and the model processes both to generate a response.
- Images can be provided as URLs or as base64-encoded image data. Base64 encoding converts binary data into safe ASCII text.
- The prompt is a multi-part user message: an
input_textpart with the instruction (for example, what is in this image) and aninput_imagepart withimage_url. Callclient.responses.create(...)and readresponse.output_text. - You need your Foundry resource key and endpoint, and the name of your deployed model. Pass your deployment name (the name you gave the model) as the model. Install the library with
pip install openai.
Image generation models
Vision-capable models often match visual information in an image to corresponding text. Image generation models do the reverse: they generate images that correspond to text descriptions. For most new projects, Microsoft recommends starting with the GPT-Image-1 family, especially GPT-Image-1.5.
| Model | What the module says | Pick it when |
|---|---|---|
| GPT-Image-1.5 | Latest and most advanced image generation model in Foundry; supports text-to-image, image-to-image and precise image editing | Visual accuracy matters: branding, marketing, design workflows |
| GPT-Image-1 | Powerful general-purpose model that builds on earlier DALL-E models; text-to-image, image variations, precise editing | Creative applications, prototyping, visual content generation |
| GPT-Image-1-Mini | Lighter-weight, more cost-efficient version of GPT-Image-1 | Lower latency or reduced cost matters more than maximum visual fidelity; experimentation, internal tools, high-volume generation |
| FLUX | A family of open-source image generation models created by Black Forest Labs; a third-party option in Foundry | You want a third-party text-to-image model |
- Image generation models can be deployed in a Foundry (Azure OpenAI) resource, tested in the Foundry playground, and accessed programmatically using the OpenAI Responses API or image generation APIs.
- The images class in the OpenAI Python SDK lets you generate new images and edit existing images. Authentication uses an API key or Microsoft Entra ID.
Generating an image with the Responses API
- Create the client with your endpoint and key, and use your image model's deployment name.
- Call
client.responses.create(...)with the prompt asinputandtools=[{"type": "image_generation"}]. - Find the output item whose type is
image_generation_call; its result is base64 image data. - Decode it with
base64.b64decodeand write the bytes to an image file.
Video generation with Sora
- Sora is OpenAI's text-to-video model. Sora 2 supports text to video, image to video, and video to video (remix). It also introduces audio generation, improved realism, and remixing that allows targeted edits instead of regenerating an entire video.
- Additional video-generation models are available from providers including a leading-edge family of models from Fal.
- In the Foundry playground you can also specify parameters like video dimensions and duration.
Video generation is resource-intensive and typically runs as an asynchronous job. Use the Foundry REST interface to request a video generation job and retrieve the finished MP4 programmatically. Times are often 1 to 5 minutes, depending on settings.
- Create a job: POST to the videos endpoint with the model, prompt, size and seconds. The response includes a video id.
- Poll the job's status until it reaches
completed(orfailed). - Download the video once the job is complete. The video is downloaded only after status is
completed.
You need an Azure OpenAI / Foundry resource in a supported region, a Sora deployment, and an authorization method: API key or Microsoft Entra ID.
Exam Tips
Tick each tip once you can answer it without looking.
“Describe an image, answer questions about it, or read a chart or screenshot” → A vision-enabled multimodal model in Foundry (GPT-4.1 family, GPT-5 series, partner models). Trap: Image generation models do the reverse: they turn text descriptions into images.
“One request must carry both a photo and a text question” → A single Responses API request with text input and image input together. Trap: Multimodal models reduce the need for separate vision pipelines; you don't chain separate services.
“How do I attach an image to a prompt?” → As a URL or as base64-encoded image data. Trap: Base64 turns binary image data into ASCII text so it travels in a text-based request.
“input_text and input_image parts in client.responses.create(...)” → Image analysis: the model answers about the image in text (response.output_text). Trap: Generating an image uses tools=[{"type": "image_generation"}].
“What goes in the model argument of the call?” → Your deployment name: the name you gave the model. Trap: It matches the base model name only if you didn't customize it.
“New project: create and edit images from text prompts” → GPT-Image-1 family; Microsoft recommends GPT-Image-1.5 (text-to-image, image-to-image, precise editing). Trap: GPT-Image-1-Mini trades maximum visual fidelity for lower latency and cost.
“High-volume or experimental image generation; latency and cost beat maximum fidelity” → GPT-Image-1-Mini. Trap: GPT-Image-1.5 is the most advanced model, aimed at high-fidelity, enterprise-grade results.
“Image generation in code with the Responses API” → tools=[{"type": "image_generation"}]; the result is base64 data you decode and write to a file. Trap: The sample doesn't return a ready-made file: decode the base64 result yourself.
“Create a video from a text description” → Sora 2 (also image to video and video to video remix). Trap: GPT-Image models create still images, and GPT-4.1 analyzes images; neither generates video.
“Generating a video through the REST interface” → Asynchronous job: create the job, poll its status, download the MP4 once completed. Trap: It isn't one synchronous call; generation often takes 1 to 5 minutes.
“Third-party generation models in Foundry” → FLUX (open-source images, Black Forest Labs); a video family from Fal. Trap: FLUX generates images, not video.
“Try a vision model with no code” → Foundry portal model playground: select a vision-enabled model and upload images. Trap: For generation models, describe the image or video you want in the Foundry playground; for video you can also set parameters like dimensions and duration.
“Where do image generation models run?” → Deploy in a Foundry (Azure OpenAI) resource; test in the playground; call via the Responses API or image generation APIs. Trap: Authentication is an API key or Microsoft Entra ID.
“Advanced multimodal models for enterprise and agentic scenarios” → GPT-5 series: multimodal inputs, structured outputs, tool use. Trap: Multimodal here means the models accept text and images as input; generating images from text is what image generation models do.
“Sora 2 beyond plain text-to-video” → Image to video, video remix with targeted edits, and audio generation. Trap: Remixing edits parts of a video instead of regenerating the whole thing.
Sources
- Get started with computer vision in Azure: Introduction
- Get started with computer vision in Azure: Multimodal models for image analysis
- Get started with computer vision in Azure: Image generation models
- Get started with computer vision in Azure: Video generation models
Checked against Microsoft Learn on November 13, 2026.