[BUG] API Error: 400 The request body is not valid JSON: str is not valid UTF-8: surrogates not allowed: line 1 column 1 (char 0)
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?
When I am trying to attach and image both PNG and JPEG to the chat . Throwing this error API Error: 400 The request body is not valid JSON: str is not valid UTF-8: surrogates not allowed: line 1 column 1 (char 0)
What Should Happen?
Claude should parse the image and take action
Error Messages/Logs
Steps to Reproduce
NA
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
Claude Code v2.1.178
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
keep getting the same issue
Yes. Facing this same issue.
same issue here too
I'm getting this issue regularly without an image attachment
Since yesterday I am getting this issue when I attach pdf
Closing as a duplicate of #69781 — please follow and 👍 that issue instead so we can track it in one place. If you think this was closed in error, comment here and we'll reopen.
🤖 Generated with Claude Code
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.