Skip to content

Add HEIC/HEIF image format support to Vision API#1616

Open
jay-dhamale wants to merge 1 commit into
anthropics:mainfrom
jay-dhamale:main
Open

Add HEIC/HEIF image format support to Vision API#1616
jay-dhamale wants to merge 1 commit into
anthropics:mainfrom
jay-dhamale:main

Conversation

@jay-dhamale
Copy link
Copy Markdown

Summary

Adds image/heic and image/heif to the set of accepted image media types across the SDK. iOS devices have used HEIC as their default camera format since iOS 11 (2017), and HEIC files are ~50% smaller than JPEG at equivalent quality.

Changes

File Change
src/anthropic/types/base64_image_source_param.py Added "image/heic" and "image/heif" to the media_type Literal
src/anthropic/types/beta/beta_base64_image_source_param.py Same
src/anthropic/lib/tools/mcp.py Added to _SUPPORTED_IMAGE_TYPES frozenset
src/anthropic/types/beta/sessions/beta_managed_agents_base64_image_source_param.py Updated docstring
src/anthropic/types/beta/sessions/beta_managed_agents_base64_image_source.py Updated docstring
tests/lib/tools/test_mcp_tool.py Added test_image_content_heic and test_image_content_heif

Why this matters

  • HEIC is the default camera format on every iPhone and iPad since 2017
  • ~50% smaller file size vs JPEG at same quality means faster uploads and lower bandwidth
  • Without SDK-level support, mobile web apps must ship a ~1.3MB transcoding library (heic2any)

Closes #1589

- Add image/heic and image/heif to Base64ImageSourceParam Literal types
- Add image/heic and image/heif to MCP _SUPPORTED_IMAGE_TYPES frozenset
- Update managed agents docstrings to list the new formats
- Add test coverage for heic/heif in MCP tool tests

Closes anthropics#1589
@jay-dhamale jay-dhamale requested a review from a team as a code owner May 30, 2026 17:56
pull Bot pushed a commit to siftster/anthropic-sdk-python that referenced this pull request May 30, 2026
* feat(client): Create Bedrock Mantle client (anthropics#1616)

* feat: add bedrock mantle client with auth

* fix: remove workspace id from mantle client

* chore: rename bedrock mantle token env var

* release: 0.91.0

---------

Co-authored-by: Cameron McAteer <246350779+cameron-mcateer@users.noreply.github.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add HEIC/HEIF image format support to Vision API

1 participant