The clear boolean parameter of the wbeditentity API apparently cannot be used on MediaInfo entities:
{ "error": { "code": "param-illegal", "info": "An illegal set of parameters have been used.", "messages": [ { "name": "wikibase-api-param-illegal", "parameters": [], "html": { "*": "An illegal set of parameters have been used." } } ] } }
I assume this is because the MediaInfo class doesn’t implement the ClearableEntity interface. It had a clear() method for a while, but that was removed in T204488 (cc @Cparle, @Addshore).