Build image analysis applications with Azure AI Vision SDK for Java. Use when implementing image captioning, OCR text extraction, object detection, tagging, or smart cropping.
Install
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add microsoft/skills --skill azure-ai-vision-imageanalysis-java -a cursor -y
How do I install azure-ai-vision-imageanalysis-java?
Download .github/plugins/azure-sdk-java/skills/azure-ai-vision-imageanalysis-java/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does azure-ai-vision-imageanalysis-java live?
The publisher keeps it at https://github.com/microsoft/skills.
Which agents can use azure-ai-vision-imageanalysis-java?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.
Build image analysis applications with Azure AI Vision SDK for Java. Use when implementing image captioning, OCR text extraction, object detection, tagging, or smart cropping.
name: azure-ai-vision-imageanalysis-java
description: Build image analysis applications with Azure AI Vision SDK for Java. Use when implementing image captioning, OCR text extraction, object detection, tagging, or smart cropping.
license: MIT
metadata:
author: Microsoft
version: "1.0.0"
package: com.azure:azure-ai-vision-imageanalysis
Azure AI Vision Image Analysis SDK for Java
Build image analysis applications using the Azure AI Vision Image Analysis SDK for Java.
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;
TokenCredential credential = new DefaultAzureCredentialBuilder()
.requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
.build();
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes
// TokenCredential credential = new ManagedIdentityCredentialBuilder().build();
ImageAnalysisClient client = new ImageAnalysisClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildClient();
Visual Features
Feature
Description
CAPTION
Generate human-readable image description
DENSE_CAPTIONS
Captions for up to 10 regions
READ
OCR - Extract text from images
TAGS
Content tags for objects, scenes, actions
OBJECTS
Detect objects with bounding boxes
SMART_CROPS
Smart thumbnail regions
PEOPLE
Detect people with locations
Core Patterns
Generate Caption
import com.azure.ai.vision.imageanalysis.models.*;
import com.azure.core.util.BinaryData;
import java.io.File;
import java.util.Arrays;
// From file
BinaryData imageData = BinaryData.fromFile(new File("image.jpg").toPath());
ImageAnalysisResult result = client.analyze(
imageData,
Arrays.asList(VisualFeatures.CAPTION),
new ImageAnalysisOptions().setGenderNeutralCaption(true));
System.out.printf("Caption: \"%s\" (confidence: %.4f)%n",
result.getCaption().getText(),
result.getCaption().getConfidence());
Generate Caption from URL
ImageAnalysisResult result = client.analyzeFromUrl(
"https://example.com/image.jpg",
Arrays.asList(VisualFeatures.CAPTION),
new ImageAnalysisOptions().setGenderNeutralCaption(true));
System.out.printf("Caption: \"%s\"%n", result.getCaption().getText());
Extract Text (OCR)
ImageAnalysisResult result = client.analyze(
BinaryData.fromFile(new File("document.jpg").toPath()),
Arrays.asList(VisualFeatures.READ),
null);
for (DetectedTextBlock block : result.getRead().getBlocks()) {
for (DetectedTextLine line : block.getLines()) {
System.out.printf("Line: '%s'%n", line.getText());
System.out.printf(" Bounding polygon: %s%n", line.getBoundingPolygon());
for (DetectedTextWord word : line.getWords()) {
System.out.printf(" Word: '%s' (confidence: %.4f)%n",
word.getText(),
word.getConfidence());
}
}
}
VISION_ENDPOINT=https://<resource>.cognitiveservices.azure.com/ # Required for all auth methods
VISION_KEY=<your-api-key> # Only required for AzureKeyCredential auth
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
Caption and Dense Captions require GPU-supported regions. Check supported regions before deployment.
Trigger Phrases
"image analysis Java"
"Azure Vision SDK"
"image captioning"
"OCR image text extraction"
"object detection image"
"smart crop thumbnail"
"detect people image"
How do I install azure-ai-vision-imageanalysis-java?
Download .github/plugins/azure-sdk-java/skills/azure-ai-vision-imageanalysis-java/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does azure-ai-vision-imageanalysis-java live?
The publisher keeps it at https://github.com/microsoft/skills.
Which agents can use azure-ai-vision-imageanalysis-java?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.