{"id":"7fe44f19-0490-419f-aabf-c1d455445f1b","shortId":"a7W48z","kind":"skill","title":"azure-ai-vision-imageanalysis-py","tagline":"Azure AI Vision Image Analysis SDK for captions, tags, objects, OCR, people detection, and smart cropping. Use for computer vision and image understanding tasks.","description":"# Azure AI Vision Image Analysis SDK for Python\n\nClient library for Azure AI Vision 4.0 image analysis including captions, tags, objects, OCR, and more.\n\n## Installation\n\n```bash\npip install azure-ai-vision-imageanalysis\n```\n\n## Environment Variables\n\n```bash\nVISION_ENDPOINT=https://<resource>.cognitiveservices.azure.com\nVISION_KEY=<your-api-key>  # If using API key\n```\n\n## Authentication\n\n### API Key\n\n```python\nimport os\nfrom azure.ai.vision.imageanalysis import ImageAnalysisClient\nfrom azure.core.credentials import AzureKeyCredential\n\nendpoint = os.environ[\"VISION_ENDPOINT\"]\nkey = os.environ[\"VISION_KEY\"]\n\nclient = ImageAnalysisClient(\n    endpoint=endpoint,\n    credential=AzureKeyCredential(key)\n)\n```\n\n### Entra ID (Recommended)\n\n```python\nfrom azure.ai.vision.imageanalysis import ImageAnalysisClient\nfrom azure.identity import DefaultAzureCredential\n\nclient = ImageAnalysisClient(\n    endpoint=os.environ[\"VISION_ENDPOINT\"],\n    credential=DefaultAzureCredential()\n)\n```\n\n## Analyze Image from URL\n\n```python\nfrom azure.ai.vision.imageanalysis.models import VisualFeatures\n\nimage_url = \"https://example.com/image.jpg\"\n\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[\n        VisualFeatures.CAPTION,\n        VisualFeatures.TAGS,\n        VisualFeatures.OBJECTS,\n        VisualFeatures.READ,\n        VisualFeatures.PEOPLE,\n        VisualFeatures.SMART_CROPS,\n        VisualFeatures.DENSE_CAPTIONS\n    ],\n    gender_neutral_caption=True,\n    language=\"en\"\n)\n```\n\n## Analyze Image from File\n\n```python\nwith open(\"image.jpg\", \"rb\") as f:\n    image_data = f.read()\n\nresult = client.analyze(\n    image_data=image_data,\n    visual_features=[VisualFeatures.CAPTION, VisualFeatures.TAGS]\n)\n```\n\n## Image Caption\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.CAPTION],\n    gender_neutral_caption=True\n)\n\nif result.caption:\n    print(f\"Caption: {result.caption.text}\")\n    print(f\"Confidence: {result.caption.confidence:.2f}\")\n```\n\n## Dense Captions (Multiple Regions)\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.DENSE_CAPTIONS]\n)\n\nif result.dense_captions:\n    for caption in result.dense_captions.list:\n        print(f\"Caption: {caption.text}\")\n        print(f\"  Confidence: {caption.confidence:.2f}\")\n        print(f\"  Bounding box: {caption.bounding_box}\")\n```\n\n## Tags\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.TAGS]\n)\n\nif result.tags:\n    for tag in result.tags.list:\n        print(f\"Tag: {tag.name} (confidence: {tag.confidence:.2f})\")\n```\n\n## Object Detection\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.OBJECTS]\n)\n\nif result.objects:\n    for obj in result.objects.list:\n        print(f\"Object: {obj.tags[0].name}\")\n        print(f\"  Confidence: {obj.tags[0].confidence:.2f}\")\n        box = obj.bounding_box\n        print(f\"  Bounding box: x={box.x}, y={box.y}, w={box.width}, h={box.height}\")\n```\n\n## OCR (Text Extraction)\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.READ]\n)\n\nif result.read:\n    for block in result.read.blocks:\n        for line in block.lines:\n            print(f\"Line: {line.text}\")\n            print(f\"  Bounding polygon: {line.bounding_polygon}\")\n            \n            # Word-level details\n            for word in line.words:\n                print(f\"  Word: {word.text} (confidence: {word.confidence:.2f})\")\n```\n\n## People Detection\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.PEOPLE]\n)\n\nif result.people:\n    for person in result.people.list:\n        print(f\"Person detected:\")\n        print(f\"  Confidence: {person.confidence:.2f}\")\n        box = person.bounding_box\n        print(f\"  Bounding box: x={box.x}, y={box.y}, w={box.width}, h={box.height}\")\n```\n\n## Smart Cropping\n\n```python\nresult = client.analyze_from_url(\n    image_url=image_url,\n    visual_features=[VisualFeatures.SMART_CROPS],\n    smart_crops_aspect_ratios=[0.9, 1.33, 1.78]  # Portrait, 4:3, 16:9\n)\n\nif result.smart_crops:\n    for crop in result.smart_crops.list:\n        print(f\"Aspect ratio: {crop.aspect_ratio}\")\n        box = crop.bounding_box\n        print(f\"  Crop region: x={box.x}, y={box.y}, w={box.width}, h={box.height}\")\n```\n\n## Async Client\n\n```python\nfrom azure.ai.vision.imageanalysis.aio import ImageAnalysisClient\nfrom azure.identity.aio import DefaultAzureCredential\n\nasync def analyze_image():\n    async with ImageAnalysisClient(\n        endpoint=endpoint,\n        credential=DefaultAzureCredential()\n    ) as client:\n        result = await client.analyze_from_url(\n            image_url=image_url,\n            visual_features=[VisualFeatures.CAPTION]\n        )\n        print(result.caption.text)\n```\n\n## Visual Features\n\n| Feature | Description |\n|---------|-------------|\n| `CAPTION` | Single sentence describing the image |\n| `DENSE_CAPTIONS` | Captions for multiple regions |\n| `TAGS` | Content tags (objects, scenes, actions) |\n| `OBJECTS` | Object detection with bounding boxes |\n| `READ` | OCR text extraction |\n| `PEOPLE` | People detection with bounding boxes |\n| `SMART_CROPS` | Suggested crop regions for thumbnails |\n\n## Error Handling\n\n```python\nfrom azure.core.exceptions import HttpResponseError\n\ntry:\n    result = client.analyze_from_url(\n        image_url=image_url,\n        visual_features=[VisualFeatures.CAPTION]\n    )\nexcept HttpResponseError as e:\n    print(f\"Status code: {e.status_code}\")\n    print(f\"Reason: {e.reason}\")\n    print(f\"Message: {e.error.message}\")\n```\n\n## Image Requirements\n\n- Formats: JPEG, PNG, GIF, BMP, WEBP, ICO, TIFF, MPO\n- Max size: 20 MB\n- Dimensions: 50x50 to 16000x16000 pixels\n\n## Best Practices\n\n1. **Select only needed features** to optimize latency and cost\n2. **Use async client** for high-throughput scenarios\n3. **Handle HttpResponseError** for invalid images or auth issues\n4. **Enable gender_neutral_caption** for inclusive descriptions\n5. **Specify language** for localized captions\n6. **Use smart_crops_aspect_ratios** matching your thumbnail requirements\n7. **Cache results** when analyzing the same image multiple times\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["azure","vision","imageanalysis","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-azure-ai-vision-imageanalysis-py","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-ai-vision-imageanalysis-py","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34928 github stars · SKILL.md body (6,735 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T18:50:28.842Z","embedding":null,"createdAt":"2026-04-18T21:32:05.615Z","updatedAt":"2026-04-24T18:50:28.842Z","lastSeenAt":"2026-04-24T18:50:28.842Z","tsv":"'/image.jpg':138 '0':306,312 '0.9':443 '1':621 '1.33':444 '1.78':445 '16':449 '16000x16000':617 '2':631 '20':612 '2f':216,249,281,314,379,408 '3':448,640 '4':447,649 '4.0':45 '5':657 '50x50':615 '6':663 '7':673 '9':450 'action':538,695 'ai':3,8,32,43,61 'analysi':11,35,47 'analyz':125,164,492,677 'api':74,77 'applic':689 'ask':733 'aspect':441,460,667 'async':479,490,494,633 'auth':647 'authent':76 'await':504 'azur':2,7,31,42,60 'azure-ai-vision-imageanalysi':59 'azure-ai-vision-imageanalysis-pi':1 'azure.ai.vision.imageanalysis':83,110 'azure.ai.vision.imageanalysis.aio':483 'azure.ai.vision.imageanalysis.models':131 'azure.core.credentials':87 'azure.core.exceptions':566 'azure.identity':114 'azure.identity.aio':487 'azurekeycredenti':89,103 'bash':56,66 'best':619 'block':348 'block.lines':354 'bmp':605 'bound':252,320,361,414,543,553 'boundari':741 'box':253,255,315,317,321,409,411,415,464,466,544,554 'box.height':329,423,478 'box.width':327,421,476 'box.x':323,417,472 'box.y':325,419,474 'cach':674 'caption':14,49,157,160,189,204,210,218,233,236,238,243,521,528,529,653,662 'caption.bounding':254 'caption.confidence':248 'caption.text':244 'clarif':735 'clear':708 'client':39,98,117,480,502,634 'client.analyze':140,179,192,223,259,286,335,384,428,505,571 'code':588,590 'cognitiveservices.azure.com':69 'comput':25 'confid':214,247,279,310,313,377,406 'content':534 'cost':630 'credenti':102,123,499 'criteria':744 'crop':22,155,425,438,440,453,455,469,556,558,666 'crop.aspect':462 'crop.bounding':465 'data':176,181,183 'def':491 'defaultazurecredenti':116,124,489,500 'dens':217,527 'describ':524,696,712 'descript':520,656 'detail':368 'detect':19,283,381,403,541,551 'dimens':614 'e':584 'e.error.message':598 'e.reason':594 'e.status':589 'en':163 'enabl':650 'endpoint':68,90,93,100,101,119,122,497,498 'entra':105 'environ':64,724 'environment-specif':723 'error':562 'example.com':137 'example.com/image.jpg':136 'except':581 'execut':691 'expert':729 'extract':332,548 'f':174,209,213,242,246,251,276,303,309,319,356,360,374,401,405,413,459,468,586,592,596 'f.read':177 'featur':148,185,200,231,267,294,343,392,436,513,518,519,579,625 'file':167 'format':601 'gender':158,202,651 'gif':604 'h':328,422,477 'handl':563,641 'high':637 'high-throughput':636 'httpresponseerror':568,582,642 'ico':607 'id':106 'imag':10,28,34,46,126,134,143,145,165,175,180,182,188,195,197,226,228,262,264,289,291,338,340,387,389,431,433,493,508,510,526,574,576,599,645,680 'image.jpg':171 'imageanalysi':5,63 'imageanalysiscli':85,99,112,118,485,496 'import':80,84,88,111,115,132,484,488,567 'includ':48 'inclus':655 'input':738 'instal':55,58 'invalid':644 'issu':648 'jpeg':602 'key':71,75,78,94,97,104 'languag':162,659 'latenc':628 'level':367 'librari':40 'limit':700 'line':352,357 'line.bounding':363 'line.text':358 'line.words':372 'local':661 'match':669,709 'max':610 'mb':613 'messag':597 'miss':746 'mpo':609 'multipl':219,531,681 'name':307 'need':624 'neutral':159,203,652 'obj':299 'obj.bounding':316 'obj.tags':305,311 'object':16,51,282,304,536,539,540 'ocr':17,52,330,546 'open':170 'optim':627 'os':81 'os.environ':91,95,120 'output':718 'overview':699 'peopl':18,380,549,550 'permiss':739 'person':397,402 'person.bounding':410 'person.confidence':407 'pip':57 'pixel':618 'png':603 'polygon':362,364 'portrait':446 'practic':620 'print':208,212,241,245,250,275,302,308,318,355,359,373,400,404,412,458,467,515,585,591,595 'py':6 'python':38,79,108,129,168,190,221,257,284,333,382,426,481,564 'ratio':442,461,463,668 'rb':172 'read':545 'reason':593 'recommend':107 'region':220,470,532,559 'requir':600,672,737 'result':139,178,191,222,258,285,334,383,427,503,570,675 'result.caption':207 'result.caption.confidence':215 'result.caption.text':211,516 'result.dense':235 'result.dense_captions.list':240 'result.objects':297 'result.objects.list':301 'result.people':395 'result.people.list':399 'result.read':346 'result.read.blocks':350 'result.smart':452 'result.smart_crops.list':457 'result.tags':270 'result.tags.list':274 'review':730 'safeti':740 'scenario':639 'scene':537 'scope':711 'sdk':12,36 'select':622 'sentenc':523 'singl':522 'size':611 'skill':687,703 'skill-azure-ai-vision-imageanalysis-py' 'smart':21,424,439,555,665 'source-sickn33' 'specif':725 'specifi':658 'status':587 'stop':731 'substitut':721 'success':743 'suggest':557 'tag':15,50,256,272,277,533,535 'tag.confidence':280 'tag.name':278 'task':30,707 'test':727 'text':331,547 'throughput':638 'thumbnail':561,671 'tiff':608 'time':682 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':716 'tri':569 'true':161,205 'understand':29 'url':128,135,142,144,146,194,196,198,225,227,229,261,263,265,288,290,292,337,339,341,386,388,390,430,432,434,507,509,511,573,575,577 'use':23,73,632,664,685,701 'valid':726 'variabl':65 'vision':4,9,26,33,44,62,67,70,92,96,121 'visual':147,184,199,230,266,293,342,391,435,512,517,578 'visualfeatur':133 'visualfeatures.caption':149,186,201,514,580 'visualfeatures.dense':156,232 'visualfeatures.objects':151,295 'visualfeatures.people':153,393 'visualfeatures.read':152,344 'visualfeatures.smart':154,437 'visualfeatures.tags':150,187,268 'w':326,420,475 'webp':606 'word':366,370,375 'word-level':365 'word.confidence':378 'word.text':376 'workflow':693 'x':322,416,471 'y':324,418,473","prices":[{"id":"c1bb55aa-9a16-48f8-9394-d31d8eb81c48","listingId":"7fe44f19-0490-419f-aabf-c1d455445f1b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:32:05.615Z"}],"sources":[{"listingId":"7fe44f19-0490-419f-aabf-c1d455445f1b","source":"github","sourceId":"sickn33/antigravity-awesome-skills/azure-ai-vision-imageanalysis-py","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-ai-vision-imageanalysis-py","isPrimary":false,"firstSeenAt":"2026-04-18T21:32:05.615Z","lastSeenAt":"2026-04-24T18:50:28.842Z"}],"details":{"listingId":"7fe44f19-0490-419f-aabf-c1d455445f1b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"azure-ai-vision-imageanalysis-py","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34928,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"6e0b051e4306c217cd09dcdba48e009a4d6d05ab","skill_md_path":"skills/azure-ai-vision-imageanalysis-py/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-ai-vision-imageanalysis-py"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"azure-ai-vision-imageanalysis-py","description":"Azure AI Vision Image Analysis SDK for captions, tags, objects, OCR, people detection, and smart cropping. Use for computer vision and image understanding tasks."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/azure-ai-vision-imageanalysis-py"},"updatedAt":"2026-04-24T18:50:28.842Z"}}