[BUG] API Error: invalid_request_error When Sending A Image

Resolved 💬 29 comments Opened Nov 18, 2025 by klenq Closed Nov 19, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I received a invalid_request_error when sending a image to Claude Code

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","mess
    age":"messages.1.content.4.image.source.base64.data: Image does not match 
    the provided media type 
    image/jpeg"},"request_id":"req_011CVGBgAXiQ5NPtA4MN8gh6"}

<img width="564" height="308" alt="Image" src="https://github.com/user-attachments/assets/da4a8e19-63ea-4bcc-9ead-89eaa052141c" />

What Should Happen?

Fix Error

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","mess
    age":"messages.1.content.4.image.source.base64.data: Image does not match 
    the provided media type 
    image/jpeg"},"request_id":"req_011CVGBgAXiQ5NPtA4MN8gh6"}

Steps to Reproduce

  1. Put any image in the folder claude can read
  2. Ask claude code to read the image you provided "read the image in the current folder"
  3. API Error raise and same error message raise for all future prompt you enter

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.45

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

29 Comments

mcvibes · 7 months ago

having the same issue

shawnm-anthropic · 7 months ago

Thanks for reporting, this should now be fixed in 2.0.46.

abankowski · 7 months ago

Unfortunately I experience this issue on v2.0.46

bmilleare · 7 months ago

Issue persists in 2.0.46 for me also.

alexeigs · 7 months ago

Still there.

vicpl · 7 months ago

Tested with 2.0.46 - still there

ericwarren · 7 months ago

Still an issue.

aliesenli · 7 months ago

I'm experiencing the same issue while using the Figma MCP and attempting to capture a screenshot. Also using 2.0.46

sebastianarena · 7 months ago

Not fixed for me using chrome devtools mcp either, using 2.0.46

timothy-web3-dev · 7 months ago

completely broken, can't use playwright mcp at all

darkguy2008 · 7 months ago

Same here, not working with 2.0.46 @shawnm-anthropic

darkguy2008 · 7 months ago

So... I used Claude to write a script to downgrade Claude 😂 (macOS, claude-generated):

downgrade.sh:

#!/bin/bash

# Script to downgrade claude-code to a specific version
# Usage: ./brew-downgrade-claude.sh 2.0.44

set -e

VERSION=$1

if [ -z "$VERSION" ]; then
    echo "Error: Version number required"
    echo "Usage: $0 <version>"
    echo "Example: $0 2.0.44"
    exit 1
fi

echo "Downgrading claude-code to version $VERSION..."

# Detect architecture
ARCH=$(uname -m)
if [ "$ARCH" = "arm64" ]; then
    PLATFORM="darwin-arm64"
elif [ "$ARCH" = "x86_64" ]; then
    PLATFORM="darwin-x64"
else
    echo "Error: Unsupported architecture: $ARCH"
    exit 1
fi

echo "Detected platform: $PLATFORM"

# Check if claude is currently managed by homebrew
if brew list --cask claude-code &>/dev/null; then
    echo "Uninstalling homebrew-managed claude-code..."
    brew uninstall --cask claude-code
fi

# Remove any existing manual installation
if [ -f "/usr/local/bin/claude" ]; then
    echo "Removing existing claude binary..."
    rm -f /usr/local/bin/claude
fi

# Download the specific version
DOWNLOAD_URL="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/$VERSION/$PLATFORM/claude"
echo "Downloading claude-code $VERSION from $DOWNLOAD_URL..."

if ! curl -f -L -o /tmp/claude "$DOWNLOAD_URL"; then
    echo "Error: Failed to download version $VERSION"
    echo "Please verify that version $VERSION exists"
    exit 1
fi

# Install the binary
echo "Installing claude binary to /usr/local/bin..."
chmod +x /tmp/claude

# Check if we can write to /usr/local/bin
if [ -w /usr/local/bin ]; then
    mv /tmp/claude /usr/local/bin/claude
else
    echo "Requesting sudo access to install to /usr/local/bin..."
    sudo mv /tmp/claude /usr/local/bin/claude
