Remove a specific image from a product. Destructive, idempotent.
Authenticated. OAuth (scope `products:write`) preferred; `api_key` fallback.
Use when an image was uploaded by mistake or the merchant updated their
listing. The product itself is preserved — only the image record and its
file are removed. To remove the product entirely use `delete_product`.
Args:
product_id: ID of the product the image belongs to.
image_id: ID of the image to delete. Visible in the `images` array of
`get_product` responses.
api_key: Optional API key (`pk_*`, generate at /account).
Used when there is no OAuth token, and also when the OAuth
token lacks the required scope — an explicitly passed key
overrides an ambient token that is scoped too narrowly.
An invalid or revoked token still fails regardless. Omit when using OAuth.
Returns:
``{"deleted": True, "product_id": int, "image_id": int}`` on success,
or ``{"error": ...}`` on auth/ownership failure.
Connector