Which image formats does Claude's vision API support for base64-encoded image input?
Select an answer to reveal the explanation.
Short Explanation
Claude's vision API accepts the four web-standard image formats: JPEG, PNG, GIF, and WebP. You can send those as base64-encoded data. It doesn't accept raw camera files or uncommon formats.
Full Explanation
The Anthropic API supports base64-encoded images in four formats: image/jpeg, image/png, image/gif, and image/webp. These cover the most common web and application image formats. For formats not in this list, such as TIFF, BMP, RAW, and similar files, developers must convert to a supported format before sending. The claim that only PNG is supported is too restrictive because multiple formats are supported. The claim that all image formats including RAW, TIFF, and BMP are supported is wrong because those formats are not supported. The claim that Claude automatically converts any image format to PNG before processing is wrong because no automatic conversion happens; unsupported formats result in an error.