fi

# Verify installation
INSTALLED_VERSION=$(claude --version | grep -o '^[0-9]\+\.[0-9]\+\.[0-9]\+')
echo ""
echo "✓ Successfully installed claude-code $INSTALLED_VERSION"
echo ""
echo "Note: This is a manual installation. To restore homebrew management,"
echo "run: ./brew-restore-claude.sh"

And this script to undo it

#!/bin/bash

# Script to restore claude-code to the latest homebrew-managed version
# Usage: ./brew-restore-claude.sh

set -e

echo "Restoring claude-code to latest homebrew-managed version..."

# Remove manual installation
if [ -f "/usr/local/bin/claude" ]; then
    echo "Removing manual claude installation..."

    # Check if we can write to /usr/local/bin
    if [ -w /usr/local/bin/claude ]; then
        rm -f /usr/local/bin/claude
    else
        echo "Requesting sudo access to remove from /usr/local/bin..."
        sudo rm -f /usr/local/bin/claude
    fi
fi

# Update homebrew to get latest cask info
echo "Updating homebrew..."
brew update

# Install latest version via homebrew
echo "Installing latest claude-code via homebrew..."
brew install --cask claude-code

# Verify installation
INSTALLED_VERSION=$(claude --version | grep -o '^[0-9]\+\.[0-9]\+\.[0-9]\+')
echo ""
echo "✓ Successfully restored claude-code $INSTALLED_VERSION"
echo "✓ Now managed by homebrew - will update with 'brew upgrade'"

Using this, I can confirm this does not happen on 2.0.44, so something broke between that and 2.0.46

Hope this is useful for people in the future running into the same issue! At least until the Anthropic team fixes it...

djordje97 · 7 months ago
I'm experiencing the same issue while using the Figma MCP and attempting to capture a screenshot. Also using 2.0.46

It is same for me. I am using Figma MCP and getting same error. Also using 2.0.46 version. It was working last week.
My workaround was to downgrade Claude VS Code extension to 2.0.37, and i was able to use Figma MCP normally.

a7474267 · 7 months ago

same here using 2.0.47

ErwinthompsonfNova · 7 months ago

same error using 2.0.47

nhannt315 · 7 months ago

The error still persists in 2.0.47

tooooo1 · 7 months ago

same this error v2.0.47

michaelseliger · 7 months ago

You can manually downgrade if you simply run "claude install 2.0.44" in your terminal.

Same error on v2.0.47 also.

Eliotboutet · 7 months ago

Same error on v2.0.32

rednikisfun · 7 months ago

Why is this issue closed, is downgrading CC really a solution to this?

patrickkidd · 7 months ago

No kidding. I downgraded and will disable updates until it is fixed.

rttmax · 7 months ago

downgraded to 2.0.47. same error.

timothywadecook · 7 months ago

Not a fix, but if you are in a rush:

just tell Claude not to call getScreenshot, example:

"""
{your prompt for claude look at figma node}

VERY IMPORTANT: do NOT call the getScreenshot tool while using the figma mcp (even though it says "IMPORTANT: call get_screenshot... bla bla) .. bc there is a known bug with getScreenshot.. instead just ask me for a screenshot if you want/need one at any time. thanks.
"""

maendamedia · 7 months ago

Same here on claude --version
2.0.49 (Claude Code)

How can we get rid of this in an existing session? Keeps spitting this error

marktrobinson · 7 months ago

Yep still an issue in 2.0.50

How on earth is this closed?

patrickkidd · 7 months ago

Opus 4.5 now released with claims of being cheap and superior, the pain of freezing Claude Code version for this issue increases...

darkguy2008 · 7 months ago

Is this still a thing? I'm stuck with 2.0.44 still because that was the only working version before all this crazyness ensued. I still don't know why the Claude team doesn't just do a diff of what they changed between 2.0.44 and 2.0.47 and just revert / fix it or whatever, heck, even with Claude, maybe it's a 10-min fix, I dunno.

JongSikLim · 7 months ago

2.0.54 same here

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.