{"version":"2.1.288","anchor":"api-error-frames-gain-a-media-removed-kind-with-media-and-me","canonical_anchor":"api-error-frames-gain-a-media-removed-kind-with-media-and-me","heading":"New media_removed error when the API refuses an image or document","tier":"notice","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.288\/e\/api-error-frames-gain-a-media-removed-kind-with-media-and-me","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.288","markdown":"### New media_removed error when the API refuses an image or document\n\nWhen the API refuses an image or PDF, Claude Code now drops it from later requests and reports a media_removed error that explains why\n\n**What**\n\nWhen the API refuses an image or document in the conversation, Claude Code now leaves it out of the requests that follow and reports a dedicated error kind, `media_removed`:\n\n- The SDK result format (what programs built on Claude Code receive) lists `media_removed` as a typed API error, alongside the earlier `pdf_too_large` and `pdf_password_protected`.\n\n- `api_error_params` gains `media` (`image` or `document`) and `media_reason` (`unprocessable`, `unsupported_by_model` or `media_budget`).\n\n- If a PDF is rejected because the model does not accept PDFs, the message says the PDF was removed and suggests asking Claude to read specific pages (sent as images) or switching to a model that reads PDFs.\n\n- `media_budget` is reported when the error says there is too much media.\n\n**Why**\n\nIf you attach a PDF to a model that can't read it, you get a message saying what to do next instead of a generic error. Tools built on the SDK can tell that a file was dropped from the conversation.\n\n- Area: SDK\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}